Learn R Programming

survrec (version 1.2-2)

survfitr: Compute a Survival Curve for Recurrent Event Data given a covariate

Description

Computes an estimate of a survival curve for recurrent event data using either the Pea-Strawderman-Hollander, Wang-Chang or MLE Frailty estimators. It also computes the asymptotic standard errors. The resulting object of class "survfitr" is plotted by `plot.survfitr', before it is returned.

Usage

survfitr(formula, data, type="MLEfrailty",...)

Arguments

formula
A formula object. If a formula object is supplied it must have a Survr object as the response on the left of the ~ operator and a term on the right. For a single survival curve the "~1" part of the formula is required.
data
a data frame in wich to interpret the variables named in the formula.
type
a character string specifying the type of survival curve. Possible value are "pena-strawderman-hollander", "wang-chang" or "MLEfrailty". The default is "MLEfrailty". Only the first words are required, e.g "pe","wa","ML"
...
additional arguments passed to the type of estimator.

Value

a survfitr object. Methods defined for survfitr objects are provided for print,plot,lines and summary.

Details

See the help details of psh.fit, wc.fit or mlefrailty depending on the type chosen

References

1. Pea, E.A., Strawderman, R. and Hollander, M. (2001). Nonparametric Estimation with Recurrent Event Data. J. Amer. Statist. Assoc 96, 1299-1315. 2. Wang, M.-C. and Chang, S.-H. (1999). Nonparametric Estimation of a Recurrent Survival Function. J. Amer. Statist. Assoc 94, 146-153.

See Also

print.survfitr,plot.survfitr, lines.survfitr, summary.survfitr, Survr,psh.fit,wc.fit, mlefrailty.fit

Examples

Run this code
  data(colon)
  # fit a pena-strawderman-hollander and plot it
  fit<-survfitr(Survr(hc,time,event)~as.factor(dukes),data=colon,type="pena")
  plot(fit,ylim=c(0,1),xlim=c(0,2000))
  # print the survival estimators
  fit
  summary(fit)

  # fit a MLE Frailty and plot it (in this case do not show s.e.)
  fit<-survfitr(Survr(hc,time,event)~as.factor(dukes),data=colon,type="MLE")
  plot(fit)
  # print the survival estimators
  fit
  summary(fit)

Run the code above in your browser using DataLab