rs.surv(formula, data,ratetable=survexp.us,na.action,fin.date,
method="pohar-perme",conf.type="log",conf.int=0.95,type="kaplan-meier")
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 formula
.ratetable
object,
such as survexp.us
.options()$na.action
.max(year+time)
.pohar-perme
(default), ederer
and hakulinen
.plain
, log
(the default), or log-log
. The first option causes the standard intervals curve +- k *se(curve), where k is determined from conf.int. The
log option calculates intervals based on the cumulative hazkaplan-meier
)
calculates the product integral, whereas the option fleming-harrington
exponentiates the negative cumulative hazard. Analogous tosurvfit
object; see the help on survfit.object
for details.
The survfit
methods are used for print
,
plot
, lines
, and points
.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
.
The calculation of the Pohar-Perme estimate is more time consuming since more data are needed from the population tables.
The old version of the function, now named rs.survo
can be used as a faster version for the Hakulinen and Ederer II estimate.survfit
,
survexp
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)
Run the code above in your browser using DataLab