get_mortality_from_file: Get the mortality rate values from reading a file

Description Usage Arguments Details Value Examples

View source: R/2a_parameter_estimation_functions.R

Description

Get the mortality rate values from reading a file

Usage

1
get_mortality_from_file(paramfile, age, mortality_colname, gender = NULL)

Arguments

paramfile

parameter file to get the mortality eg.national life table data

age

age to get the age specific data

mortality_colname

column name with the mortality rates if it is not gender specific

gender

gender details to get the gender specific mortality data

Details

Provides the mortality rates as age and gender dependent Assumes the data contains mortality rate for single year and once it extracted per gender will retrieve single value Age column can consists of range of values, or a particular value also assumes that the mortality rate for each gender is listed under the gender column for gender specific values. if the mortality is not gender specific, the column name should be passed on to the function if gender is not null, mortality_name will be ignored

Value

the paramvalue

Examples

1
2
3
4
5
paramfile <- system.file("extdata", "LifeTable_USA_Mx_2015.csv",
  package = "packDAMipd"
)
a <- get_mortality_from_file(paramfile, age = 10, mortality_colname =
"total", gender = NULL)

packDAMipd documentation built on March 3, 2021, 5:07 p.m.