sargan | R Documentation |
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
sargan(object, ...)
## S3 method for class 'ivreg'
sargan(object, ...)
## S3 method for class 'micsr'
sargan(object, ...)
object |
a model fitted by GMM |
... |
further arguments |
an object of class "htest"
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.