apc.indiv.model.table: Generate table to select APC submodel

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

These functions test, for a given choice of dependent variable and covariates, which of the TS, APC, and APC submodels provides the best fit to the data. Comparison is by Wald or likelihood ratio test and where appropriate by Akaike Information Criterion. A table is generated with these statistics for each model considered.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
apc.indiv.model.table(data, dep.var, covariates = NULL,
			unit = 1, n.coh.excl.start = 0, n.coh.excl.end = 0,
			n.age.excl.start = 0, n.age.excl.end = 0,
			n.per.excl.start = 0, n.per.excl.end = 0,
			model.family, NR.controls = NULL,
			test, dist,
			TS=FALSE, wt.var=NULL, plmmodel="notplm",
			id.var=NULL)
	   apc.indiv.waldtable(data, dep.var, covariates = NULL, 
	   dist="F", unit = 1, model.family, 
	    	n.coh.excl.start = 0, n.coh.excl.end = 0,
			n.age.excl.start = 0, n.age.excl.end = 0,
			n.per.excl.start = 0, n.per.excl.end = 0,
			 wt.var=NULL, plmmodel="notplm",
			id.var=NULL)
			apc.indiv.waldtable.TS(data, dep.var, covariates=NULL, dist = "F",
                                unit=1, model.family = "gaussian",
                                n.coh.excl.start=0, n.coh.excl.end=0, 
                                n.age.excl.start=0, n.age.excl.end=0, 
                                n.per.excl.start=0, n.per.excl.end=0)
     apc.indiv.LRtable(data,  dep.var, covariates=NULL, 
                              model.family, unit=1, 
                              n.coh.excl.start=0, n.coh.excl.end=0, 
                              n.age.excl.start=0, n.age.excl.end=0,
                              n.per.excl.start=0, n.per.excl.end=0)
	   apc.indiv.LRtable.TS(data,  dep.var, covariates=NULL, 
                                 model.family, unit=1, 
                                 n.coh.excl.start=0, n.coh.excl.end=0, 
                                 n.age.excl.start=0, n.age.excl.end=0,
                                 n.per.excl.start=0, n.per.excl.end=0,
                                 NR.controls=NR.controls)

Arguments

data

The data.frame in use

dep.var

The name of the dependent variable as it appears in the data

covariates

A vector of the names of covariates as they appear in the data. Default NULL.

unit

The interval at which age, period, and cohort are recorded (must be the same for each). Default 1.

n.coh.excl.start

If any cohorts have been censored (AP data only). Default 0.

n.coh.excl.end

If any cohorts have been censored (AP data only). Default 0.

n.age.excl.start

If any ages have been censored (PC data only). Default 0.

n.age.excl.end

If any ages have been censored (PC data only). Default 0.

n.per.excl.start

If any periods have been censored (AC data only). Default 0.

n.per.excl.end

If any periods have been censored (AC data only). Default 0.

model.family

Either "gaussian" or "binomial"

NR.controls

Optional list to modify aspects of the Newton-Rhapson iteration for binomial TS model.See details in apc.indiv.est.model.

test

The type of test. One of "LR", "Wald".

TS

...

dist

The distribution against which the test statistic is compared. One of "F", "Chisq".

wt.var

Only if using survey weights. The name of the weights variable.

plmmodel

Used to indicate whether a panel data model is to be estimated and if so what type. Default is "notplm", for not panel data. Other values are "pooling", "within", "random". Further details in plm.

id.var

Only if using panel data. The name of the individual ID variable.

Details

Each row of the table corresponds to a single sub-model of the APC model. The first three columns test the sub-model in question against the time-saturated model. The next three columns test the sub-model against the full APC model. The final two columns report the likelihood and AIC of the estimated sub-model. The model with the lowest AIC value which is also not rejected in tests against the APC and TS models should be selected.

Value

table

contains the table of comparison statistics.

NR.report

for logit models only, a report on the Newton-Rhapson algorithm used to estimate the time-saturated model.

Author(s)

Zoe Fannon <zoe.fannon@economics.ox.ac.uk> 26 Jun 2020

References

Fannon, Z. (2018) apc.indiv: R tools to estimate age-period-cohort models with repeated cross section data. Mimeo. University of Oxford.

Fannon, Z., Monden, C. and Nielsen, B. (2018) Age-period-cohort modelling and covariates, with an application to obesity in England 2001-2014. Mimeo. University of Oxford.

See Also

For model estimation: apc.indiv.est.model For pairwise model comparison: apc.indiv.model.table, waldtest, linearHypothesis. The data in these examples are the Wage data from the package ISLR and the PSID7682 data from the package AER.

For examples, see the vignette IntroductionIndividualData.pdf, IntroductionIndividualData.R on Vignettes. Further examples in the vignette IntroductionIndividualDataFurtherExamples.pdf, IntroductionIndividualDataFurtherExamples.R.

Examples

1
#### see vignettes

apc documentation built on Oct. 23, 2020, 6:17 p.m.