survey (version 3.9-1)

svycoxph: Survey-weighted Cox models.

Description

Fit a proportional hazards model to data from a complex survey design, with inverse-probability weighting and with standard errors corrected for cluster sampling.

Usage

svycoxph(formula, design,subset=NULL, ...)

Arguments

formula
Model formula. Any cluster() terms will be ignored.
design
survey.design object. Must contain all variables in the formula
subset
Expression to select a subpopulation
...
Other arguments passed to coxph.

Value

  • An object of class svycoxph.

Details

The main difference between this function and the robust=TRUE option to coxph in the survival package is that this function accounts for the reduction in variance from stratified sampling and the increase in variance from having only a small number of clusters.

Note that strata terms in the model formula describe subsets that have a separate baseline hazard function and need not have anything to do with the stratification of the sampling.

References

Binder DA. (1992) Fitting Cox's proportional hazards models from survey data. Biometrika 79: 139-147

See Also

svydesign, coxph, svyCprod

Examples

Run this code
## Somewhat unrealistic example of nonresponse bias.
data(pbc, package="survival")

biasmodel<-glm(I(trt>0)~age*edema,data=pbc)
pbc$randprob<-fitted(biasmodel)

dpbc<-svydesign(id=~1, prob=~randprob, strata=~edema, data=subset(pbc,trt>0))
rpbc<-as.svrepdesign(dpbc)

svycoxph(Surv(time,status)~log(bili)+protime+alb,design=dpbc)

svycoxph(Surv(time,status)~log(bili)+protime+alb,design=rpbc)

Run the code above in your browser using DataLab