rs.surv | R Documentation |
Computes an estimate of the relative survival curve using the Ederer I, Ederer II method, Pohar-Perme method or the Hakulinen method
rs.surv( formula = formula(data), data = parent.frame(), ratetable = relsurv::slopop, na.action, fin.date, method = "pohar-perme", conf.type = "log", conf.int = 0.95, type = "kaplan-meier", add.times, precision = 1, rmap )
formula |
a formula object, with the response as a NOTE: The follow-up time must be in days. |
data |
a data.frame in which to interpret the variables named in the
|
ratetable |
a table of event rates, organized as a |
na.action |
a missing-data filter function, applied to the model.frame,
after any subset argument has been used. Default is
|
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 |
method |
the method for calculating the relative survival. The options
are |
conf.type |
one of |
conf.int |
the level for a two-sided confidence interval on the survival curve(s). Default is 0.95. |
type |
defines how survival estimates are to be calculated given the
hazards. The default ( |
add.times |
specific times at which the curve should be evaluated. |
precision |
Precision for numerical integration. Default is 1, which means that daily intervals are taken, the value may be decreased to get a higher precision or increased to achieve a faster calculation. The calculation intervals always include at least all times of event and censoring as border points. |
rmap |
an optional list to be used if the variables are not organized
and named in the same way as in the |
NOTE: The follow-up 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.
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.
Numerical integration is required for Pohar-Perme estimate. The integration
precision is set with argument precision
, which defaults to daily
intervals, a default that should give enough precision for any practical
purpose.
Note that even though the estimate is always calculated using numerical
integration, only the values at event and censoring times are reported.
Hence, the function plot
draws a step function in between and the
function summary
reports the value at the last event or censoring
time before the specified time. If the output of the estimated values at
other points is required, this should be specified with argument
add.times
.
a survfit
object; see the help on survfit.object
for
details. The survfit
methods are used for print
,
summary
, plot
, lines
, and points
.
Package: Pohar Perme, M., Pavlic, K. (2018) "Nonparametric Relative Survival Analysis with the R Package relsurv". Journal of Statistical Software. 87(8), 1-27, doi: "10.18637/jss.v087.i08" Theory: Pohar Perme, M., Esteve, J., Rachet, B. (2016) "Analysing Population-Based Cancer Survival - Settling the Controversies." BMC Cancer, 16 (933), 1-8. doi:10.1186/s12885-016-2967-9. Theory: Pohar Perme, M., Stare, J., Esteve, J. (2012) "On Estimation in Relative Survival", Biometrics, 68(1), 113-120. doi:10.1111/j.1541-0420.2011.01640.x.
survfit
, survexp
data(slopop) data(rdata) #calculate the relative survival curve #note that the variable year must be given in a date format and that #age must be multiplied by 365.241 in order to be expressed in days. rs.surv(Surv(time,cens)~sex,rmap=list(age=age*365.241), ratetable=slopop,data=rdata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.