| 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.
stratificationa character vector specifying variables. The variables are used to select subgroups individually or in combination depending on stratification_joint. Default value is NULL.
stratification_jointa 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)
deepWhether to make a deep clone.
source.data <- RCTrep::source.data[sample(dim(RCTrep::source.data)[1],500),]
target.data <- RCTrep::target.data[sample(dim(RCTrep::target.data)[1],500),]
vars_name <- list(confounders_treatment_name = c("x1","x2","x3","x4","x5","x6"),
treatment_name = c('z'),
outcome_name = c('y')
)
confounders_sampling_name <- 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,
confounders_sampling_name =
confounders_sampling_name)
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.