A test of overidentifying restrictions for models estimated by GMM.
sargan(object, ...)
# S3 method for class 'pgmm'
sargan(object, weights = c("twosteps", "onestep"), ...)An object of class "htest".
The Hansen–Sargan test ("J test") calculates the quadratic form of the moment restrictions that is minimized while computing the GMM estimator. It follows asymptotically a chi-square distribution with number of degrees of freedom equal to the difference between the number of moment conditions and the number of coefficients.
(Hansen 1982)
(Sargan 1958)
data("EmplUK", package = "plm")
ar <- pgmm(log(emp) ~ lag(log(emp), 1:2) + lag(log(wage), 0:1) +
lag(log(capital), 0:2) + lag(log(output), 0:2) | lag(log(emp), 2:99),
data = EmplUK, effect = "twoways", model = "twosteps")
sargan(ar)
#>
#> Sargan test
#>
#> data: log(emp) ~ lag(log(emp), 1:2) + lag(log(wage), 0:1) + lag(log(capital), ...
#> chisq = 31.381, df = 25, p-value = 0.1767
#> alternative hypothesis: overidentifying restrictions not valid
#>