Description Usage Arguments Value Note Examples

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`

.

1 2 |

`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`

1 2 3 4 5 6 7 8 9 | ```
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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.