Learn R Programming

rqlm (version 4.2-1)

stabwtmulti: Calculating stabilized weights for IPW analysis: Single time point (for more than 3 groups)

Description

This function calculates stabilized weights for IPW analysis using logistic regression model. Both of untruncated and utruncated weights are provided.

Usage

stabwtmulti(formula, data, trunc=c(0.01,0.99), digits=4)

Value

Truncated and untruncated stabilized weights are calculated.

  • sw1: Untruncated stabilized weights.

  • sw2: Truncated stabilized weights.

Arguments

formula

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.

data

A data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model.

trunc

Quantiles to be truncated the weights (default: 0.01, 0.99).

digits

Number of decimal places in the output (default: 4).

References

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.