apc_2.0.0-package: Age-period-cohort analysis

Description Details Author(s) References See Also Examples

Description

The package includes functions for age-period-cohort analysis. The statistical model is a generalized linear model (GLM) allowing for age, period and cohort factors, or a sub-set of the factors. The canonical parametrisation of Kuang, Nielsen and Nielsen (2008a) is used. The outline of an analysis is described below.

Details

Package: apc
Type: Package
Version: 2.0.0
Date: 2020-09-28
License: GPL-3

The apc package uses the canonical parameters suggested by Kuang, Nielsen and Nielsen (2008a) and generalized by Nielsen (2014). These evolve around the second differences of age, period and cohort factors as well as an three parameters (level and two slopes) for a linear plane. The age, period and cohort factors themselves are not identifiable. They could be ad hoc identified by associating the levels and two slopes to the age, period and cohort factors in a particular way. This should be done with great care as such ad hoc identification easily masks which information is coming from the data and which information is coming from the choice of ad hoc identification scheme. An illustration is given below. A short description of the package can be found in Nielsen (2015).

A formal analysis of the identification of the age-period-cohort model can be found in Nielsen and Nielsen (2014). Forecasting is discussed in Kuang, Nielsen and Nielsen (2008b, 2011) and Martinez Miranda, Nielsen and Nielsen (2015). Methods for cross section data are introduced in Fannon, Monden and Nielsen (2019). Methods for panel data are introduced in Fannon (2020). For a recent overview see Fannon and Nielsen (2019).

The package covers age-period-cohort models for three types of data.

  1. Tables of aggregate data.

  2. Repeated cross sectional data.

  3. Panel data.

The apc package can be used as follows.

  1. Aggregate data. For a vignette with an introduction to analysis of aggregate data, see see IntroductionAggregateData.pdf, IntroductionAggregateData.R on Vignettes.

    1. Organize the data in as an apc.data.list. Data are included in matrix format. Information needs to be given about the original data format. Optionally, information can be given about the labels for the time scales.

    2. Construct descriptive plots using apc.plot.data.all. This gives a series of descriptive plots. The plots can be called individually through

      1. Plot data sums using apc.plot.data.sums. Numerical values can be obtained through apc.data.sums.

      2. Sparsity plots of data using apc.plot.data.sparsity.

      3. Plot data using all combinations of two time scales using apc.plot.data.within.

    3. Get an deviance table for the age-period-cohort model through apc.fit.table.

    4. Estimate a particular (sub-model of) age-period-cohort model through apc.fit.model.

    5. Plot probability transforms of observed responses given fit using apc.plot.fit.pt.

    6. Plot estimated parameters through apc.plot.fit. Numerical values of certain transformations of the canonical parameter can be obtained through apc.identify.

    7. Recursive analysis can be done by selecting a subset of the observations through apc.data.list.subset and then repeating analysis. This will reveal how sensitive the results are to particular age, period and cohort groups.

    8. Forecasting. Some functions have been been added for forecasting in from a Poisson response-only model with an age-cohort parametrization apc.forecast.ac and with an age-period parametrization apc.forecast.ap. See also the overview on apc.forecast

  2. Repeated cross section and Panel Data. For a vignette with an introduction to analysis of repeated cross section data and panel data, see IntroductionIndividualData.pdf, IntroductionIndividualData.R on Vignettes Further examples can be found in a second vignette, see IntroductionIndividualDataFurtherExample.pdf, IntroductionIndividualDataFurtherExample.R.

Data examples include

  1. Aggregate data

    1. data.asbestos includes counts of deaths from mesothelioma in the UK. This dataset has no measure for exposure. It can be analysed using a Poisson model with an "APC" or an "AC" design. Source: Martinez Miranda, Nielsen and Nielsen (2015). Also used in Nielsen (2015).

    2. data.Italian.bladder.cancer includes counts of deaths from bladder cancer in the Italy. This dataset includes a measure for exposure. It can be analysed using a Poisson model with an "APC" or an "AC" design. Source: Clayton and Schifflers (1987a).

    3. data.Belgian.lung.cancer includes counts of deaths from lung cancer in the Belgium. This dataset includes a measure for exposure. It can be analysed using a Poisson model with an "APC", "AC", "AP" or "Ad" design. Source: Clayton and Schifflers (1987a).

    4. data.Japanese.breast.cancer includes counts of deaths from breast cancer in the Japan. This dataset includes a measure for exposure. It can be analysed using a Poisson model with an "APC" design. Source: Clayton and Schifflers (1987b).

    Repeated cross section data

    1. Wage data from the package ISLR

    Repeated cross section data

    1. PSID7682 data from the package AER. These are panel data on earnings for 595 individuals for the years 1976-1982.

Author(s)

Bent Nielsen <bent.nielsen@nuffield.ox.ac.uk> 29 Jan 2015 updated 26 Aug 2020.

References

Clayton, D. and Schifflers, E. (1987a) Models for temperoral variation in cancer rates. I: age-period and age-cohort models. Statistics in Medicine 6, 449-467.

Clayton, D. and Schifflers, E. (1987b) Models for temperoral variation in cancer rates. II: age-period-cohort models. Statistics in Medicine 6, 469-481.

Fannon, Z. (2020). D.Phil. thesis. University of Oxford.

Fannon, Z., Monden, C. and Nielsen, B. (2018) Age-period cohort modelling and covariates, with an application to obesity in England 2001-2014. Download: Nuffield DP. Supplement Code for replication: Nuffield DP supplement.

Fannon, Z. and Nielsen, B. (2019) Age-period-cohort models. Oxford Research Encyclopedia of Economics and Finance. Oxford University Press. Download: doi.org/10.1093/acrefore/9780190625979.013.495; Earlier version Nuffield DP.

Kuang, D., Nielsen, B. and Nielsen, J.P. (2008a) Identification of the age-period-cohort model and the extended chain ladder model. Biometrika 95, 979-986. Download: Article; Earlier version Nuffield DP.

Kuang, D., Nielsen, B. and Nielsen, J.P. (2008b) Forecasting with the age-period-cohort model and the extended chain-ladder model. Biometrika 95, 987-991. Download: Article; Earlier version Nuffield DP.

Kuang, D., Nielsen, B. and Nielsen, J.P. (2011) Forecasting in an extended chain-ladder-type model. Journal of Risk and Insurance 78, 345-359. Download: Article; Earlier version: Nuffield DP.

Martinez Miranda, M.D., Nielsen, B. and Nielsen, J.P. (2015) Inference and forecasting in the age-period-cohort model with unknown exposure with an application to mesothelioma mortality. Journal of the Royal Statistical Society A 178, 29-55. Download: Article, Nuffield DP.

Nielsen, B. (2015) apc: An R package for age-period-cohort analysis. R Journal 7, 52-64. Download: Open access.

Nielsen, B. (2014) Deviance analysis of age-period-cohort models. Download: Nuffield DP.

Nielsen, B. and Nielsen, J.P. (2014) Identification and forecasting in mortality models. The Scientific World Journal. vol. 2014, Article ID 347043, 24 pages. Download: Article.

See Also

Vignettes are available on Vignettes.

Further information, including minor upgrades and a python version can be found on apc development web page.

Examples

1
#	see vignettes

Example output



apc documentation built on Oct. 23, 2020, 6:17 p.m.