如何在stata或者matlab中实现基于Han-PhillipsGMM得到的动态空间面板杜宾模型?
clear all
sysuse spregdhp.dta, clear
db spregdhp
* (1) Han-Philips Spatial Lag Linear Dynamic Panel Data Regression
spregdhp y x1 x2 , nc(7) model(sar) wmfile(SPWxt) mfx(lin) re
spregdhp y x1 x2 , nc(7) model(sar) wmfile(SPWxt) mfx(lin) fe
spregdhp y x1 x2 , nc(7) model(sar) wmfile(SPWxt) mfx(lin) be
spregdhp y x1 x2 , nc(7) model(sar) wmfile(SPWxt) mfx(log) tolog re
spregdhp y x1 x2 , nc(7) model(sar) wmfile(SPWxt) mfx(log) tolog fe
spregdhp y x1 x2 , nc(7) model(sar) wmfile(SPWxt) mfx(log) tolog be
spregdhp y x1 x2 , nc(7) model(sar) wmfile(SPWxt) tests
spregdhp y x1 x2 , nc(7) model(sar) wmfile(SPWxt) predict(Yh) resid(Ue)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
* (2) Han-Philips Spatial Durbin Linear Dynamic Panel Data Regression
spregdhp y x1 x2 , nc(7) model(sdm) wmfile(SPWxt) mfx(lin) re
spregdhp y x1 x2 , nc(7) model(sdm) wmfile(SPWxt) mfx(lin) fe
spregdhp y x1 x2 , nc(7) model(sdm) wmfile(SPWxt) mfx(lin) be
spregdhp y x1 x2 , nc(7) model(sdm) wmfile(SPWxt) mfx(log) tolog re
spregdhp y x1 x2 , nc(7) model(sdm) wmfile(SPWxt) mfx(log) tolog fe
spregdhp y x1 x2 , nc(7) model(sdm) wmfile(SPWxt) mfx(log) tolog be
spregdhp y x1 x2 , nc(7) model(sdm) wmfile(SPWxt) tests
spregdhp y x1 x2 , nc(7) model(sdm) wmfile(SPWxt) predict(Yh) resid(Ue)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
. clear all
. sysuse spregdhp.dta, clear
. spregdhp y x1 x2 , nc(7) model(sar) wmfile(SPWxt) mfx(lin) re tests
==============================================================================
*** Binary (0/1) Weight Matrix: 49x49 - NC=7 NT=7 (Non Normalized)
==============================================================================
==============================================================================
* Spatial Lag Han-Philips Linear Dynamic Panel Data Regression
==============================================================================
y = w1y_y + x1 + x2
------------------------------------------------------------------------------
Sample Size = 42 | Cross Sections Number = 7
Wald Test = 52.2355 | P-Value > Chi2(4) = 0.0000
F-Test = 13.0589 | P-Value > F(4 , 39) = 0.0000
(Buse 1973) R2 = 0.5789 | Raw Moments R2 = 0.9661
(Buse 1973) R2 Adj = 0.5456 | Raw Moments R2 Adj = 0.9644
Root MSE (Sigma) = 13.2179 | Log Likelihood Function = -142.5329
------------------------------------------------------------------------------
- R2h= 0.4614 R2h Adj= 0.4337 F-Test = 10.85 P-Value > F(4 , 39) 0.0000
- R2v= 0.4431 R2v Adj= 0.4146 F-Test = 10.08 P-Value > F(4 , 39) 0.0000
------------------------------------------------------------------------------
y | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
y |
L1. | .0267714 .2782332 0.10 0.923 -.5185557 .5720985
|
w1y_y | -.1229202 .0692124 -1.78 0.076 -.2585739 .0127336
x1 | -.2951249 .0833482 -3.54 0.000 -.4584844 -.1317655
x2 | -.8707571 .3158102 -2.76 0.006 -1.489734 -.2517804
_cons | 69.89907 7.676856 9.11 0.000 54.8527 84.94543
------------------------------------------------------------------------------
Rho Value = -0.1229 Chi2 Test = 3.154 P-Value > Chi2(1) 0.0757
------------------------------------------------------------------------------
==============================================================================
* Panel Model Selection Diagnostic Criteria
==============================================================================
- Log Likelihood Function LLF = -142.5329
- Akaike Final Prediction Error AIC = 301.0658
- Schwartz Criterion SC = 314.9671
- Akaike Information Criterion ln AIC = 4.3304
- Schwarz Criterion ln SC = 4.6613
- Amemiya Prediction Criterion FPE = 66.5441
- Hannan-Quinn Criterion HQ = 85.7704
- Rice Criterion Rice = 83.8455
- Shibata Criterion Shibata = 71.6775
- Craven-Wahba Generalized Cross Validation-GCV = 79.2035
------------------------------------------------------------------------------
==============================================================================
*** Spatial Panel Aautocorrelation Tests
==============================================================================
Ho: Error has No Spatial AutoCorrelation
Ha: Error has Spatial AutoCorrelation
- GLOBAL Moran MI = 0.1519 P-Value > Z( 1.442) 0.1493
- GLOBAL Geary GC = 0.8314 P-Value > Z(-1.132) 0.2576
- GLOBAL Getis-Ords GO = -0.4341 P-Value > Z(-1.442) 0.1493
------------------------------------------------------------------------------
- Moran MI Error Test = 0.6777 P-Value > Z(5.742) 0.4980
------------------------------------------------------------------------------
- LM Error (Burridge) = 1.1940 P-Value > Chi2(1) 0.2745
- LM Error (Robust) = 17.7233 P-Value > Chi2(1) 0.0000
------------------------------------------------------------------------------
Ho: Spatial Lagged Dependent Variable has No Spatial AutoCorrelation
Ha: Spatial Lagged Dependent Variable has Spatial AutoCorrelation
- LM Lag (Anselin) = 0.4247 P-Value > Chi2(1) 0.5146
- LM Lag (Robust) = 16.9540 P-Value > Chi2(1) 0.0000
------------------------------------------------------------------------------
Ho: No General Spatial AutoCorrelation
Ha: General Spatial AutoCorrelation
- LM SAC (LMErr+LMLag_R) = 18.1480 P-Value > Chi2(2) 0.0001
- LM SAC (LMLag+LMErr_R) = 18.1480 P-Value > Chi2(2) 0.0001
------------------------------------------------------------------------------
==============================================================================
*** Panel Heteroscedasticity Tests
==============================================================================
Ho: Panel Homoscedasticity - Ha: Panel Heteroscedasticity
- Engle LM ARCH Test AR(1): E2 = E2_1 = 0.0726 P-Value > Chi2(1) 0.7876
------------------------------------------------------------------------------
- Hall-Pagan LM Test: E2 = Yh = 0.3077 P-Value > Chi2(1) 0.5791
- Hall-Pagan LM Test: E2 = Yh2 = 0.2093 P-Value > Chi2(1) 0.6473
- Hall-Pagan LM Test: E2 = LYh2 = 0.2159 P-Value > Chi2(1) 0.6422
------------------------------------------------------------------------------
- Harvey LM Test: LogE2 = X = 4.8798 P-Value > Chi2(2) 0.0872
- Wald Test: LogE2 = X = 12.0405 P-Value > Chi2(1) 0.0005
- Glejser LM Test: |E| = X = 9.9360 P-Value > Chi2(2) 0.0070
- Breusch-Godfrey Test: E = E_1 X = 13.7779 P-Value > Chi2(1) 0.0002
------------------------------------------------------------------------------
- White Test - Koenker(R2): E2 = X = 11.9021 P-Value > Chi2(3) 0.0077
- White Test - B-P-G (SSR): E2 = X = 15.3726 P-Value > Chi2(3) 0.0015
------------------------------------------------------------------------------
- White Test - Koenker(R2): E2 = X X2 = 13.6675 P-Value > Chi2(6) 0.0336
- White Test - B-P-G (SSR): E2 = X X2 = 17.6528 P-Value > Chi2(6) 0.0072
------------------------------------------------------------------------------
- White Test - Koenker(R2): E2 = X X2 XX= 26.5080 P-Value > Chi2(9) 0.0017
- White Test - B-P-G (SSR): E2 = X X2 XX= 34.2374 P-Value > Chi2(9) 0.0001
------------------------------------------------------------------------------
- Cook-Weisberg LM Test: E2/S2n = Yh = 0.3974 P-Value > Chi2(1) 0.5284
- Cook-Weisberg LM Test: E2/S2n = X = 15.3726 P-Value > Chi2(3) 0.0015
------------------------------------------------------------------------------
*** Single Variable Tests (E2/Sig2):
- Cook-Weisberg LM Test: w1y_y = 0.0793 P-Value > Chi2(1) 0.7782
- Cook-Weisberg LM Test: x1 = 6.0091 P-Value > Chi2(1) 0.0142
- Cook-Weisberg LM Test: x2 = 2.1350 P-Value > Chi2(1) 0.1440
------------------------------------------------------------------------------
*** Single Variable Tests:
- King LM Test: w1y_y = 0.2436 P-Value > Chi2(1) 0.6216
- King LM Test: x1 = 1.6791 P-Value > Chi2(1) 0.1950
- King LM Test: x2 = 2.6472 P-Value > Chi2(1) 0.1037
------------------------------------------------------------------------------
==============================================================================
* Panel Non Normality Tests
==============================================================================
Ho: Normality - Ha: Non Normality
------------------------------------------------------------------------------
*** Non Normality Tests:
- Jarque-Bera LM Test = 0.6646 P-Value > Chi2(2) 0.7173
- White IM Test = 8.8177 P-Value > Chi2(2) 0.0122
- Doornik-Hansen LM Test = 3.0700 P-Value > Chi2(2) 0.2155
- Geary LM Test = -1.2014 P-Value > Chi2(2) 0.5484
- Anderson-Darling Z Test = 0.4429 P > Z( 0.549) 0.7085
- D'Agostino-Pearson LM Test = 1.5321 P-Value > Chi2(2) 0.4648
------------------------------------------------------------------------------
*** Skewness Tests:
- Srivastava LM Skewness Test = 0.0695 P-Value > Chi2(1) 0.7921
- Small LM Skewness Test = 0.0888 P-Value > Chi2(1) 0.7658
- Skewness Z Test = -0.2979 P-Value > Chi2(1) 0.7658
------------------------------------------------------------------------------
*** Kurtosis Tests:
- Srivastava Z Kurtosis Test = 0.7715 P-Value > Z(0,1) 0.4404
- Small LM Kurtosis Test = 1.4433 P-Value > Chi2(1) 0.2296
- Kurtosis Z Test = 1.2014 P-Value > Chi2(1) 0.2296
------------------------------------------------------------------------------
Skewness Coefficient = -0.0996 - Standard Deviation = 0.3654
Kurtosis Coefficient = 3.5832 - Standard Deviation = 0.7166
------------------------------------------------------------------------------
Runs Test: (18) Runs - (19) Positives - (23) Negatives
Standard Deviation Runs Sig(k) = 3.1709 , Mean Runs E(k) = 21.8095
95% Conf. Interval [E(k)+/- 1.96* Sig(k)] = (15.5947 , 28.0244 )
------------------------------------------------------------------------------
* Linear: Marginal Effect - Elasticity - Spatial Panel *
+---------------------------------------------------------------------------+
| Variable | Marginal_Effect(B) | Elasticity(Es) | Mean |
|------------+--------------------+--------------------+--------------------|
| L.y | 0.0268 | 0.0265 | 34.7923 |
| w1y_y | -0.1229 | -0.3499 | 100.0064 |
| x1 | -0.2951 | -0.3229 | 38.4362 |
| x2 | -0.8708 | -0.3563 | 14.3749 |
+---------------------------------------------------------------------------+
Mean of Dependent Variable = 35.1288