Learn R Programming

apc (version 2.0.0)

new.apc.identify: Identification of time effects

Description

Computes ad hoc identified time effects.

Usage

new.apc.identify(apc.fit.model)

Arguments

apc.fit.model

List. See apc.fit.model for a description of the format.

Value

index.age.max

Vector. Indices for age parameters when using coefficients.ssdd or coefficients.detrend. The length is two longer that that of apc.model.fit$index.age if model.design is "APC. NULL if age double differences are not estimated.

index.per.max

Vector. Indices for period parameters when using coefficients.ssdd or coefficients.detrend. The length is two longer that that of apc.model.fit$index.per if model.design is "APC. NULL if age double differences are not estimated.

index.coh.max

Vector. Indices for cohort parameters when using coefficients.ssdd or coefficients.detrend. The length is two longer that that of apc.model.fit$index.coh if model.design is "APC. NULL if age double differences are not estimated.

dates.max

Vector. Indicates the dates for the parameters when using coefficients.ssdd or coefficients.detrend. The length is six longer that that of apc.model.fit$index.coh if model.design is "APC.

index.age.sub

* Vector. Indices for age parameters when using coefficients.demean. The length is two longer that that of apc.model.fit$index.age if model.design is "APC. NULL if age double differences are not estimated.

index.per.sub

* Vector. Indices for period parameters when using coefficients.demean. The length is two longer that that of apc.model.fit$index.per if model.design is "APC. NULL if age double differences are not estimated.

index.coh.sub

* Vector. Indices for cohort parameters when using coefficients.demean. The length is two longer that that of apc.model.fit$index.coh if model.design is "APC. NULL if age double differences are not estimated.

dates.sub

* Vector. Indicates the dates for the parameters when using coefficients.demean. The length is six longer that that of apc.model.fit$index.coh if model.design is "APC.

index.age.dif

* Vector. Indices for age parameters when using coefficients.dif. The length is one longer that that of apc.model.fit$index.age if model.design is "APC. NULL if age double differences are not estimated.

index.per.dif

* Vector. Indices for period parameters when using coefficients.dif. The length is one longer that that of apc.model.fit$index.per if model.design is "APC. NULL if age double differences are not estimated.

index.coh.dif

* Vector. Indices for cohort parameters when using coefficients.dif. The length is one longer that that of apc.model.fit$index.coh if model.design is "APC. NULL if age double differences are not estimated.

dates.dif

* Vector. Indicates the dates for the parameters when using coefficients.dif. The length is three longer that that of apc.model.fit$index.coh if model.design is "APC.

coefficients.ssdd

Matrix. Coefficients of the double sum of double differences. Normalised to be zero at two values chosen so age=cohort and period is at the minimal value. For each parameter is reported coefficient, standard deviation, z-value, which is the ratio of those, and p-value.

covariance.ssdd

Matrix. Estimated covariance matrix for double sums.

coefficients.detrend

Matrix. Coefficients of the double sum of double differences. Normalised to be zero for first and last value. For each parameter is reported coefficient, standard deviation, z-value, which is the ratio of those, and p-value.

covariance.detrend

Matrix. Estimated covariance matrix for detrended double sums.

coefficients.demean

* Matrix. Coefficients of the sum of differences. Normalised to be zero for first value. Does not apply is design is "APC" For each parameter is reported coefficient, standard deviation, z-value, which is the ratio of those, and p-value.

covariance.demean

* Matrix. Estimated covariance matrix for demeaned sums.

coefficients.dif

* Matrix. Coefficients of the differences. Does not apply is design is "APC" For each parameter is reported coefficient, standard deviation, z-value, which is the ratio of those, and p-value.

covariance.dif

* Matrix. Estimated covariance matrix for differences.

Details

Forms ad hoc identified time effects from the canonical parameter. These are used either indirectly by apc.plot.fit or they are computed directly with this command.

The ad hoc identifications are based on Nielsen (2014b). For details see also the vignette Identification.pdf, Identification.R on Vignettes or in the notes below.

For model designs of any type two ad hoc identified time effects.

(1) The type "sum.sum" (same as "ss.dd") gives double sums anchored in the middle of the first period diagonal.

(2) The type "detrend" gives double sums that start in zero and end in zero.

For model designs with only two time effects, that is "AC", "AP", "PC" there is a further ad hoc identification.

(3) The type "demean" gives single sums of single differences. Derived from "detrend" where the linear trends are attributed to the double sums of double differences. Level unchanged.

(4) The type "dif" gives the single differences derived from "demean". Could also have been chosen as canonical parametrisation for these models.

References

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.

Nielsen, B. (2014b) Deviance analysis of age-period-cohort models. Work in progress.

See Also

The vignette Identification.pdf.

Examples

Run this code
# NOT RUN {
########################
#	Belgian lung cancer
# 	first an example with APC design, note that demean and dif not defined.

data.list	<- data.Belgian.lung.cancer()

fit.apc	<- apc.fit.model(data.list,"poisson.dose.response","APC")
fit.apc$coefficients.canonical
id.apc	<- apc.identify(fit.apc)
id.apc$coefficients.ssdd
id.apc$coefficients.detrend
id.apc$coefficients.demean
id.apc$coefficients.dif

fit.ap	<- apc.fit.model(data.list,"poisson.dose.response","AP")
fit.ap$coefficients.canonical
id.ap	<- apc.identify(fit.ap)
id.ap$coefficients.ssdd
id.ap$coefficients.detrend
id.ap$coefficients.demean
id.ap$coefficients.dif

# }

Run the code above in your browser using DataLab