Package: apc 2.0.0

Bent Nielsen

apc: Age-Period-Cohort Analysis

Functions for age-period-cohort analysis. Aggregate data can be organised in matrices indexed by age-cohort, age-period or cohort-period. The data can include dose and response or just doses. The statistical model is a generalized linear model (GLM) allowing for 3,2,1 or 0 of the age-period-cohort factors. Individual-level data should have a row for each individual and columns for each of age, period, and cohort. The statistical model for repeated cross-section is a generalized linear model. The statistical model for panel data is ordinary least squares. The canonical parametrisation of Kuang, Nielsen and Nielsen (2008) <doi:10.1093/biomet/asn026> is used. Thus, the analysis does not rely on ad hoc identification.

Authors:Zoe Fannon, Bent Nielsen

apc_2.0.0.tar.gz
apc_2.0.0.tar.gz(r-4.5-noble)apc_2.0.0.tar.gz(r-4.4-noble)
apc_2.0.0.tgz(r-4.4-emscripten)apc_2.0.0.tgz(r-4.3-emscripten)
apc.pdf |apc.html
apc/json (API)
NEWS

# Install 'apc' in R:
install.packages('apc', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

4.49 score 49 scripts 330 downloads 7 mentions 63 exports 89 dependencies

Last updated 4 years agofrom:94a277f1b5. Checks:OK: 1 NOTE: 1. Indexed: yes.

TargetResultDate
Doc / VignettesOKDec 21 2024
R-4.5-linuxNOTEDec 21 2024

Exports:apc.data.listapc.data.list.subsetapc.data.sumsapc.fit.modelapc.fit.tableapc.forecast.acapc.forecast.apapc.forecast.apcapc.get.designapc.get.design.collinearapc.get.indexapc.identifyapc.indiv.compare.directapc.indiv.design.collinearapc.indiv.design.modelapc.indiv.est.modelapc.indiv.estimate.TSapc.indiv.fit.modelapc.indiv.logit.TSapc.indiv.LRtableapc.indiv.LRtable.TSapc.indiv.LRtest.fullapcapc.indiv.LRtest.TSapc.indiv.model.tableapc.indiv.waldtableapc.indiv.waldtable.TSapc.indiv.waldtest.fullapcapc.indiv.waldtest.TSapc.internal.function.date.2.characterapc.plot.data.allapc.plot.data.levelapc.plot.data.sparsityapc.plot.data.sumsapc.plot.data.withinapc.plot.data.within.all.sixapc.plot.fitapc.plot.fit.allapc.plot.fit.fitted.valuesapc.plot.fit.linear.predictorsapc.plot.fit.ptapc.plot.fit.residualsapc.polygondata.aidsdata.asbestosdata.asbestos.2013data.asbestos.2013.mendata.asbestos.2013.womendata.Belgian.lung.cancerdata.Italian.bladder.cancerdata.Japanese.breast.cancerdata.loss.BZdata.loss.TAdata.loss.VNJdata.loss.XLdata.RH.mortality.dkdata.RH.mortality.nodata.US.prostate.canceris.trianglenew.apc.identifynew.apc.plot.fittriangle.cumulativetriangle.incrementalvector.2.triangle

Dependencies:abindactuarAERbackportsbdsmatrixbiglmbootbroomcarcarDataChainLadderclicodacollapsecolorspacecowplotcplmcpp11DBIDerivdigestdoBydplyrexpintfansifarverFormulagenericsggplot2gluegtableISLRisobandlabelinglatticelifecyclelme4lmtestmagrittrMASSMatrixMatrixModelsmaxLikmgcvmicrobenchmarkminqamiscToolsmitoolsmodelrmunsellnlmenloptrnnetnumDerivpbkrtestpillarpkgconfigplmplyrpurrrquantregR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreshapereshape2rlangsandwichscalesSparseMstatmodstringistringrsurveysurvivalsystemfittibbletidyrtidyselecttweedieutf8vctrsviridisLitewithrzoo

Generating new models from design matrix function

Rendered fromNewDesign.Rnwusingutils::Sweaveon Dec 21 2024.

Last update: 2020-10-01
Started: 2015-04-12

Identification: illustrate and check identification used in plot fit function

Rendered fromIdentification.Rnwusingutils::Sweaveon Dec 21 2024.

Last update: 2020-10-01
Started: 2015-04-12

Illustrate and check identification used in plot fit function

Rendered fromReproducingMMNN2015.Rnwusingutils::Sweaveon Dec 21 2024.

Last update: 2020-10-01
Started: 2020-10-01

Introduction: analysis of aggregate data

Rendered fromIntroductionAggregateData.rnwusingutils::Sweaveon Dec 21 2024.

Last update: 2020-10-01
Started: 2020-10-01

Introduction: analysis of individual data

Rendered fromIntroductionIndividualData.rnwusingutils::Sweaveon Dec 21 2024.

Last update: 2020-10-01
Started: 2020-10-01

Introduction: analysis of individual data: further examples

Rendered fromIntroductionIndividualDataFurtherExamples.rnwusingutils::Sweaveon Dec 21 2024.

Last update: 2020-10-01
Started: 2020-10-01

Reproducing HN2016

Rendered fromReproducingHN2016.Rnwusingutils::Sweaveon Dec 21 2024.

Last update: 2020-10-01
Started: 2020-10-01

Reproducing KN2020

Rendered fromReproducingKN2020.Rnwusingutils::Sweaveon Dec 21 2024.

Last update: 2020-10-01
Started: 2020-10-01

Reproducing MMNN2016

Rendered fromReproducingMMNN2016.Rnwusingutils::Sweaveon Dec 21 2024.

Last update: 2020-10-01
Started: 2020-10-01

Readme and manuals

Help Manual

Help pageTopics
Age-period-cohort analysisapc-package apc
Internal apc Functionsapc.internal.function.date.2.character foo2 foo3 foo4
Arrange data as an apc.data.listapc.data.list
Cut age, period and cohort groups from data set.apc.data.list.subset
Computes age, period and cohort sums of a matrixapc.data.sums
Fits an age period cohort modelapc.fit.model apc.fit.table
Forecasts from age-period-cohort models.apc.forecast
Forecast for responses model with AC or CL structure.apc.forecast.ac
Forecast for Poisson response model with AP structure.apc.forecast.ap
Forecast models with APC structure.apc.forecast.apc
Create design matricesapc.get.design apc.get.design.collinear
Get indices for mapping data into trapezoid formationapc.get.index
Imposing hypotheses on age-period-cohort models.apc.hypothesis
Identification of time effectsapc.identify
Implements direct tests between APC modelsapc.indiv.compare.direct apc.indiv.LRtest.fullapc apc.indiv.LRtest.TS apc.indiv.waldtest.fullapc apc.indiv.waldtest.TS
Estimate a single APC modelapc.indiv.design.collinear apc.indiv.design.model apc.indiv.est.model apc.indiv.estimate.TS apc.indiv.fit.model apc.indiv.logit.TS
Generate table to select APC submodelapc.indiv.LRtable apc.indiv.LRtable.TS apc.indiv.model.table apc.indiv.waldtable apc.indiv.waldtable.TS
Make all descriptive plots.apc.plot.data.all
Level plot of data matrix.apc.plot.data.level
This plot shows heat map of the sparsity of a data matrix.apc.plot.data.sparsity
This plot shows sums of data matrix by age, period or cohort.apc.plot.data.sums
This plot shows time series of matrix within age, period or cohort.apc.plot.data.within apc.plot.data.within.all.six
Plots of apc estimatesapc.plot.fit
Make all fit plots.apc.plot.fit.all
Plot probability transform of responses given fitted valuesapc.plot.fit.pt
Level plots of residuals / fitted values / linear predictorsapc.plot.fit.fitted.values apc.plot.fit.linear.predictors apc.plot.fit.residuals
Add connected line and standard deviation polygons to a plotapc.polygon
UK aids datadata.aids
Asbestos datadata.asbestos data.asbestos.2013 data.asbestos.2013.men data.asbestos.2013.women
Belgian lung cancer datadata.Belgian.lung.cancer
Italian bladder cancer datadata.Italian.bladder.cancer
Japanese breast cancer datadata.Japanese.breast.cancer
Motor datadata.loss.BZ
Motor datadata.loss.TA
Motor datadata.loss.VNJ
US Casualty data, XL Groupdata.loss.XL
2-sample mortality data.data.RH.mortality data.RH.mortality.dk data.RH.mortality.no
Japanese breast cancer datadata.US.prostate.cancer
Identification of time effectsnew.apc.identify
Plots of apc estimatesnew.apc.plot.fit
Triangular matrices used in reservingis.triangle triangle.cumulative triangle.incremental vector.2.triangle