IV-GMM Estimation with Hansen J Test
IV-GMM estimation fits a linear instrumental-variable model by efficient two-step generalized method of moments and tests the overidentifying restrictions with Hansen's J statistic.
IV-GMM 추정은 선형 도구변수 모형을 효율적 2단계 일반화적률법으로 적합하고 Hansen J 통계량으로 과대식별 제약을 검정하는 방법입니다.
I have more instruments than endogenous regressors and heteroskedastic errors; how do I get efficient IV estimates and check whether the extra instruments are valid?
도구변수가 내생변수보다 많고 오차가 이분산인데, 효율적인 IV 추정치를 구하고 남는 도구변수가 타당한지 확인하려면 어떻게 하나요?
Two-step GMM first fits 2SLS, then uses the residual moment covariance as an optimal weighting matrix so the estimates are efficient under heteroskedasticity or clustering. Hansen's J tests whether all instruments satisfy the moment conditions jointly, and the C statistic tests whether the chosen endogenous regressors could be treated as exogenous.
When to use IV-GMM Estimation with Hansen J Test
- The model is overidentified (more excluded instruments than endogenous regressors).
- Errors are heteroskedastic, clustered or serially correlated, so 2SLS is not efficient.
- You want a formal overidentification test and an endogeneity (difference-in-J) test.
When to use something else
- Instruments are weak (first-stage F well below 10); use LIML with weak-instrument diagnostics and Anderson-Rubin inference instead.
- The model is exactly identified; GMM equals 2SLS and J cannot be computed, so use ordinary 2SLS.
Assumptions and requirements
- Instruments are correlated with the endogenous regressors (relevance).
- Instruments affect the outcome only through the endogenous regressors (exclusion).
- Observations are independent, or independent across the specified clusters; kernel weighting assumes rows are in time order.
What the analysis reports
- Coefficients with robust, clustered or HAC standard errors and confidence intervals
- Hansen J statistic with degrees of freedom and p value
- C (difference-in-J) endogeneity statistic
- First-stage partial R² and F for each endogenous regressor
How to report it
Two-step efficient GMM (robust weighting, N = [value]) estimated b = [value] (SE = [value], 95% CI [[value], [value]]); Hansen's J([value]) = [value], p = [value].
Common variants
자주 쓰는 설정
The same analysis with settings already chosen. Each runs IV-GMM Estimation with Hansen J Test itself, at the same price.
- Wooldridge robust score tests for IV — score tests set to “on”
Related methods
- Two-Stage Least Squares (2SLS)
- Weak Instrument Diagnostics and LIML
- Instrumental Variable Estimation (IV)
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with NumPy and direct computations (formulas, enumeration or simulation).
독립 계산. NumPy·직접 계산(식·열거·모의실험) 대조 참조 시험 1건 통과.
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run IV-GMM Estimation with Hansen J Test on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and predictor (feature) columns
- Price
- 600 credits for one analysis up to 10,000 rows (complexity level 4); larger or wider data costs more. Optional methodologist review: 2400 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.