apc.fit.model.2s {apc} | R Documentation |
Fits an age period cohort model for 2 samples
Description
Generalizes apc.fit.model
to a 2 sample model. For an application, see the vignette ReproducingN2025.pdf, ReproducingN2025.R on vignette.
Usage
apc.fit.model.2s(apc.data.list.1,apc.data.list.2,model.family,
model.design.common="APC",model.design.difference="APC",
gls.weight=c(1,1),apc.index=NULL,time.series=NULL)
apc.fit.table.2s(apc.data.list.1,apc.data.list.2,model.family,
restrict="difference",model.design.reference.common="APC",
model.design.reference.difference="APC",
gls.weight=c(1,1),time.series=NULL,digits=3)
Arguments
apc.data.list.1 |
List. For 1st sample. See |
apc.data.list.2 |
List. For 2nd sample. See |
model.family |
Character. The following options are implemented. These are used internally when
calling
|
model.design.common |
Optional. Indicates which sub-model should be fitted for the common part of the parameters, that is for the sum of the canonical parameters (xi.1+xi.2)/2. Possible choices: "APC","AP","AC","PC","Ad","Pd","Cd","A","P","C","t","tA","tP","tC" and "ATC". Default is "APC" |
model.design.difference |
Optional. Indicates which sub-model should be fitted for the difference part of the parameters, that is for the difference of the canonical parameters (xi.1-xi.2)/2. Possible choices: "APC","AP","AC","PC","Ad","Pd","Cd","A","P","C","t","tA","tP","tC" and "ATC". Default is "APC" |
model.design.reference.common |
Optional for |
model.design.reference.difference |
Optional for |
restrict |
Optional for |
gls.weight |
Optional. Vector. Use to set relative weights when estimating by GLS using |
apc.index |
Optional. List. See |
time.series |
Optional. Vector. Should have same length as the number of periods. Double differences of period parameters will be restricted to follow double differences of the time series. Should be used with |
digits |
Optional. Numerical. Number of digits in output. Default=3. |
Author(s)
Bent Nielsen <bent.nielsen@nuffield.ox.ac.uk> 7 Jul 2025
References
Nielsen, B. (2022) Two-sample age-period-cohort models with an application to Swiss suicide rates. Download: Nuffield Discussion Paper 2022-W03.