Skip to contents

Create vitals

Functions for creating vital objects

vital()
Create a vital object
as_vital()
Coerce to a vital object
vital_vars()
Return vital variables
read_hmd()
Read data directly from HMD and construct a vital object for use in other functions
read_hmd_files()
Read data from files downloaded from HMD and construct a vital object for use in other functions
read_hfd()
Read data directly from HFD and construct a vital object for use in other functions
read_hfd_files()
Read data from files downloaded from HFD and construct a vital object for use in other functions
net_migration()
Calculate net migration from a vital object

Data

Data sets included in the package

aus_mortality
Australian mortality data
aus_fertility
Australian fertility data
norway_births norway_fertility norway_mortality
Norwegian mortality and births data

Computing with vitals

Functions for computing on vital objects

collapse_ages()
Collapse upper ages into a single age group. Counts are summed while rates are recomputed where possible.
life_table()
Compute period life tables from age-specific mortality rates
life_expectancy()
Compute life expectancy from age-specific mortality rates
total_fertility_rate()
Compute total fertility rate from age-specific fertility rates

Smoothing

Functions for smoothing vital objects

Modelling

Functions for fitting models to vitals

model(<vital>)
Estimate models for vital data
FDM()
Functional data model
FMEAN()
Functional mean model
FNAIVE()
Functional naive model
LC()
Lee-Carter model

Coherent models

Functions for handling coherent models

make_pr()
Do a product/ratio transformation
make_sd()
Do a sum/difference transformation
undo_pr()
Undo a product/ratio transformation
undo_sd()
Undo a mean/difference transformation

Methods for vital models

Functions that work with vital mables

forecast(<FDM>) forecast(<LC>) forecast(<FMEAN>) forecast(<FNAIVE>) forecast(<mdl_vtl_df>)
Produce forecasts from a vital model
generate(<mdl_vtl_df>)
Generate responses from a mable
interpolate(<mdl_vtl_df>)
Interpolate missing values using a vital model
age_components()
Extract age components from a model
time_components()
Extract time components from a model

Graphics

Plotting functions for visualizing data and models

autoplot(<mdl_vtl_df>)
Plot output from a vital model
autoplot(<fbl_vtl_ts>)
Plot forecasts from a vital model
autoplot(<vital>)
Rainbow plot of demographic data against age

Re-exports

Exports from other packages