EffectXshift.RdThis packages aims to find, in a mixed exposure with many covariates and a future outcome, the exposure-covariate region combination that maximizes the differential impact of stochastic shift intervention. In a training fold we find the region in the covariate space that maximizes the average difference in stochastic shift interventions, compared between the regions. This outputs an exposure-covariate region pairing. Then in an estimation sample, we estimate a stochastic shift intervention using targeted learning in each level of the covariate, shifting the discovered exposure. This is done in a CV-TMLE procedure where each fold is used as validation and the complementary folds are used as training. This package outputs the targeted estimates for the discovered exposure in the levels of the discovered covariate both at the k-fold specific level and pooled across folds, which estimates the overall oracle parameter.
EffectXshift(
w,
a,
y,
deltas,
estimator = c("tmle", "onestep"),
fluctuation = c("standard", "weighted"),
g_learner = NULL,
mu_learner = NULL,
n_folds = 2,
outcome_type = "continuous",
parallel = TRUE,
parallel_type = "multi_session",
num_cores = 2,
seed = seed,
hn_trunc_thresh = 10,
adaptive_delta = FALSE,
top_n = 1,
min_obs = 20,
density_classification = FALSE,
max_depth = 1,
rct = FALSE,
rct_type = c("ate", "incps"),
pval_thresh = 0.1
)A matrix, data.frame, or similar containing a set of
baseline covariates. These variables are measured before exposures.
matrix, data.frame, or similar containing individual or
multiple exposures.
numeric vector of observed outcomes.
A numeric value indicating the shift in exposures to
define the target parameter, with respect to the scale of the exposures (A). If adaptive_delta
is true, these values will be reduced.
The type of estimator to fit: "tmle" (default) for
targeted maximum likelihood estimation, or "onestep" for a one-step estimator.
Method used in the targeting step for TML estimation: "standard" or "weighted". This determines where to place the auxiliary covariate in the logistic tilting regression.
Learners for fitting the exposure mechanism g(A|W) via sl3.
Used to estimate the density ratio for continuous exposures when
density_classification = FALSE.
Learners for fitting Super Learner ensembles to the outcome model via sl3.
Number of folds to use in cross-validation, default is 2.
Data type of the outcome, default is "continuous".
Whether to parallelize across cores (default: TRUE).
Type of parallelization to use if parallel is TRUE: "multi_session" (default), "multicore", or "sequential".
Number of CPU cores to use in parallelization (default: 2).
numeric seed value to be passed to all functions.
Truncation level for the clever covariate (default: 10).
If TRUE, reduces the user-specified delta until the Hn calculated for a shift does not have any observation greater than hn_trunc_thresh (default: FALSE).
top number of effect modifier-exposure pairs to estimate.
Minimum number of observations allowed in a covariate region.
If TRUE, estimate the exposure density ratio via a classification reparameterization rather than direct conditional density estimation (default: FALSE). Continuous-exposure path only.
Maximum depth of the partitioning tree used to discover effect-modification regions (default: 1).
If TRUE, run the randomized-trial workflow for a single binary exposure (estimate the subject-level treatment effect and find the oracle effect-modification region). If FALSE (default), run the mixed-exposure stochastic-shift workflow.
Only used when rct = TRUE. Either "ate" (default),
which targets the subject-level ATE \(Q(1, W) - Q(0, W)\), or "incps",
an incremental propensity-score shift from \(\alpha\) to \(\alpha + \delta\).
p-value threshold for accepting a partition split when discovering effect-modification regions in the RCT workflow (default: 0.1).
An S3 object of class EffectXshift containing the results of the
procedure to compute a TML or one-step estimate of the counterfactual mean
under a modified treatment policy that shifts a continuous-valued exposure
by a scalar amount delta in subregions of the exposure space.
These exposures are data-adaptively identified using the CV-TMLE procedure.