specTest-methods {gmm4} | R Documentation |
specTest
in Package gmm4 ~~It computes tests of specification for GMM fit.
## S4 method for signature 'gmmfit,missing' specTest(object, which, df.adj=FALSE, wObj=NULL) ## S4 method for signature 'sgmmfit,missing' specTest(object, which, df.adj=FALSE, wObj=NULL) ## S4 method for signature 'gmmfit,numeric' specTest(object, which) ## S4 method for signature 'gelfit,missing' specTest(object, which, type = c("All", "LR", "LM", "J"))
object |
GMM or GEL fit object |
which |
Which sub-moment conditions to test. |
df.adj |
Should we adjust the covariance matrix of the moment
conditions for degrees of freedom. If |
wObj |
An object of class |
type |
For GEL, three specification tests are available |
signature(object = "gmmfit", which="missing")
signature(object = "sgmmfit", which="missing")
signature(object = "gmmfit", which="numeric")
Eichenbaum, M. and Hansen L. and Singleton, K. (1985). A time Series Analysis of Representative Agent Models of Consumption and Leisure Choise under Uncertainty. Quarterly Journal of Economics, 103, 51–78.
Hayashi, F. (2000). Econometrics, New Jersey: Princeton University Press.
data(simData) model1 <- gmmModel(y~x1, ~z1+z2, data=simData) res <- modelFit(model1) specTest(res) ## Hayashi Example 3.3 (there is not result in the book but ## that's how we would do it for YEAR=1967 data(Griliches) dat <- subset(Griliches, YEAR==67) model <- gmmModel(LW~S+EXPR+IQ, ~S+EXPR+AGE+MED, data=dat, vcov="MDS") res <- modelFit(model) ## testing the orthogonality conditions of S specTest(res, 2)