svycoxph               package:survey               R Documentation

_S_u_r_v_e_y-_w_e_i_g_h_t_e_d _C_o_x _m_o_d_e_l_s.

_D_e_s_c_r_i_p_t_i_o_n:

     Fit a proportional hazards model to data from a complex survey
     design.

_U_s_a_g_e:

     svycoxph(formula, design,subset=NULL, ...)
     ## S3 method for class 'svycoxph':
     predict(object, newdata, se=FALSE,
         type=c("lp", "risk", "expected", "terms","curve"),...)

_A_r_g_u_m_e_n_t_s:

 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

  object: A 'svycoxph' object

 newdata: New data for prediction

      se: Compute standard errors? This takes a lot of memory for
          'type="curve"'

    type: "curve" does predicted survival curves. The other values are
          passed to 'predict.coxph()'

     ...: Other arguments passed to 'coxph'. 

_D_e_t_a_i_l_s:

     The main difference between 'svycoxph' 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.

     The standard errors for predicted survival curves are available
     only by linearization, not by replicate weights (at the moment).
     Use 'withReplicates' to get standard errors with replicate
     weights. Predicted survival curves are not available for
     stratified Cox models.

     The standard errors use the delta-method approach of Williams
     (1995) for the Nelson-Aalen estimator, modified to handle the Cox
     model following Tsiatis (1981). The standard errors agree closely
     with 'survfit.coxph' for independent sampling when the model fits
     well, but are larger when the model fits poorly.

_V_a_l_u_e:

     An object of class 'svycoxph' for 'svycoxph', an object of class
     'svykm' or 'svykmlist' for 'predict(,type="curve")'.

_W_a_r_n_i_n_g:

     The standard error calculation for survival curves uses memory
     proportional to the sample size times the square of the number of
     events.

_A_u_t_h_o_r(_s):

     Thomas Lumley

_R_e_f_e_r_e_n_c_e_s:

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

     Tsiatis AA (1981) A Large Sample Study of Cox's Regression Model.
     Annals of Statistics 9(1) 93-108

     Williams RL (1995) "Product-Limit Survival Functions with
     Correlated  Survival Times" Lifetime Data Analysis 1: 171-186

_S_e_e _A_l_s_o:

     'coxph', 'predict.coxph'

     'svykm' for estimation of Kaplan-Meier survival curves and for
     methods that operate on survival curves.

_E_x_a_m_p_l_e_s:

     ## 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)

     (model<-svycoxph(Surv(time,status>0)~log(bili)+protime+albumin,design=dpbc))

     svycoxph(Surv(time,status>0)~log(bili)+protime+albumin,design=rpbc)

     s<-predict(model,se=TRUE, type="curve",
          newdata=data.frame(bili=c(3,9), protime=c(10,10), albumin=c(3.5,3.5)))
     plot(s[[1]],ci=TRUE,col="sienna")
     lines(s[[2]], ci=TRUE,col="royalblue")
     quantile(s[[1]], ci=TRUE)
     confint(s[[2]], parm=365*(1:5))

