prop_to_survive {actLifer}R Documentation

Proportion to Survive to Age x

Description

Adds a new column called PropToSurvive to the dataset that was input. PropToSurvive is the proportion surviving to age x

Usage

prop_to_survive(data, age, pop, deaths)

Arguments

data

The mortality dataset, includes an age grouping variable,

age

The age grouping variable, must be categorical

pop

Population of each age group, must be numeric

deaths

The midyear number of deaths at each age group, must be numeric

Value

Data frame that was input with columns for steps up to proportion surviving to age x included. That is, the original data with the following added columns: ConditionalProbDeath, ConditionalProbLife, NumberToSurvive, PropToSurvive

Examples

# This function will add the ConditionalProbDeath, ConditionalProbLife,
# NumberToSbrvivem and PropToSurvive columns to the dataset
prop_to_survive(mortality2, "age_group", "population", "deaths")

[Package actLifer version 1.0.0 Index]