plot_trace | R Documentation |
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.
plot_trace(.model, type = c("cate", "sate", "pate", "sigma"))
.model |
a model produced by 'bartCause::bartc()' |
type |
parameter to plot options are average treatment effects: 'cate', 'sate' and 'pate' as well as posterior predicitve uncertainty 'sigma' |
ggplot object
Joseph Marlo, George Perrett
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.