- data
[data.frame
]
A data.frame
in wide format containing all necessary variables
for the estimation problem. Must not be a data.table
.
- trt
[character
] or [list
]
A vector containing the column names of treatment variables ordered by time.
Or, a list of vectors, the same length as the number of time points of observation.
Vectors should contain column names for the treatment variables at each time point. The list
should be ordered following the time ordering of the model.
- outcomes
[character
]
A vector containing the columns names of intermediate outcome variables and the final
outcome variable ordered by time. Only numeric values are allowed. Variables should be coded as 0 and 1.
- baseline
[character
]
An optional vector containing the column names of baseline covariates to be
included for adjustment at every time point.
- time_vary
[list
]
A list the same length as the number of time points of observation with
the column names for new time-varying covariates introduced at each time point. The list
should be ordered following the time ordering of the model.
- cens
[character
]
An optional vector of column names of censoring indicators the same
length as the number of time points of observation. If missingness in the outcome is
present or if time-to-event outcome, must be provided.
- compete
[character
]
An optional vector of column names of competing risk indicators the same
length as the number of time points of observation.
- shift
[closure
]
A two argument function that specifies how treatment variables should be shifted.
See examples for how to specify shift functions for continuous, binary, and categorical exposures.
- shifted
[data.frame
]
An optional data frame, the same as in data
, but modified according
to the treatment policy of interest. If specified, shift
is ignored.
- estimator
[character(1)
]
The estimator to use. Either "lmtp_tmle"
or "lmtp_sdr"
.
- k
[integer(1)
]
An integer specifying how previous time points should be
used for estimation at the given time point. Default is Inf
,
all time points.
- mtp
[logical(1)
]
Is the intervention of interest a modified treatment policy?
Default is FALSE
. If treatment variables are continuous this should be TRUE
.
- id
[character(1)
]
An optional column name containing cluster level identifiers.
- learners_outcome
[character
]
A vector of SuperLearner
algorithms for estimation
of the outcome regression. Default is "SL.glm"
, a main effects GLM.
- learners_trt
[character
]
A vector of SuperLearner
algorithms for estimation
of the exposure mechanism. Default is "SL.glm"
, a main effects GLM.
Only include candidate learners capable of binary classification.
- folds
[integer(1)
]
The number of folds to be used for cross-fitting.
- weights
[numeric(nrow(data))
]
An optional vector containing sampling weights.
- control
[list()
]
Output of lmtp_control()
.