Fusion {RCTrep} | R Documentation |
Validation of estimates of conditional average treatment effects in objects of class TEstimator
and SEstimator
.
Description
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
.
Value
an R6 object
Methods
Public methods
Method new()
Usage
Fusion$new(..., stratification = NULL, stratification_joint = NULL)
Arguments
...
objects of class
TEstimator
andSEstimator
.stratification
a character vector specifying variables. The variables are used to select subgroups individually or in combination depending on
stratification_joint
. Default value isNULL
.stratification_joint
a logical indicating if subgroups are selected based on levels of individual variable in
stratification
or levels of combined variables instratifiation
. Default value is NULL.
Method plot()
Usage
Fusion$plot()
Method print()
Usage
Fusion$print()
Method evaluate()
Usage
Fusion$evaluate()
Method clone()
The objects of this class are cloneable with this method.
Usage
Fusion$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
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()
[Package RCTrep version 1.2.0 Index]