Fit outcome regression
fit_out_mech(
train_data,
valid_data = NULL,
contrast,
learners,
m_names,
w_names
)
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 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 medoutcon
.
A holdout data set, with columns exactly matching those
appearing in the preceding argument data
, to be used for estimation
via cross-fitting. Optional, defaulting to NULL
.
A numeric
double indicating the two values of the
intervention A
to be compared. The default of c(0, 1)
assumes
a binary intervention node A
.
Stack
, or other learner class (inheriting
from Lrnr_base
), containing a set of learners from
sl3, to be used in fitting the outcome regression, i.e., b(A,Z,M,W).
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 character
vector of the names of the columns that
correspond to baseline covariates (W). The input for this argument is
automatically generated by medoutcon
.