causal_tree | R Documentation |
Trains a single causal tree
causal_tree(
data,
outcome,
covariates,
treat,
minsize,
alpha,
feature_fraction,
sample_fraction,
honest_split,
honesty_fraction
)
data |
a data frame with predictor, treatment assignment, outcome variables and no NA. |
outcome |
name of the outcome variable as character vector. |
covariates |
names of the predictors as character vector. |
treat |
name of the treatment indicator variable as character vector (treatment indicator must be binary numeric 1 == treatment, 0 == control with no NA). |
minsize |
minimum number of treatment and control observations that must be present in each split as numeric vector. |
alpha |
weighting of cost function numeric vector between 0-1. weights closer to 1 put more emphasis on maximizing heterogeneity. weights closer to 0 put more weight on precisely estimating treatment effects. |
feature_fraction |
fraction of total number of predictors to use in fitting each tree as numeric vector between 0-1. |
sample_fraction |
fraction of observations to fit tree with. |
honest_split |
enables honest splitting. Default TRUE. |
honesty_fraction |
fraction of data to be used for honest estimation as numeric vector between 0-1. |
trained causal tree (splitting structure, cate estimates, oob samples, data for variable importance computation)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.