Fit pseudo-outcome regression conditioning on mediator-outcome confounder
Source:R/fit_mechanisms.R
fit_nuisance_u.RdFit pseudo-outcome regression conditioning on mediator-outcome confounder
Usage
fit_nuisance_u(
train_data,
valid_data,
learners,
b_out,
q_out,
r_out,
g_out,
h_out,
w_names
)Arguments
- train_data
A
data.tablecontaining 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 a convenience utility to passing data around to the various core estimation routines and is automatically generated bymedoutcon.- valid_data
A holdout data set, with columns exactly matching those appearing in the preceding argument
data, to be used for estimation via cross-fitting. NOT optional for this nuisance parameter.- learners
Stack, or other learner class (inheriting fromLrnr_base), containing a set of learners from sl3, to be used in fitting a model for this nuisance parameter.- b_out
Output from the internal function for fitting the outcome regression
fit_out_mech.- q_out
Output from the internal function for fitting the mechanism of the intermediate confounder while conditioning on mediators, i.e.,
fit_moc_mech, settingtype = "q".- r_out
Output from the internal function for fitting the mechanism of the intermediate confounder without conditioning on mediators, i.e.,
fit_moc_mech, settingtype = "r".- g_out
Output from the internal function for fitting the treatment mechanism without conditioning on mediators
fit_treat_mech.- h_out
Output from the internal function for fitting the treatment mechanism conditioning on the mediators
fit_treat_mech.- 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.