CBMSM.fit {CBPS}R Documentation

CBMSM.fit

Description

CBMSM.fit

Usage

CBMSM.fit(treat, X, id, time, MultiBin.fit, twostep, msm.variance,
  time.vary, init, ...)

Arguments

treat

A vector of treatment assignments. For N observations over T time periods, the length of treat should be N*T.

X

A covariate matrix. For N observations over T time periods, X should have N*T rows.

id

A vector which identifies the unit associated with each row of treat and X.

time

A vector which identifies the time period associated with each row of treat and X.

MultiBin.fit

A parameter for whether the multiple binary treatments occur concurrently (FALSE) or over consecutive time periods (TRUE) as in a marginal structural model. Setting type = "MultiBin" when calling CBMSM will set MultiBin.fit to TRUE when CBMSM.fit is called.

twostep

Set to TRUE to use a two-step estimator, which will run substantially faster than continuous-updating. Default is FALSE, which uses the continuous-updating estimator described by Imai and Ratkovic (2014).

msm.variance

Default is FALSE, which uses the low-rank approximation of the variance described in Imai and Ratkovic (2014). Set to TRUE to use the full variance matrix.

time.vary

Default is FALSE, which uses the same coefficients across time period. Set to TRUE to fit one set per time period.

init

Default is "opt", which uses CBPS and logistic regression starting values, and chooses the one that achieves the best balance. Other options are "glm" and "CBPS"

...

Other parameters to be passed through to optim()


[Package CBPS version 0.22 Index]