svysurvreg {survey} R Documentation

## Fit accelerated failure models to survey data

### Description

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.

### Usage

## S3 method for class 'survey.design'
svysurvreg(formula, design, weights=NULL, subset=NULL, ...)


### Arguments

 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 survreg

### Value

Object of class svysurvreg, with the same structure as a survreg object but with NA for the loglikelihood.

### Note

The residuals method is identical to that for survreg objects except the weighted option defaults to TRUE

### Examples


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)



[Package survey version 4.1-1 Index]