- outcome
The outcome variable. Missing data will result in a stopping
error.
- blip.mod
A list of formula objects specifying covariates of the
blip function for each stage in order. No dependent variable should be
specified. Note that this input should include the treatment variable
ONLY if the blip model is quadratic in treatment. See Details for further
clarification.
- treat.mod
A list of formula objects specifying the treatment model for
each stage in order. Treatment variable should be included as the dependent
variable. If treatment is binary glm(family = binomial)
will be
used to obtain parameter estimates; if treatment is multi-nomial,
multinom()
will be used to obtain parameter estimates; and if
treatment is continuous, lm()
will be used.
- tf.mod
A list of formula objects specifying covariates of the
treatment-free model for each stage in order. No dependent variable should
be specified.
- data
A data frame containing all necessary covariates and treatments
contained in the models. Missing data should be coded as NA
.
- method
The DTR method to be used, choose "dwols" for dynamic WOLS,
"gest" for G-estimation, or "qlearn" for Q-learning.
- treat.type
A character object. Must be one of {"bin", "multi", "cont"}
indicating that the treatments at each stage are binary, multinomial,
or continuous, respectively. Each stage must have the same treatment type.
- treat.fam
A character or family object.
The description of the dose distribution along with the link
function to be used in the treatment model for computing weights; should be
specified in a similar format as that used in glm()
.
If character object, must be one of {"gaussian", "Gamma"}, for which
gaussian(link = "identity")
or
Gamma(link = "log")
will be used,
respectively. Input is ignored for treat.type = "bin"
and
treat.type = "multi"
.
- weight
The form of the treatment weight. See details.
- n.bins
An integer object. The number of bins (levels) to be used for
categorizing continuous doses. This input is required only when
treat.type = "cont"
and weight = "wo"
or weight = "qpom"
.
- treat.wgt.man
NULL or a list of vectors of known treatment weights can be
specified to be used instead of hard-coded treatment weight options.
The \(i^{th}\) element of the list contains the multiplicative weights
for the \(i^{th}\) stage. Each vector must be of length \(n\),
the number of participants. Used only for method = "dwols"
.
- treat.range
For continuous treatments. Specify the maximum/minimum
value that treatments can be take. If unspecified then the minimum/maximum
value of observed treatments is used. If you wish to have unrestricted
treatments set this option to c(-Inf, +Inf)
. If each stage has its own
range, provide as a list, the ith element providing the min and max
for the ith stage treatment.
- missing
A character object. Must be one of {"drop", "ipw"}.
If set to "ipw" and covariate or treatment data are missing then inverse
probability
weights are used. The complete case probability is estimated
via logistic regression. If set to "drop" and data are missing, participants
with missing data are dropped for all stage analyses.
- missing.mod
An optional list of formula objects specifying the model
for the inverse probability of weights for each stage in order.
No dependent variable should be specified. If missing = "ipw"
and
missing.mod = NULL
, then the models are assumed to be linear comprising
the full covariate history derived from all of the previous stage models.
- B1
Number of first-level bootstrap resamples.
- B2
Number of second-level bootstrap resamples.