rstrans  R Documentation 
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. It can also be used for calculatin the transformed times (no covariates are needed in the formula for that purpose).
rstrans(formula, data, ratetable, int,na.action,init,control,rmap,...)
formula 
a formula object, with the response as a NOTE: The followup time must be in days. 
data 
a data.frame in which to interpret the variables named
in the 
ratetable 
a table of event rates, such as 
int 
the number of followup years used for calculating survival(the rest is censored). If missing, it is set the the maximum observed followup time. 
na.action 
a missingdata filter function, applied to the model.frame,
after any subset argument has been used. Default is

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 
rmap 
an optional list to be used if the variables are not
organized and named in the same way as in the 
... 
other arguments will be passed to 
NOTE: The followup time must be specified in days. The ratetable
being used may have different variable names and formats than the user's data set, this is dealt with by the rmap
argument. For example, if age is in years in the data set but in days in the ratetable
object, age=age*365.241 should be used. The calendar year can be in any date format (date, Date and POSIXt are allowed), the date formats in the ratetable
and in the data may differ.
A side product of this function are the transformed times  stored in teh y
object of the output. To get these times, covariates are of course irrelevant.
an object of class coxph
. See coxph.object
and coxph.detail
for details.
y 
an object of class 
Method: Stare J., Henderson R., Pohar M. (2005) "An individual measure for relative survival." Journal of the Royal Statistical Society: Series C, 54 115–126.
Package. Pohar M., Stare J. (2006) "Relative survival analysis in R." Computer Methods and Programs in Biomedicine, 81: 272–278
Relative survival: Pohar, M., Stare, J. (2007) "Making relative survival analysis relatively easy." Computers in biology and medicine, 37: 1741–1749.
rsmul
, invtime
, rsadd
, survexp
.
data(slopop) data(rdata) #fit a Cox model using the transformed times #note that the variable year is given in days since 01.01.1960 and that #age must be multiplied by 365.241 in order to be expressed in days. fit < rstrans(Surv(time,cens)~sex+as.factor(agegr),rmap=list(age=age*365.241, sex=sex,year=year),ratetable=slopop,data=rdata) #check the goodness of fit rs.br(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.