Description
Usage
Arguments
Details
Value
View source: R/fit_mechanisms.R
Estimate the Outcome Regression
 (
Y,
A,
W,
delta = 0,
ipc_weights = (1, (Y)),
fit_type = ("sl", "glm"),
glm_formula = "Y ~ .",
sl_learners =
)

Y 
A numeric vector of observed outcomes.

A 
A numeric vector of observed treatment values.

W 
A numeric matrix of observed baseline covariate values.

delta 
A numeric indicating the magnitude of the shift to be
computed for the treatment A . This is passed to the internal
shift_additive and is currently limited to additive shifts.

ipc_weights 
A numeric vector of observationlevel weights, as
produced by the internal procedure to estimate the censoring mechanism.

fit_type 
A character indicating whether to use GLMs or Super
Learner to fit the outcome regression. If the option "glm" is selected, the
argument glm_formula must NOT be NULL , instead containing a
model formula (as per glm ) as a character . If
the option "sl" is selected, the argument sl_learners must NOT be
NULL ; instead, an instantiated Lrnr_sl object,
specifying learners and a metalearner for the Super Learner fit, must be
provided. Consult the documentation of sl3 for details.

glm_formula 
A character corresponding to a formula to
be used in fitting a generalized linear model via glm .

sl_learners 
Object containing a set of instantiated learners from the
sl3, to be used in fitting an ensemble model.

Compute the outcome regression for the observed data, including
with the shift imposed by the intervention. This returns the propensity
score for the observed data (at A_i) and the shift (at A_i  delta).
A data.table
with two columns, containing estimates of the
outcome mechanism at the natural value of the exposure Q(A, W) and an
upshift of the exposure Q(A + delta, W).
txshift documentation built on Oct. 23, 2020, 8:27 p.m.