rsdiff: Test Net Survival Curve Differences

Description Usage Arguments Details Value References See Also Examples

Description

Tests if there is a difference between two or more net survival curves using a log-rank type test.

Usage

1
     rs.diff(formula, data, ratetable = relsurv::slopop, na.action,precision=1) 

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. A formula expression as for other survival models, of the form Surv(time, status) ~ predictors. Each combination of predictor values defines a subgroup. A strata term may be used to produce a stratified test.

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 slopop.

na.action

a missing-data filter function, applied to the model.frame, after any subset argument has been used. Default is options()$na.action.

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.

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.

Value

a rsdiff object; can be printed with print.

References

Graffeo, N., Castell, F., Belot, A. and Giorgi, R. (2016) "A log-rank-type test to compare net survival distributions. Biometrics. doi: 10.1111/biom.12477" Pavlic, K., Pohar Perme, M. (2017) "On comparison of net survival curves. BMC Med Res Meth. doi: 10.1186/s12874-017-0351-3"

See Also

rs.surv, survdiff

Examples

1
2
3
4
5
6
7
data(slopop)
data(rdata)
#calculate the relative survival curve
#note that the variable year is in the date format - the number of days since 01.01.1960 and that 
#age must be multiplied by 365.241 in order to be expressed in days.
rs.diff(Surv(time,cens)~sex+ratetable(age=age*365.241,sex=sex,
      year=year),ratetable=slopop,data=rdata)

relsurv documentation built on April 5, 2018, 5:07 p.m.

Related to rsdiff in relsurv...