plot_trace {plotBart}R Documentation

Trace plot the estimands of a 'bartCause::bartc()' model

Description

Returns a ggplot of the estimated effect over each iteration of the model fit. This is used to visually assess the convergence of Markov chain Monte Carlo (MCMC) sampling. Chains should be well mixed such that no single color is notably separate from others.

Usage

plot_trace(.model)

Arguments

.model

a model produced by 'bartCause::bartc()'

Value

ggplot object

Author(s)

Joseph Marlo, George Perrett

Examples


data(lalonde)
confounders <- c('age', 'educ', 'black', 'hisp', 'married', 'nodegr')
model_results <- bartCause::bartc(
 response = lalonde[['re78']],
 treatment = lalonde[['treat']],
 confounders = as.matrix(lalonde[, confounders]),
 estimand = 'ate',
 commonSup.rule = 'none'
)
plot_trace(.model = model_results)


[Package plotBart version 0.1.7 Index]