Fusion | R Documentation |
TEstimator
and SEstimator
.Validation of estimates of conditional average treatment effects in objects of class TEstimator
and SEstimator
.
Validation of estimates of conditional average treatment effects in objects of class TEstimator
and SEstimator
.
an R6 object
new()
Fusion$new(..., stratification = NULL, stratification_joint = NULL)
...
objects of class TEstimator
and SEstimator
.
stratification
a character vector specifying variables. The variables are used to select subgroups individually or in combination depending on stratification_joint
. Default value is NULL
.
stratification_joint
a logical indicating if subgroups are selected based on levels of individual variable in stratification
or levels of combined variables in stratifiation
. Default value is NULL.
plot()
Fusion$plot()
print()
Fusion$print()
evaluate()
Fusion$evaluate()
clone()
The objects of this class are cloneable with this method.
Fusion$clone(deep = FALSE)
deep
Whether to make a deep clone.
source.data <- RCTrep::source.data
target.data <- RCTrep::target.data
vars_name <- list(outcome_predictors = c("x1","x2","x3","x4","x5","x6"),
treatment_name = c('z'),
outcome_name = c('y')
)
selection_predictors <- c("x2","x6")
source.obj <- TEstimator_wrapper(
Estimator = "G_computation",
data = source.data,
vars_name = vars_name,
outcome_method = "glm",
outcome_form=y ~ x1 + x2 + x3 + z + z:x1 + z:x2 +z:x3+ z:x6,
name = "RWD",
data.public = FALSE
)
target.obj <- TEstimator_wrapper(
Estimator = "Crude",
data = target.data,
vars_name = vars_name,
name = "RCT",
data.public = FALSE,
isTrial = TRUE
)
strata <- c("x1","x4")
source.rep.obj <- SEstimator_wrapper(Estimator = "Exact",
target.obj = target.obj,
source.obj = source.obj,
selection_predictors =
selection_predictors)
source.rep.obj$EstimateRep(stratification = strata, stratification_joint = TRUE)
fusion <- Fusion$new(target.obj,
source.obj,
source.rep.obj)
fusion$plot()
fusion$evaluate()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.