data(simData)
model1 <- momentModel(y~x1, ~z1+z2, data=simData)
res <- gmmFit(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 <- momentModel(LW~S+EXPR+IQ, ~S+EXPR+AGE+MED, data=dat, vcov="MDS")
res <- gmmFit(model)
## testing the orthogonality conditions of S
specTest(res, 2)
Run the code above in your browser using DataLab