transrate.hld: Reorganize Data obtained from Human Life-Table Database into...

View source: R/Rcode.r

transrate.hldR Documentation

Reorganize Data obtained from Human Life-Table Database into a Ratetable Object


The function assists in reorganizing the .txt files obtained from Human Life-Table Database ( -> Data by Country) into a ratetable object.


transrate.hld(file, cut.year, race)



a vector of file names which the data are to be read from. Must be in .tex format and in the same format as the files in Human Life-Table Database.


a vector of cutpoints for years. Must be specified when the year spans in the files are not consecutive.


a vector of race names for the input files.


This function works with any table organised in the format provided by the Human Life-Table Database, but currently only works with TypeLT 1 (i.e. age intervals of length 1). The age must always start with value 0, but can end at different values (when that happens, the last value is carried forward). The rates between the cutpoints are taken to be constant.


An object of class ratetable.


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, transrate.hmd, joinrate, transrate.


## Not run: 
finpop <- transrate.hld(c("FIN_1981-85.txt","FIN_1986-90.txt","FIN_1991-95.txt"))

## End(Not run)
## Not run: 
nzpop <- transrate.hld(c("NZL_1980-82_Non-maori.txt","NZL_1985-87_Non-maori.txt",

## End(Not run)

relsurv documentation built on Dec. 28, 2022, 2:25 a.m.