Fit accelerated failure models to survey data
This function calls survreg
from the 'survival' package to fit accelerated failure (accelerated life) models to complex survey data, and then computes correct standard errors by linearisation. It has the same arguments as survreg
, except that the second argument is design
rather than data
.
## S3 method for class 'survey.design' svysurvreg(formula, design, weights=NULL, subset=NULL, ...)
formula |
Model formula |
design |
Survey design object, including two-phase designs |
weights |
Additional weights to multiply by the sampling weights. No, I don't know why you'd want to do that. |
subset |
subset to use in fitting (if needed) |
... |
Other arguments of |
Object of class svysurvreg
, with the same structure as a survreg
object but with NA
for the loglikelihood.
The residuals
method is identical to that for survreg
objects except the weighted
option defaults to TRUE
data(pbc, package="survival") pbc$randomized <- with(pbc, !is.na(trt) & trt>0) biasmodel<-glm(randomized~age*edema,data=pbc) pbc$randprob<-fitted(biasmodel) dpbc<-svydesign(id=~1, prob=~randprob, strata=~edema, data=subset(pbc,randomized)) model <- svysurvreg(Surv(time, status>0)~bili+protime+albumin, design=dpbc, dist="weibull") summary(model)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.