transrate.hld | R Documentation |
The function assists in reorganizing the .txt files obtained from Human Life-Table Database (http://www.lifetable.de -> Data by Country) into a ratetable object.
transrate.hld(file, cut.year, race)
file |
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. |
cut.year |
a vector of cutpoints for years. Must be specified when the year spans in the files are not consecutive. |
race |
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.
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", "NZL_1980-82_Maori.txt","NZL_1985-87_Maori.txt"), cut.year=c(1980,1985),race=rep(c("nonmaori","maori"),each=2)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.