全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
29804 55
2014-10-22
近几年遇到许多朋友,都是做空间计量的。这里有一个命令,用系统的数据演示一下他们的结果。
命令为 spregdpd


clear all
sysuse spregdpd.dta, clear
db spregdpd
* (1) (xtdhp) Han-Philips (2010) Linear Dynamic Panel Data:}
spregdpd y x1 x2 , nc(7) wmfile(SPWxt) model(sar) run(xtdhp) mfx(lin) test
spregdpd y x1 x2 , nc(7) wmfile(SPWxt) model(sar) run(xtdhp) mfx(lin) test re
spregdpd y x1 x2 , nc(7) wmfile(SPWxt) model(sar) run(xtdhp) mfx(lin) test fe
spregdpd y x1 x2 , nc(7) wmfile(SPWxt) model(sar) run(xtdhp) mfx(lin) test be

结果如下:
spregdpd y x1 x2 , nc(7) wmfile(SPWxt) model(sar) run(xtdhp) mfx(lin) test
==============================================================================
*** 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 , 38)     =      0.0000
(Buse 1973) R2     =      0.5789   |   Raw Moments R2          =      0.9661
(Buse 1973) R2 Adj =      0.5456   |   Raw Moments R2 Adj      =      0.9635
  Root MSE (Sigma)  =     13.3907   |   Log Likelihood Function =   -142.5329
------------------------------------------------------------------------------
- R2h= 0.4614   R2h Adj= 0.4188  F-Test =    7.92 P-Value > F(4 , 38)  0.0001
- R2v= 0.4431   R2v Adj= 0.3992  F-Test =    7.36 P-Value > F(4 , 38)  0.0002
------------------------------------------------------------------------------
           y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           y |
         L1. |   .0267714   .2782332     0.10   0.924    -.5364823    .5900251
             |
       w1y_y |  -.1229202   .0692124    -1.78   0.084    -.2630333     .017193
          x1 |  -.2951249   .0833482    -3.54   0.001    -.4638545   -.1263953
          x2 |  -.8707571   .3158102    -2.76   0.009    -1.510081   -.2314327
       _cons |   69.89907   7.676856     9.11   0.000     54.35808    85.44005
------------------------------------------------------------------------------
  Rho Value  = -0.1229       Chi2 Test =     3.154   P-Value > Chi2(1)  0.0837
------------------------------------------------------------------------------
==============================================================================
* Panel Model Selection Diagnostic Criteria
==============================================================================
- Log Likelihood Function                   LLF            =   -142.5329
---------------------------------------------------------------------------
- Akaike Information Criterion              (1974) AIC     =     65.8578
- Akaike Information Criterion              (1973) Log AIC =      4.1875
---------------------------------------------------------------------------
- Schwarz Criterion                         (1978) SC      =     80.9931
- Schwarz Criterion                         (1978) Log SC  =      4.3944
---------------------------------------------------------------------------
- Amemiya Prediction Criterion              (1969) FPE     =     64.1975
- Hannan-Quinn Criterion                    (1979) HQ      =     71.0456
- Rice Criterion                            (1984) Rice    =     68.1245
- Shibata Criterion                         (1981) Shibata =     64.2625
- Craven-Wahba Generalized Cross Validation (1979) GCV     =     66.8804
------------------------------------------------------------------------------
==============================================================================
*** 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.7885     P-Value > Z(6.648)    0.4304
------------------------------------------------------------------------------
- LM Error (Burridge)        =   1.1335     P-Value > Chi2(1)     0.2870
- LM Error (Robust)          =   4.2647     P-Value > Chi2(1)     0.0389
------------------------------------------------------------------------------
  Ho: Spatial Lagged Dependent Variable has No Spatial AutoCorrelation
  Ha: Spatial Lagged Dependent Variable has    Spatial AutoCorrelation
- LM Lag (Anselin)           =   0.2512     P-Value > Chi2(1)     0.6163
- LM Lag (Robust)            =   3.3823     P-Value > Chi2(1)     0.0659
------------------------------------------------------------------------------
  Ho: No General Spatial AutoCorrelation
  Ha:    General Spatial AutoCorrelation
- LM SAC (LMErr+LMLag_R)     =   4.5159     P-Value > Chi2(2)     0.1046
- LM SAC (LMLag+LMErr_R)     =   4.5159     P-Value > Chi2(2)     0.1046
------------------------------------------------------------------------------
==============================================================================
*** 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                        =   5.3990     P-Value > Chi2(2) 0.0672
- 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 )
------------------------------------------------------------------------------
* Marginal Effect - Elasticity (Model= sar): Linear *
+---------------------------------------------------------------------------+
|   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



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-10-22 11:51:58
好帖 沙发
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-10-22 15:37:22
zhichi  xiexie
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-10-22 20:02:56
很好先收藏
看来楼主真是精通各软件啊
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-10-27 23:24:08
谢谢楼主
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-11-13 12:00:13
请问,第一条命令里面的run(xtdhp)是什么意思
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群