APCtools

R build status Codecov test coverage MIT license

Routines for Descriptive and Model-Based APC Analysis

Overview

Age-Period-Cohort (APC) analyses are used to differentiate relevant drivers for long-term developments. The APCtools package offers visualization techniques and general routines to simplify the workflow of an APC analysis. Sophisticated functions are available both for descriptive and regression model-based analyses. For the former, we use density (or ridgeline) matrices, classical heatmaps and hexamaps (hexagonally binned heatmaps) as innovative visualization techniques building on the concept of Lexis diagrams. Model-based analyses build on the separation of the temporal dimensions based on generalized additive models, where a tensor product interaction surface (usually between age and period) is utilized to represent the third dimension (usually cohort) on its diagonal. Such tensor product surfaces can also be estimated while accounting for further covariates in the regression model.

Useful materials:

Installation

The most current version from GitHub can be installed via

devtools::install_github("bauer-alex/APCtools")

Getting help

Please open a GitHub issue if you encounter a bug or have suggestions for additional functionalities of the package. Alternatively, feel free to contact us directly via email.

References

Weigert, M., Bauer, A., Gernert, J., Karl, M., Nalmpatian, A., Küchenhoff, H., and Schmude, J. (2021). Semiparametric APC analysis of destination choice patterns: Using generalized additive models to quantify the impact of age, period, and cohort on travel distances. Tourism Economics. https://doi.org/10.1177/1354816620987198.

Jalal, H., Burke, D. (2020). Hexamaps for Age–Period–Cohort Data Visualization and Implementation in R. Epidemiology, 31 (6), e47-e49. doi: https://doi.org/10.1097/EDE.0000000000001236.