Learn R Programming

mets (version 0.1-8)

ipw: Inverse Probability of Censoring Weights

Description

Calculates Inverse Probability of Censoring Weights (IPCW) and adds them to a data.frame

Usage

ipw(formula, data, cluster, samecens = FALSE,
    obsonly = TRUE, weightname = "w", pairs = FALSE)

Arguments

formula
Formula specifying the censoring model
data
data frame
cluster
clustering variable
samecens
For clustered data, should same censoring be assumed (bivariate probability calculated as mininum of the marginal probabilities)
obsonly
Return data with uncensored observations only
weightname
Name of weight variable in the new data.frame
pairs
For paired data (e.g. twins) only the complete pairs are returned (With pairs=TRUE)