Learn R Programming

relsurv (version 1.0)

rstrans: Fit Cox Proportional Hazards Model in Transformed Time

Description

The function transforms each person's time to his/her probability of dying at that time according to the ratetable. It then fits the Cox proportional hazards model with the transformed times as a response. A possible side effect are the transformed times.

Usage

rstrans(formula, data, ratetable, int,na.action,init,control,...)

Arguments

formula
a formula object, with the response on the left of a ~ operator, and the terms on the right. The terms consist of predictor variables separated by the + operator, along with a ratetable term. The ratetable
data
a data.frame in which to interpret the variables named in the formula.
ratetable
a table of event rates, such as survexp.us.
int
the number of follow-up years used for calculating survival(the rest is censored). If missing, it is set the the maximum observed follow-up time.
na.action
a missing-data filter function, applied to the model.frame, after any subset argument has been used. Default is options()$na.action.
init
vector of initial values of the iteration. Default initial value is zero for all variables.
control
a list of parameters for controlling the fitting process. See the documentation for coxph.control for details.
...
other arguments will be passed to coxph.control.

Value

  • an object of class coxph. See coxph.object and coxph.detail for details.
  • yan object of class Surv containing the transformed times.

References

Stare J., Henderson R., Pohar M. "An individual measure for Relative Survival." Journal of the Royal Statistical Society: Series C , 54 115-126, 2005.

See Also

rsmul, invtime, rsadd, survexp.

Examples

Run this code
data(slopop)
data(rdata)
rstrans(Surv(time,cens)~sex+as.factor(agegr)+ratetable(age=age*365.24,sex=sex,year=year),ratetable=slopop,data=rdata)

Run the code above in your browser using DataLab