Learn R Programming

⚠️There's a newer version (2.0) of this package.Take me there.

#demography

The R package demography provides functions for demographic analysis including: lifetable calculations; Lee-Carter modelling; functional data analysis of mortality rates, fertility rates, net migration numbers; and stochastic population forecasting.

Installation

You can install the stable version on R CRAN.

install.packages('demography', dependencies = TRUE)

You can also install the development version from Github

# install.packages("devtools")
library(devtools)
install_github("demography", "robjhyndman") 

License

This package is free and open source software, licensed under GPL (>= 2).

Copy Link

Version

Install

install.packages('demography')

Monthly Downloads

2,160

Version

1.18

License

GPL (>= 2)

Maintainer

Rob Hyndman

Last Published

September 15th, 2014

Functions in demography (1.18)

lifetable

Construct lifetables from mortality rates
plot.demogdata

Plot age-specific demographic functions
demography-package

Forecasting mortality and fertility data
life.expectancy

Estimate life expectancy from mortality rates
forecast.lca

Forecast demogdata data using Lee-Carter method.
compare.demogdata

Evaluation of demographic forecast accuracy
mean.demogdata

Mean and median functions for data of class demogdata
fdm

Functional demographic model
isfe

Integrated Squared Forecast Error for models of various orders
forecast.fdm

Forecast functional demographic model.
fr.mort

French mortality data
pop.sim

Population simulation
hmd.mx

Read demographic data from the Human Mortality Database
update.fmforecast

Updating functional demographic models and coherent functional demographic models.
plot.errorfdm

Plot differences between actuals and estimates from fitted demographic model
lca

Model mortality or fertility data using Lee-Carter approach
aus.fert

Australian fertility data
netmigration

Calculate net migration from mortality and fertility data
plot.lifetable

Plot life expectancy from lifetable
set.upperage

Combine the upperages of a demogdata object.
simulate.fmforecast

Simulate future sample paths from functional demographic model forecasts.
extract.years

Extract some years from a demogdata object
summary.fdm

Summary for functional demographic model or Lee-Carter model
models

Show model information for the forecast coefficients in FDM models.
median

Median
demogdata

Create demogdata object from raw data matrices
read.demogdata

Read demographic data and construct demogdata object
extract.ages

Extract some ages from a demogdata object
combine.demogdata

Combine two demogdata objects into one demogdata object
cm.spline

Monotonic interpolating splines
forecast.fdmpr

Forecast coherent functional demographic model.
smooth.demogdata

Create smooth demogdata functions
residuals.fdm

Compute residuals and fitted values from functional demographic model or Lee-Carter model
sex.ratio

Compute sex ratios from mortality rates
tfr

Compute total fertility rate from fertility rates
coherentfdm

Coherent functional demographic model for grouped data
plot.fmforecast

Plot forecasts from a functional demographic modell