rs.surv {relsurv}R Documentation

Compute a Relative Survival Curve

Description

Computes an estimate of the relative survival curve using the Kaplan-Meier method for the observed and the Hakulinen method for the expected survival.

Usage

     rs.surv(formula, data,ratetable=survexp.us,fin.date,method="hakulinen",...) 

Arguments

formula a formula object, with the response as a Surv object on the left of a ~ operator, and, if desired, terms separated by the + operator on the right. If the variables are not organized and named in the same way as in the population tables, a ratetable term must be added to match each subject to his/her expected cohort. For a single survival curve the ~ 1 part of the formula is not required.
NOTE: The time must be in days, and the same is required for the ratetable variables (the variables used in the population tables), for example age and year (year must be given in the date format, i.e. in number of days since 01.01.1960).
data a data.frame in which to interpret the variables named in the formula.
ratetable a table of event rates, organized as a ratetable object, such as survexp.us.
fin.date The date of the study ending, used for calculating the potential follow-up times in the Hakulinen method. If missing, it is calculated as max(year+time).
method The method for calculating the expected survival. The options are hakulinen(default) and conditional, see survexp for details.
... other arguments will be passed to the survfit function that calculates the observed survival.

Details

NOTE: All times used in the formula argument must be specified in days. This is true for the follow-up time as well as for any variables needed ratetable object, like age and year. On the contrary, the int argument requires interval specification in years.

The potential censoring times needed for the calculation of the expected survival by the Hakulinen method are calculated automatically. The times of censoring are left as they are, the times of events are replaced with fin.date - year.

Value

a survfit object; see the help on survfit.object for details. The survfit methods are used for print, plot, lines, and points.

References

package
Pohar M., Stare J. "Relative survival analysis in R." Computer Methods and Programs in Biomedicine, 81: 272-278, 2006.
relative survival
Pohar, M., Stare, J. "Making relative survival analysis relatively easy." Computers in biology and medicine, 37: 1741-1749, 2007.

See Also

survfit, survexp

Examples

data(slopop)
data(rdata)
#calculate the relative survival curve
#note that the variable year is given in days since 01.01.1960 and that 
#age must be multiplied by 365 in order to be expressed in days.
rs.surv(Surv(time,cens)~sex+ratetable(age=age*365,sex=sex,
      year=year),ratetable=slopop,data=rdata)

[Package relsurv version 1.5 Index]