R/estimators.R
est_onestep.Rd
One-step estimator for stochastic interventional (in)direct effects
est_onestep(
data,
contrast,
g_learners,
h_learners,
b_learners,
q_learners,
r_learners,
u_learners,
v_learners,
d_learners,
w_names,
m_names,
y_bounds,
effect_type = c("interventional", "natural"),
svy_weights = NULL,
cv_folds = 5L
)
A data.table
containing the observed data, with columns
in the order specified by the NPSEM (Y, M, R, Z, A, W), with column names
set appropriately based on the input data. Such a structure is merely a
convenience utility to passing data around to the various core estimation
routines and is automatically generated by medoutcon
.
A numeric
double indicating the two values of the
intervention A
to be compared. The default value of NULL
has
no effect, as the value of the argument effect
is instead used to
define the contrasts. To override effect
, provide a numeric
double vector, giving the values of a' and a*, e.g., c(0, 1)
.
A Stack
object, or other learner class
(inheriting from Lrnr_base
), containing instantiated
learners from sl3; used to fit a model for the propensity score.
A Stack
object, or other learner class
(inheriting from Lrnr_base
), containing instantiated
learners from sl3; used to fit a model for a parameterization of the
propensity score that conditions on the mediators.
A Stack
object, or other learner class
(inheriting from Lrnr_base
), containing instantiated
learners from sl3; used to fit a model for the outcome regression.
A Stack
object, or other learner class
(inheriting from Lrnr_base
), containing instantiated
learners from sl3; used to fit a model for a nuisance regression of
the intermediate confounder, conditioning on the treatment and potential
baseline covariates.
A Stack
object, or other learner class
(inheriting from Lrnr_base
), containing instantiated
learners from sl3; used to fit a model for a nuisance regression of
the intermediate confounder, conditioning on the mediators, the treatment,
and potential baseline confounders.
A Stack
object, or other learner class
(inheriting from Lrnr_base
), containing instantiated
learners from sl3; used to fit a pseudo-outcome regression required
for in the efficient influence function.
A Stack
object, or other learner class
(inheriting from Lrnr_base
), containing instantiated
learners from sl3; used to fit a pseudo-outcome regression required
for in the efficient influence function.
A Stack
object, or other learner class
(inheriting from Lrnr_base
), containing instantiated
learners from sl3; used to fit an initial efficient influence
function regression when computing the efficient influence function in a
two-phase sampling design.
A character
vector of the names of the columns that
correspond to baseline covariates (W). The input for this argument is
automatically generated by medoutcon
.
A character
vector of the names of the columns that
correspond to mediators (M). The input for this argument is automatically
generated by medoutcon
.
A numeric
double indicating the minimum and maximum
observed values of the outcome variable Y prior to its being re-scaled to
the unit interval.
A character
indicating whether components of the
interventional or natural (in)direct effects are to be estimated. In the
case of the natural (in)direct effects, estimation of several nuisance
parameters is unnecessary.
A numeric
vector of observation-level weights that
have been computed externally. Such weights are used in the construction of
a re-weighted estimator.
A numeric
integer specifying the number of folds to
be created for cross-validation. Use of cross-validation allows for entropy
conditions on the one-step estimator to be relaxed. For compatibility with
make_folds
, this value specified must be greater
than or equal to 2; the default is to create 5 folds.