svycoxph {survey} | R Documentation |
Fit a proportional hazards model to data from a complex survey design, with inverse-probability weighting and with standard errors corrected for cluster sampling.
svycoxph(formula, design,subset=NULL, ...)
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 . |
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.
An object of class svycoxph
.
Thomas Lumley
Binder DA. (1992) Fitting Cox's proportional hazards models from survey data. Biometrika 79: 139-147
## Somewhat unrealistic example of nonresponse bias. data(pbc, package="survival") pbc$randomized<-with(pbc, !is.na(trt) & trt>0) biasmodel<-glm(randomized~age*edema,data=pbc,family=binomial) pbc$randprob<-fitted(biasmodel) if (is.null(pbc$albumin)) pbc$albumin<-pbc$alb ##pre2.9.0 dpbc<-svydesign(id=~1, prob=~randprob, strata=~edema, data=subset(pbc,randomized)) rpbc<-as.svrepdesign(dpbc) svycoxph(Surv(time,status>0)~log(bili)+protime+albumin,design=dpbc) svycoxph(Surv(time,status>0)~log(bili)+protime+albumin,design=rpbc)