transrate: Reorganize Data into a Ratetable Object

Description Usage Arguments Details Value References See Also Examples

View source: R/Rcode.r

Description

The function assists in reorganizing certain types of data into a ratetable object.

Usage

1
transrate(men,women,yearlim,int.length=1)

Arguments

men

a matrix containing the yearly (conditional) probabilities of one year survival for men. Rows represent age (increasing 1 year per line,starting with 0), the columns represent cohort years (the limits are in yearlim, the increase is in int.length.

women

a matrix containing the yearly (conditional) probabilities of one year survival for women.

yearlim

the first and last cohort year given in the tables.

int.length

the length of intervals in which cohort years are given.

Details

This function only applies for ratetables that are organized by age, sex and year.

Value

An object of class ratetable.

References

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.

See Also

ratetable.

Examples

1
2
3
men <- cbind(exp(-365.241*exp(-14.5+.08*(0:100))),exp(-365*exp(-14.7+.085*(0:100))))
women <- cbind(exp(-365.241*exp(-15.5+.085*(0:100))),exp(-365*exp(-15.7+.09*(0:100))))
table <- transrate(men,women,yearlim=c(1980,1990),int.length=10)

Example output

Loading required package: survival
Loading required package: splines
Loading required package: date

relsurv documentation built on Aug. 28, 2018, 9:04 a.m.

Related to transrate in relsurv...