sargan {micsr} | R Documentation |
Sargan test for GMM models
Description
When a IV model is over-identified, the set of all the empirical moment conditions can't be exactly 0. The test of the validity of the instruments is based on a quadratic form of the vector of the empirical moments
Usage
sargan(object, ...)
## S3 method for class 'ivreg'
sargan(object, ...)
## S3 method for class 'micsr'
sargan(object, ...)
Arguments
object |
a model fitted by GMM |
... |
further arguments |
Value
an object of class "htest"
.
Examples
cigmales <- cigmales %>%
mutate(age2 = age ^ 2, educ2 = educ ^ 2,
age3 = age ^ 3, educ3 = educ ^ 3,
educage = educ * age)
gmm_cig <- expreg(cigarettes ~ habit + price + restaurant + income + age + age2 +
educ + educ2 + famsize + race | . - habit + age3 + educ3 +
educage + lagprice + reslgth, data = cigmales,
twosteps = FALSE)
sargan(gmm_cig)
[Package micsr version 0.1-1 Index]