This function calculates stabilized weights for IPW analysis using logistic regression model. Both of untruncated and utruncated weights are provided.
stabwtmulti(formula, data, trunc=c(0.01,0.99), digits=4)Truncated and untruncated stabilized weights are calculated.
sw1: Untruncated stabilized weights.
sw2: Truncated stabilized weights.
An object of class "formula" (or one that can be coerced to that class): a symbolic description of the logistic regression model to be fitted.
A data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model.
Quantiles to be truncated the weights (default: 0.01, 0.99).
Number of decimal places in the output (default: 4).
Cole, S. R., and Hernan, M. A. (2008). Constructing inverse probability weights for marginal structural models. American Journal of Epidemiology 168, 656-664.
Westreich, D., Edwards, J. K., Lesko, C. R., Stuart, E., and Cole, S. R. (2017). Transportability of trial results using inverse odds of sampling weights. American Journal of Epidemiology 186, 1010-1014.