Run Multiple Generalized Random Forest (GRF) Causal Forest Models with Enhanced Features
Source:R/margot_causal_forest.R
margot_causal_forest.Rd
Run Multiple Generalized Random Forest (GRF) Causal Forest Models with Enhanced Features
Usage
margot_causal_forest(
data,
outcome_vars,
covariates,
W,
weights,
grf_defaults = list(),
save_data = FALSE,
compute_rate = TRUE,
top_n_vars = 20,
save_models = FALSE,
train_proportion = 0.7,
verbose = TRUE
)
Arguments
- data
A data frame containing all necessary variables.
- outcome_vars
A character vector of outcome variable names to be modeled.
- covariates
A matrix of covariates to be used in the GRF models.
- W
A vector of binary treatment assignments.
- weights
A vector of weights for the observations.
- grf_defaults
A list of default parameters for the GRF models.
- save_data
Logical indicating whether to save data, covariates, and weights. Default is FALSE.
- compute_rate
Logical indicating whether to compute RATE for each model. Default is TRUE.
- top_n_vars
Integer specifying the number of top variables to use for additional computations. Default is 15.
- save_models
Logical indicating whether to save the full GRF model objects. Default is FALSE.
- train_proportion
Numeric value between 0 and 1 indicating the proportion of non-missing data to use for training policy trees. Default is 0.7.
- verbose
Logical indicating whether to display detailed messages during execution. Default is TRUE.