plot_predicted_common_support: Plot a regression tree predicting variables with lack of...

View source: R/plot_common_support.R

plot_predicted_common_supportR Documentation

Plot a regression tree predicting variables with lack of overlap

Description

Identify variables that predict lack of overlap

Usage

plot_predicted_common_support(
  .model,
  max_depth = 3,
  rule = c("both", "sd", "chi")
)

Arguments

.model

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

max_depth

a number indicatin the max depth of the tree. Higher numbers are more prone to overfitting.

rule

one of c('both', 'sd', 'chi') denoting which rule to use to identify lack of support

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',
 commonSuprule = 'none'
)
plot_predicted_common_support (model_results)
plot_predicted_common_support (model_results, max_depth = 2, rule = 'chi')


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