conditional_death_prob {actLifer} | R Documentation |
Conditional Probability of Death at Age x
Description
Adds a new column called ConditionalProbDeath to the dataset that was input. This column represents the probability of death given the age group for each age group. In other words, the probability a person in a given age group will die before their next birthday.
Usage
conditional_death_prob(data, age, pop, deaths)
Arguments
data |
The mortality dataset, includes an age grouping variable |
age |
The age grouping variable, must be cateogrical |
pop |
Population of each age group, must be numeric |
deaths |
The number of deaths at each age group, must be numeric |
Value
Data frame that was input with an added column, ConditionalProbDeath.
Examples
# This function will add a ConditionalProbDeath column to the dataset
conditional_death_prob(mortality2, "age_group", "population", "deaths")
[Package actLifer version 1.0.0 Index]