Angrist and Newey's version of the Chamberlain test

aneweytest(formula, data, subset, na.action, index = NULL, ...)

Arguments

formula

a symbolic description for the model to be estimated,

data

a data.frame,

subset

see lm(),

na.action

see lm(),

index

the indexes,

...

further arguments.

Value

An object of class "htest".

Details

Angrist and Newey's test is based on the results of the artifactual regression of the within residuals on the covariates for all the periods.

References

Angrist JD, Newey WK (1991). “Over-identification tests in earnings functions with fixed effects.” Journal of Business & Economic Statistics, 9(3), 317–323.

See also

piest() for Chamberlain's test

Author

Yves Croissant

Examples


data("RiceFarms", package = "plm")
aneweytest(log(goutput) ~ log(seed) + log(totlabor) + log(size), RiceFarms, index = "id")
#> 
#> 	Angrist and Newey's test of within model
#> 
#> data:  log(goutput) ~ log(seed) + log(totlabor) + log(size)
#> chisq = 141.89, df = 87, p-value = 0.0001851
#> alternative hypothesis: within specification does not apply
#>