One-step estimator for natural and interventional (in)direct effects
Source:R/estimators.R
est_onestep.RdOne-step estimator for natural and interventional (in)direct effects
Arguments
- data
A
data.tablecontaining 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 bymedoutcon.- contrast
A
numericdouble indicating the two values of the interventionAto be compared. The default value ofNULLhas no effect, as the value of the argumenteffectis instead used to define the contrasts. To overrideeffect, provide anumericdouble vector, giving the values of a' and a*, e.g.,c(0, 1).- g_learners
A
Stackobject, or other learner class (inheriting fromLrnr_base), containing instantiated learners from sl3; used to fit a model for the propensity score.- h_learners
A
Stackobject, or other learner class (inheriting fromLrnr_base), containing instantiated learners from sl3; used to fit a model for a parameterization of the propensity score that conditions on the mediators.- b_learners
A
Stackobject, or other learner class (inheriting fromLrnr_base), containing instantiated learners from sl3; used to fit a model for the outcome regression.- q_learners
A
Stackobject, or other learner class (inheriting fromLrnr_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.- r_learners
A
Stackobject, or other learner class (inheriting fromLrnr_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.- u_learners
A
Stackobject, or other learner class (inheriting fromLrnr_base), containing instantiated learners from sl3; used to fit a pseudo-outcome regression required for in the efficient influence function.- v_learners
A
Stackobject, or other learner class (inheriting fromLrnr_base), containing instantiated learners from sl3; used to fit a pseudo-outcome regression required for in the efficient influence function.- d_learners
A
Stackobject, or other learner class (inheriting fromLrnr_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.- w_names
A
charactervector of the names of the columns that correspond to baseline covariates (W). The input for this argument is automatically generated bymedoutcon.- m_names
A
charactervector of the names of the columns that correspond to mediators (M). The input for this argument is automatically generated bymedoutcon.- y_bounds
A
numericdouble indicating the minimum and maximum observed values of the outcome variable Y prior to its being re-scaled to the unit interval.- g_bounds
A
numericvector containing two values, the first being the minimum allowable estimated propensity score value and the second being the maximum allowable for estimated propensity score value.- effect_type
A
characterindicating 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.- svy_weights
A
numericvector of observation-level weights that have been computed externally. Such weights are used in the construction of a re-weighted estimator.- cv_folds
A
numericinteger 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 withmake_folds, this value specified must be greater than or equal to 2; the default is to create 5 folds.- cv_strat
A
logicalatomic vector indicating whether V-fold cross-validation should stratify the folds based on the outcome variable. IfTRUE, the folds are stratified by passing the outcome variable to thestrata_idsargument ofmake_folds. While the default isFALSE, an override is triggered when the incidence of the binary outcome variable falls below the tolerance instrat_pmin.- strat_pmin
A
numericatomic vector indicating a tolerance for the minimum proportion of cases (for a binary outcome variable) below which stratified V-fold cross-validation is invoked ifcv_stratis set toTRUE(default isFALSE). The default tolerance is 0.1.