central_death_rate {actLifer}R Documentation

Central Death Rate

Description

Adds a new column called CentralDeathRate to the dataset that was input. This column represents the central death rate of each age group - deaths/population.

Usage

central_death_rate(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 an added CentralDeathRate column.

Examples

# This function adds a CentralDeathRate column to the dataset
central_death_rate(mortality2, "age_group", "population", "deaths")

[Package actLifer version 1.0.0 Index]