View source: R/TEstimate_wrapper.R
TEstimator_wrapper | R Documentation |
Estimating conditional average treatment effects
TEstimator_wrapper(
Estimator,
data,
vars_name,
name = "",
outcome_method = "glm",
treatment_method = "glm",
two_models = FALSE,
outcome_formula = NULL,
treatment_formula = NULL,
data.public = TRUE,
isTrial = FALSE,
strata_cut = NULL,
...
)
Estimator |
A character specifying an estimator for conditional average treatment effects. The allowed estimators are: |
data |
A data frame containing variables named in |
vars_name |
A list containing four character vectors |
name |
A character indicating the name of the output object |
outcome_method |
A character specifying a model for outcome. Possible values are found using |
treatment_method |
A character specifying a model for treatment. Possible values are found using |
two_models |
An optional logical indicating whether potential outcomes should be modeled separately when |
outcome_formula |
An optional object of class |
treatment_formula |
An optional object of class |
data.public |
An optional logical indicating whether individual-level |
isTrial |
An optional logical indicating whether the treatment assignment of |
strata_cut |
An optional list containing lists. Each component is a list with tag named by a variable in |
... |
An optional argument passed to the private function |
An object of class TEstimator
.
data <- RCTrep::source.data[sample(dim(RCTrep::source.data)[1],500),]
vars_name <- list(outcome_predictors = c("x1","x2","x3","x4","x5","x6"),
treatment_name = c('z'),
outcome_name = c('y'))
obj <- TEstimator_wrapper(
Estimator = "G_computation",
data = data,
vars_name = vars_name,
name = "RCT",
data.public = TRUE,
isTrial = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.