In EViews, the Sargan and Hansen tests are both available as part of the "Model Diagnostic Tests" menu and can be used interchangeably to test the validity of the instrumental variables (IV) regression.
To perform Sargan or Hansen tests on EViews, follow these steps:
Step 1: Load your dataset in EViews.
Step 2: Estimate your model using GMM (Generalized Method of Moments). To do this, click on Quick on the toolbar, then select "Estimate Equation". In the Equation Specification dialog box, input your desired equation and choose GMM as the estimation method.
Step 3: After estimating the GMM model, you will see the estimation output. The Sargan test statistic will be displayed with the label J-statistic. For Hansen test, you can follow these additional steps:
Step 4: In the estimation output window, click on View on the toolbar, then select Coefficient Diagnostics, and finally Hansen J Test.
Step 5: A new window will open displaying the Hansen test results.
Keep in mind that both Sargan and Hansen tests are used to test the validity of the overidentifying restrictions in GMM estimation. A high p-value (usually > 0.05) indicates that we cannot reject the null hypothesis, and the overidentifying restrictions are valid.
To perform Sargan or Hansen tests on EViews, follow these steps:
Step 1: Load your dataset in EViews.
Step 2: Estimate your model using GMM (Generalized Method of Moments). To do this, click on Quick on the toolbar, then select "Estimate Equation". In the Equation Specification dialog box, input your desired equation and choose GMM as the estimation method.
Step 3: After estimating the GMM model, you will see the estimation output. The Sargan test statistic will be displayed with the label J-statistic. For Hansen test, you can follow these additional steps:
Step 4: In the estimation output window, click on View on the toolbar, then select Coefficient Diagnostics, and finally Hansen J Test.
Step 5: A new window will open displaying the Hansen test results.
Keep in mind that both Sargan and Hansen tests are used to test the validity of the overidentifying restrictions in GMM estimation. A high p-value (usually > 0.05) indicates that we cannot reject the null hypothesis, and the overidentifying restrictions are valid.
To perform Sargan/Hansen tests on Eviews, you can use the Regressor Endogeneity Test in EViews. To do this, click on View/IV Diagnostics and Tests/Regressor Endogeneity Test. A dialog box will open up asking you to enter a list of regressors to test for endogeneity .