Generalizes apc.plot.fit
to a 2 sample model. For an application, see the vignette ReproducingN2025.pdf, ReproducingN2025.R on vignette.
apc.plot.fit.2s(apc.fit.model.1,apc.fit.model.2,
type="macro",which.plot=0,
col=NULL,label=NULL,lty=NULL)
List. See apc.fit.model
for a description of the format.
List. See apc.fit.model
for a description of the format.
Optional. Default is "macro".
If which.plot
is omitted or set to 0 six plots will be made. Single plot of one of the fits can achieved by giving which.plot
one of the following values.
1: both micro age fits;
2: both micro period fits;
3: both micro cohort fits;
4: difference of micro age fits;
5: difference of micro period fits;
6: difference of micro cohort fits.
Same as macro
.
The micro effects only exist when the data have mixed frequency as coded in data.format
. Thus, there are age and period in groups of length G and H respectively, this plots demeaned micro fits as well as the cross-sample difference. Some micro effects do not exist if G=1 or H=1. Single plot of one of the fits can achieved by giving which.plot
one of the following values.
1: both micro age fits if G>1;
2: both micro period fits if H>1;
3: both micro cohort fits if G*H>1;
4: difference of micro age fits if G>1;
5: difference of micro period fits if H>1;
6: difference of micro cohort fits if G*H>1.
If data.format
is regular nothing is plotted as there are no micro fits.
Optional. If 0, then more than one plot may be made. For the numbering of plots, see type. Default is 0.
NULL
NULL
NULL
Bent Nielsen <bent.nielsen@nuffield.ox.ac.uk> 3 Jul 2025
Nielsen, B. (2022) Two-sample age-period-cohort models with an application to Swiss suicide rates. Download: Nuffield Discussion Paper 2022-W03.