This function allows users to get the benefits of a weightit object when using weights not estimated with weightit() or weightitMSM(). These benefits include diagnostics, plots, and direct compatibility with cobalt for assessing balance.
required; a numeric vector of weights, one for each unit.
treat
required; a vector of treatment statuses, one for each unit.
covs
an optional data.frame of covariates. For using WeightIt functions, this is not necessary, but for use with cobalt it is.
estimand
an optional character of length 1 giving the estimand. The text is not checked.
s.weights
an optional numeric vector of sampling weights, one for each unit.
ps
an optional numeric vector of propensity scores, one for each unit.
treat.list
a list of treatment statuses at each time point..
covs.list
an optional list of data.frames of covariates of covariates at each time point. For using WeightIt functions, this is not necessary, but for use with cobalt it is.
ps.list
an optional list of numeric vectors of propensity scores at each time point.
...
additional arguments. These must be named. They will be included in the output object.
Value
An object of class weightit (for as.weightit) or weightitMSM (for as.weightitMSM).