plot_residual_density: Plot the model residual

View source: R/plot_residual.R

plot_residual_densityR Documentation

Plot the model residual

Description

Visualize balance of variables between treatment and control groups. Balance plot reflects balance in standardized units.

Usage

plot_residual_density(.model)

Arguments

.model

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

Value

ggplot object

Author(s)

George Perrett & Joseph Marlo

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_residual_density(model_results)


joemarlo/plotBart documentation built on May 31, 2024, 12:22 p.m.