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,rmap) 

Arguments

formula

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 follow-up time must be in days.

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.

rmap

an optional list to be used if the variables are not organized and named in the same way as in the ratetable object. See details below.

Details

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.

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 given in 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,rmap=list(age=age*365.241),
		ratetable=slopop,data=rdata)

relsurv documentation built on Oct. 18, 2018, 5:04 p.m.