+-------+ ----+ Title +------------------------------------------------------------
spregdpd: Spatial Panel Arellano-Bond Linear Dynamic Regression: Lag & Durbin M > odels
+-------------------+ ----+ Table of Contents +------------------------------------------------
Syntax Description Model Options Run Options Options Spatial Panel Aautocorrelation Tests Model Selection Diagnostic Criteria Heteroscedasticity Tests Non Normality Tests Saved Results References
*** Examples
Authors
+--------+ ----+ Syntax +-----------------------------------------------------------
spregdpd depvar indepvars [weight] , nc(#) wmfile(weight_file) [ model(sar|sdm) run(xtabond|xtdhp|xtdpd|xtdpdsys) be fe re lmspac lmhet lmnorm diag tests stand inv inv2 mfx(lin, log) noconstant predict(new_var) resid(new_var) inst(vars) diff(vars) endog(vars) pre(vars) dgmmiv(varlist) coll zero tolog twostep level(#) vce(vcetype) ]
+-------------+ ----+ Description +------------------------------------------------------
spregdpd estimates Spatial Panel Arellano-Bond Linear Dynamic Regression: Lag & Durbin Models Many types of spatial autocorrelations were taken under consedration, i.e.,
spregdpd can generate: - Binary / Standardized Weight Matrix. - Inverse / Inverse Squared Standardized Weight Matrix. - Binary / Standardized / Inverse Eigenvalues Variable.
R2, R2 Adjusted, and F-Test, are obtained from 4 ways: 1- (Buse 1973) R2. 2- Raw Moments R2. 3- squared correlation between predicted (Yh) and observed dependent variable (Y). 4- Ratio of variance between predicted (Yh) and observed dependent variable (Y).
- Adjusted R2: R2_a=1-(1-R2)*(N-1)/(N-K-1). - F-Test=R2/(1-R2)*(N-K-1)/(K).
+---------------+ ----+ Model Options +----------------------------------------------------
1- model(sar) MLE Spatial Panel Lag Model (SAR) 2- model(sdm) MLE Spatial Panel Durbin Model (SDM)
+-------------+ ----+ Run Options +------------------------------------------------------
1- run(xtdhp) [NEW] Han-Philips (2010) Linear Dynamic Panel Regression 2- run(xtabond) [xtabond] Arellano-Bond Linear Dynamic Panel Regression 3- run(xtdpd) [xtdpd] Arellano-Bond (1991) Linear Dynamic Panel Regression 4- run(xtdpdsys) [xtdpdsys] Arellano-Bover/Blundell-Bond (1995, 1998) System Linear Dynamic Panel Regression
+---------+ ----+ Options +----------------------------------------------------------
* nc(#) Number of Cross Sections Units Time series observations must be Balanced in each Cross Section
wmfile(weight_file) Open CROSS SECTION weight matrix file. spregdpd will convert automatically spatial cross section we > ight matrix to spatial PANEL weight matrix.
Spatial Weight Matrix file must be: 1- [SxS] Cross Sections units Dimentions, and not Panel dimentions 2- Square Matrix 3- Symmetric Matrix
Spatial Panel Weight Matrix has two types: Standardized and binary weight mat > rix.
stand Use Standardized Panel Weight Matrix, (each row sum equals 1 > ) Default is Binary spatial panel weight matrix which each ele > ment is 0 or 1
inv Use Inverse Standardized Weight Matrix (1/W)
inv2 Use Inverse Squared Standardized Weight Matrix (1/W^2)
be Between Effects (BE) run(xthdp) fe Fixed-Effects (FE) run(xthdp) re GLS-Random-Effects (RE) run(xthdp)
zero convert missing values observations to Zero
coll keep collinear variables; default is removing collinear vari > ables.
noconstant Exclude Constant Term from Equation
tests display ALL lmh, lmn, lmsp, diag tests
dn Use (N) divisor instead of (N-K) for Degrees of Freedom (DF)
twostep two-step estimate run(xtdpd)
mfx(lin, log) functional form: Linear model (lin), or Log-Log model (log), to compute Marginal Effects and Elasticities - In Linear model: marginal effects are the coefficients (Bm), and elasticities are (Es = Bm X/Y). - In Log-Log model: elasticities are the coefficients (Es), and the marginal effects are (Bm = Es Y/X). - mfx(log) and tolog options must be combined, to transform linear variables > to log form.
tolog Convert dependent and independent variables to LOG Form in the memory for Log-Log regression. tolog Transforms depvar and indepvars to Log Form without lost the original data variables
predict(new_variable) Predicted values variable
resid(new_variable) Residuals values variable computed as Ue=Y-Yh ; that is known as combined residual: [Ue = > U_i + E_it] in xtreg models overall error component is computed as: [E_it] see: xtreg postestimation##predict
dgmmiv(varlist) GMM Instruments for Differenced Equation run(xtdpd)
inst(varlist) Additional Instrumental Variables run(xtabond) Dependent Variable Lag length is lag(1)
diff(varlist) Already Differenced Exogenous Variables run(xtabond)
endog(varlist) Endogenous Variables run(xtabond, xtdpdsys)
pre(varlist) Predetermined Variables run(xtabond, xtdpdsys)
vce(vcetype) ols, robust, cluster, bootstrap, jackknife, hc2, hc3
level(#) confidence intervals level; default is level(95)
+--------------------------------------+ ----+ Spatial Panel Aautocorrelation Tests +-----------------------------
lmspac Spatial Panel Aautocorrelation Tests: * Ho: Error has No Spatial AutoCorrelation Ha: Error has Spatial AutoCorrelation - GLOBAL Moran MI Test - GLOBAL Geary GC Test - GLOBAL Getis-Ords GO Test - Moran MI Error Test - LM Error [SEM] (Burridge) Test - LM Error [SEM] (Robust) Test * Ho: Spatial Lagged Dependent Variable has No Spatial AutoCorrelation Ha: Spatial Lagged Dependent Variable has Spatial AutoCorrelation - LM Lag [SAR] (Anselin) Test - LM Lag [SAR] (Robust) Test * Ho: No General Spatial AutoCorrelation Ha: General Spatial AutoCorrelation - LM SAC (LMErr+LMLag_R) Test - LM SAC (LMLag+LMErr_R) Test
Definitions:
- Spatial autocorrelation: chock in one country affects neighboring countrie > s
- Spatial autocorrelation: is correlation of a variable with itself in space > .
- Spatial Lag Model: Y = BX + rWy + e ; e = lWe+u - Spatial Error Model: Y = BX + e ; e = lWe+u - Spatial Durbin Model: Y = BX + aWX* + rWy + e ; e = lWe+u - General Spatial Model: Y = BX + rWy + LW1y + e ; e = lW1e+u - General Spatial Model: Y = BX + rWy + LW1y + e ; e = lW1e+u
- General Spatial Model is used to deal with both types of spatial dependenc > e, namely Spatial Lag Dependence and Spatial Error Dependence
- Spatial Error Model is used to handle the spatial dependence due to the omitted variables or errors in measurement through the error term
- Spatial Autoregressive Model (SAR) is also known as Spatial Lag Model
- Positive spatial autocorrelation exists when high values correlate with high neighboring values or when low values correlate with low neighboring values
- Negative spatial autocorrelation exists when high values correlate with low neighboring values and vice versa.
- presence of positive spatial autocorrelation results in a loss of informat > ion, which is related to greater uncertainty, less precision, and larger standa > rd errors.
- Spatial autocorrelation coefficients (in contrast to their counterparts in > time) are not constrained by -1/+1. Their range depends on the choice of weights > matrix.
- Spatial dependence exists when the value associated with one location is dependent on those of other locations.
- Spatial heterogeneity exists when structural changes related to location exist in a dataset, it can result in non-constant error variance (heteroscedasticity) across areas, especially when scale-related measurement errors are present.
- Spatial regression models are statistical models that account for the presence of spatial effects, i.e., spatial autocorrelation (or more generally spatial dependence) and/or spatial heterogeneity.
- if LM test for spatial lag is more significant than LM test for spatial er > ror, and robust LM test for spatial lag is significant but robust LM test for spatial error is not, then the appropriate model is spatial lag model. Conversely, if LM test for spatial error is more significant than LM test for spatial lag and robust LM test for spatial error is significant but robust LM test for spatial lag is not, then the appropriate specificat > ion is spatial error model, [Anselin-Florax (1995)]. - robust versions of Spatial LM tests are considered only when standard versions (LM-Lag or LM-Error) are significant - General Spatial Model is used to deal with both types of spatial dependenc > e, namely spatial lag dependence and spatial error dependence - Spatial Error Model is used to handle spatial dependence due to omitted variables or errors in measurement through the error term - Spatial Autoregressive Model (SAR) is also known as Spatial Lag Model
+-------------------------------------------+ ----+ Panel Model Selection Diagnostic Criteria +------------------------
diag Spatial Panel Model Selection Diagnostic Criteria: - Log Likelihood Function LLF - Akaike Final Prediction Error AIC - Schwartz Criterion SC - Akaike Information Criterion ln AIC - Schwarz Criterion ln SC - Amemiya Prediction Criterion FPE - Hannan-Quinn Criterion HQ - Rice Criterion Rice - Shibata Criterion Shibata - Craven-Wahba Generalized Cross Validation-GCV
+--------------------------------+ ----+ Panel Heteroscedasticity Tests +-----------------------------------
lmhet Spatial Panel Heteroscedasticity Tests: * Ho: Panel Homoscedasticity - Ha: Panel Heteroscedasticity - Engle LM ARCH Test AR(1) E2 =E2_1 - Hall-Pagan LM Test: E2 = Yh - Hall-Pagan LM Test: E2 = Yh2 - Hall-Pagan LM Test: E2 = LYh2 - Harvey LM Test: LogE2 = X - Wald Test: LogE2 = X - Glejser LM Test: |E| = X - Machado-Santos-Silva LM Test: Ev= Yh Yh2 - Machado-Santos-Silva LM Test: Ev= X - Breusch-Godfrey Test: E = E_1 X - White Test - Koenker(R2): E2 = X - White Test - B-P-G (SSR): E2 = X - White Test - Koenker(R2): E2 = X X2 - White Test - B-P-G (SSR): E2 = X X2 - White Test - Koenker(R2): E2 = X X2 XX - White Test - B-P-G (SSR): E2 = X X2 XX - Cook-Weisberg LM Test E = Yh - Cook-Weisberg LM Test E = X *** Single Variable Tests - Cook-Weisberg LM Test: E = xi - King LM Test: E = xi
*** Groupwise Panel Heteroscedasticity Tests * Ho: Panel Homoscedasticity - Ha: Panel Groupwise Heteroscedasticity - Lagrange Multiplier LM Test - Likelihood Ratio LR Test - Wald Test
+---------------------------+ ----+ Panel Non Normality Tests +----------------------------------------
lmnorm Spatial Panel Non Normality Tests: * Ho: Panel Normality - Ha: Panel Non Normality *** Non Normality Tests: - Jarque-Bera LM Test - White IM Test - Doornik-Hansen LM Test - Geary LM Test - Anderson-Darling Z Test - D'Agostino-Pearson LM Test *** Skewness Tests: - Srivastava LM Skewness Test - Small LM Skewness Test - Skewness Z Test - Skewness Coefficient - Standard Deviation *** Kurtosis Tests: - Srivastava Z Kurtosis Test - Small LM Kurtosis Test - Kurtosis Z Test - Kurtosis Coefficient - Standard Deviation *** Runs Tests: - Runs Test: - Standard Deviation Runs Sig(k) - Mean Runs E(k) - 95% Conf. Interval [E(k)+/- 1.96* Sig(k)]
+---------------+ ----+ Saved Results +----------------------------------------------------
Depending on the model estimated, spregdpd saves the following results in e():
Scalars
*** Spatial Panel Aautocorrelation Tests: e(mig) GLOBAL Moran MI Test e(migp) GLOBAL Moran MI Test P-Value e(gcg) GLOBAL Geary GC Test e(gcgp) GLOBAL Geary GC Test P-Value e(gog) GLOBAL Getis-Ords Test GO e(gogp) GLOBAL Getis-Ords GO Test P-Value e(mi1) Moran MI Error Test e(mi1p) Moran MI Error Test P-Value e(lmerr) LM Error (Burridge) Test e(lmerrp) LM Error (Burridge) Test P-Value e(lmerrr) LM Error (Robust) Test e(lmerrrp) LM Error (Robust) Test P-Value e(lmlag) LM Lag (Anselin) Test e(lmlagp) LM Lag (Anselin) Test P-Value e(lmlagr) LM Lag (Robust) Test e(lmlagrp) LM Lag (Robust) Test P-Value e(lmsac1) LM SAC (LMLag+LMErr_R) Test e(lmsac1p) LM SAC (LMLag+LMErr_R) Test P-Value e(lmsac2) LM SAC (LMErr+LMLag_R) Test e(lmsac2p) LM SAC (LMErr+LMLag_R) Test P-Value
*** Spatial Panel Model Selection Diagnostic Criteria: e(N) number of observations e(r2bu) R-squared (Buse 1973) e(r2bu_a) R-squared Adj (Buse 1973) e(r2raw) Raw Moments R2 e(r2raw_a) Raw Moments R2 Adj e(f) F-test e(fp) F-test P-Value e(wald) Wald-test e(waldp) Wald-test P-Value
e(r2h) R2 Between Predicted (Yh) and Observed DepVar (Y) e(r2h_a) Adjusted r2h e(fh) F-test due to r2h e(fhp) F-test due to r2h P-Value
e(r2v) R2 Variance Ratio Between Predicted (Yh) and Observed DepVar > (Y) e(r2v_a) Adjusted r2v e(fv) F-test due to r2v e(fvp) F-test due to r2v P-Value
e(sig) Root MSE (Sigma) e(llf) Log Likelihood Function e(aic) Akaike Final Prediction Error AIC e(sc) Schwartz Criterion SC e(laic) Akaike Information Criterion ln AIC e(lsc) Schwarz Criterion Log SC e(fpe) Amemiya Prediction Criterion FPE e(hq) Hannan-Quinn Criterion HQ e(shibata) Shibata Criterion Shibata e(rice) Rice Criterion Rice e(gcv) Craven-Wahba Generalized Cross Validation-GCV e(df1) DF1 e(df2) DF2 e(rmse) Root Mean Squared Error e(rss) Residual Sum of Squares e(wald) Wald Test e(waldp) Wald Test P-Value
*** Spatial Panel Heteroscedasticity Tests: e(lmharch) Engle LM ARCH Test AR(1) e(lmharchp) Engle LM ARCH Test AR(1) P-Value e(lmhhp1) Hall-Pagan LM Test E2 = Yh e(lmhhp1p) Hall-Pagan LM Test E2 = Yh P-Value e(lmhhp2) Hall-Pagan LM Test E2 = Yh2 e(lmhhp2p) Hall-Pagan LM Test E2 = Yh2 P-Value e(lmhhp3) Hall-Pagan LM Test E2 = Yh3 e(lmhhp3p) Hall-Pagan LM Test E2 = Yh3 P-Value e(lmhw01) White Test - Koenker(R2) E2 = X e(lmhw01p) White Test - Koenker(R2) E2 = X P-Value e(lmhw02) White Test - B-P-G (SSR) E2 = X e(lmhw02p) White Test - B-P-G (SSR) E2 = X P-Value e(lmhw11) White Test - Koenker(R2) E2 = X X2 e(lmhw11p) White Test - Koenker(R2) E2 = X X2 P-Value e(lmhw12) White Test - B-P-G (SSR) E2 = X X2 e(lmhw12p) White Test - B-P-G (SSR) E2 = X X2 P-Value e(lmhw21) White Test - Koenker(R2) E2 = X X2 XX e(lmhw21p) White Test - Koenker(R2) E2 = X X2 XX P-Value e(lmhw22) White Test - B-P-G (SSR) E2 = X X2 XX e(lmhw22p) White Test - B-P-G (SSR) E2 = X X2 XX P-Value e(lmhharv) Harvey LM Test e(lmhharvp) Harvey LM Test P-Value e(lmhwald) Wald Test e(lmhwaldp) Wald Test P-Value e(lmhgl) Glejser LM Test e(lmhglp) Glejser LM Test P-Value e(lmhmss1) Machado-Santos-Silva LM Test: Ev=Yh Yh2 e(lmhmss1p) Machado-Santos-Silva LM Test: Ev=Yh Yh2 P-Value e(lmhmss2) Machado-Santos-Silva LM Test: Ev=X e(lmhmss2p) Machado-Santos-Silva LM Test: Ev=X P-Value e(lmhbg) Breusch-Godfrey Test e(lmhbgp) Breusch-Godfrey Test P-Value e(lmhcw1) Cook-Weisberg LM Test E = Yh e(lmhcw1p) Cook-Weisberg LM Test E = Y P-Valueh e(lmhcw2) Cook-Weisberg LM Test E = X e(lmhcw2p) Cook-Weisberg LM Test E = X P-Value
*** Spatial Panel Groupwise Heteroscedasticity Tests: e(lmhglm) Lagrange Multiplier LM Test e(lmhglmp) Lagrange Multiplier LM Test P-Value e(lmhglr) Likelihood Ratio LR Test e(lmhglrp) Likelihood Ratio LR Test P-Value e(lmhgw) Wald Test e(lmhgwp) Wald Test P-Value
*** Spatial Panel Non Normality Tests: e(lmnjb) Jarque-Bera LM Test e(lmnjbp) Jarque-Bera LM Test P-Value e(lmnw) White IM Test e(lmnwp) White IM Test P-Value e(lmndh) Doornik-Hansen LM Test e(lmndhp) Doornik-Hansen LM Test P-Value e(lmng) Geary LM Test e(lmngp) Geary LM Test P-Value e(lmnad) Anderson-Darling Z Test e(lmnadp) Anderson-Darling Z Test P-Value e(lmndp) D'Agostino-Pearson LM Test e(lmndpp) D'Agostino-Pearson LM Test P-Value e(lmnsvs) Srivastava LM Skewness Test e(lmnsvsp) Srivastava LM Skewness Test P-Value e(lmnsms1) Small LM Skewness Test e(lmnsms1p) Small LM Skewness Test P-Value e(lmnsms2) Skewness Z Test e(lmnsms2p) Skewness Z Test P-Value e(lmnsvk) Srivastava Z Kurtosis Test e(lmnsvkp) Srivastava Z Kurtosis Test P-Value e(lmnsmk1) Small LM Kurtosis Test e(lmnsmk1p) Small LM Kurtosis Test P-Value e(lmnsmk2) Kurtosis Z Test e(lmnsmk2p) Kurtosis Z Test P-Value e(sk) Skewness Coefficient e(sksd) Skewness Standard Deviation e(ku) Kurtosis Coefficient e(kusd) Kurtosis Standard Deviation e(sn) Standard Deviation Runs Sig(k) e(en) Mean Runs E(k) e(lower) Lower 95% Conf. Interval [E(k)- 1.96* Sig(k)] e(upper) Upper 95% Conf. Interval [E(k)+ 1.96* Sig(k)]
Matrixes e(b) coefficient vector e(V) variance-covariance matrix of the estimators e(mfx) Marginal Effect e(mfxe) Elasticity
+------------+ ----+ References +-------------------------------------------------------
Anselin, L. (2001) "Spatial Econometrics", In Baltagi, B. (Ed).: A Companion to Theoretical Econometrics Basil Blackwell: Oxford, UK.
Anselin, L. (2007) "Spatial Econometrics", In T. C. Mills and K. Patterson (Eds).: Palgrave Handbook of Econometrics. Vol 1, Econometric Theory. New York: Palgrave MacMillan.
Anselin, L. & Kelejian, H. H. (1997) "Testing for Spatial Error Autocorrelation in the Presence of Endogenous Regressors", International Regional Science Review, (20); 153-182.
Anselin, L. & Florax RJ. (1995) "New Directions in Spatial Econometrics: Introduction. In New Directions in Spatial Econometrics", Anselin L, Florax RJ (eds). Berlin, Germany: Springer-Verlag.
Anselin L., Le Gallo J. & Jayet H (2006) "Spatial Panel Econometrics" In: Matyas L, Sevestre P. (eds) The Econometrics of Panel Data, Fundamentals and Recent Developments in Theory and Practice, 3rd edn. Kluwer, Dordrecht; 901-969.
Arellano, M. and S. Bond (1991) "Some Tests of Specification for Panel Data: Monte Carlo Evidence and an Application to Employment Equations" The Review of Economic Studies 58; 277-297.
Arellano, M. and S. Bond (1998) "Dynamic Panel Data Estimation Using DPD98 for Gauss" : A Guide for Users.
Arellano, M. and O. Bover (1995) "Another Look at the Instrumental Variable Estimation of Error-Components Models" Journal of Econometrics 68; 29-51.
Bera, A., W. Sosa-Escudero, & M. Yoon (2001) "Tests for the Error Component Model in the Presence of Local Misspecification" Journal of Econometrics 101; 1-23.
Breusch, Trevor & Adrian Pagan (1980) "The Lagrange Multiplier Test and its Applications to Model Specification in Econometrics", Review of Economic Studies 47; 239-253.
Brundson,C. A. S. Fotheringham, & M. Charlton (1996) "Geographically Weighted Regression: A Method for Exploring Spatial Nonstationarity" Geographical Analysis,V ol. 28; 281-298.
C.M. Jarque & A.K. Bera (1987) "A Test for Normality of Observations and Regression Residuals" International Statistical Review , Vol. 55; 163-172.
Cook, R.D., & S. Weisberg (1983) "Diagnostics for Heteroscedasticity in Regression", Biometrica 70; 1-10.
D'Agostino, R. B., & Rosman, B. (1974) "The Power of Geary’s Test of Normality", Biometrika, 61(1); 181-184.
Damodar Gujarati (1995) "Basic Econometrics" 3rd Edition, McGraw Hill, New York, USA.
Elhorst, J. Paul (2003) "Specification and Estimation of Spatial Panel Data Models" International Regional Science review 26, 3; 244–268.
Elhorst, J. Paul (2009) "Spatial Panel Data Models" in Mandfred M. Fischer and Arthur Getis, eds., Handbook of Applied Spatial Analysis, Berlin: Springer.
Engle, Robert (1982) "Autoregressive Conditional Heteroscedasticity with Estimates of Variance of United Kingdom Inflation" Econometrica, 50(4), July; 987-1007.
Geary R.C. (1947) "Testing for Normality" Biometrika, Vol. 34; 209-242.
Geary R.C. (1970) "Relative Efficiency of Count of Sign Changes for Assessing Residuals Autoregression in Least Squares Regression" Biometrika, Vol. 57; 123-127.
Greene, William (2007) "Econometric Analysis", 6th ed., Macmillan Publishing Company Inc., New York, USA..
Han, Chirok & Peter C.B. Phillips (2010) "GMM Estimation for Dynamic Panels with Fixed Effects and Strong at Unity" Econometric Theory, 26; 119–151.
Harvey, Andrew (1990) "The Econometric Analysis of Time Series", 2nd edition, MIT Press, Cambridge, Massachusetts.
James LeSage and R. Kelly Pace (2009) "Introduction to Spatial Econometrics", Publisher: Chapman & Hall/CRC.
Judge, Georege, R. Carter Hill, William . E. Griffiths, Helmut Lutkepohl, & Tsoung-Chao Lee (1988) "Introduction To The Theory And Practice Of Econometrics", 2nd ed., John Wiley & Sons, Inc., New York, USA.
Judge, Georege, W. E. Griffiths, R. Carter Hill, Helmut Lutkepohl, & Tsoung-Chao Lee(1985) "The Theory and Practice of Econometrics", 2nd ed., John Wiley & Sons, Inc., New York, USA.
Kmenta, Jan (1986) "Elements of Econometrics", 2nd ed., Macmillan Publishing Company, Inc., New York, USA; 618-625.
Koenker, R. (1981) "A Note on Studentizing a Test for Heteroskedasticity", Journal of Econometrics, Vol.17; 107-112.
Pagan, Adrian .R. & Hall, D. (1983) "Diagnostic Tests as Residual Analysis", Econometric Reviews, Vol.2, No.2,. 159-218.
Pearson, E. S., D'Agostino, R. B., & Bowman, K. O. (1977) "Tests for Departure from Normality: Comparison of Powers", Biometrika, 64(2); 231-246.
Szroeter, J. (1978) "A Class of Parametric Tests for Heteroscedasticity in Linear Econometric Models", Econometrica, 46; 1311-28.
White, Halbert (1980) "A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity", Econometrica, 48; 817-838.
Wooldridge, Jeffrey M. (2002) "Econometric Analysis of Cross Section and Panel Data", The MIT Press, Cambridge, Massachusetts, London, England.
+----------+ ----+ Examples +---------------------------------------------------------
Note 1: you can use: spweight, spweightcs, spweightxt to create Spatial Weight > Matrix. Note 2: Remember, your spatial weight matrix must be: *** 1-Cross Section Dimention 2- Square Matrix 3- Symmetric Matrix Note 3: You can use the dialog box for spregdpd. Note 4: xtset is included automatically in spregdpd models. -------------------------------------------------------------------------------
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) re spregdpd y x1 x2 , nc(7) wmfile(SPWxt) model(sar) run(xtdhp) fe spregdpd y x1 x2 , nc(7) wmfile(SPWxt) model(sar) run(xtdhp) be -------------------------------------------------------------------------------
* (2) (xtdpd) Arellano-Bond (1991) Linear Dynamic Panel Data: spregdpd y x1 x2 , nc(7) wmfile(SPWxt) model(sar) run(xtdpd) dgmmiv(x1 x2) mfx( > lin) test -------------------------------------------------------------------------------
* (3) (xtdpdsys) Arellano-Bover/Blundell-Bond (1995, 1998) System Linear Dynami > c Panel Data: spregdpd y x1 x2 , nc(7) wmfile(SPWxt) model(sar) run(xtdpdsys) mfx(lin) test -------------------------------------------------------------------------------
* (4) (xtabond) Arellano-Bond Linear Dynamic Panel Data: spregdpd y x1 x2 , nc(7) wmfile(SPWxt) model(sar) run(xtabond) inst(x1 x2) mfx( > lin) test spregdpd y x1 x2 , nc(7) wmfile(SPWxt) model(sar) run(xtabond) inst(x1 x2) pre( > x1 x2) -------------------------------------------------------------------------------
. clear all . sysuse spregdpd.dta, clear . 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 = 51.2187 | P-Value > Chi2(4) = 0.0000 F-Test = 12.8047 | P-Value > F(4 , 38) = 0.0000 (Buse 1973) R2 = 0.5741 | Raw Moments R2 = 0.9398 (Buse 1973) R2 Adj = 0.5405 | Raw Moments R2 Adj = 0.9351 Root MSE (Sigma) = 15.5888 | Log Likelihood Function = -154.5282 ------------------------------------------------------------------------------ - R2h= 0.5714 R2h Adj= 0.5376 F-Test = 16.44 P-Value > F(4 , 38) 0.0000 - R2v= 0.6421 R2v Adj= 0.6139 F-Test = 22.13 P-Value > F(4 , 38) 0.0000 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- y | L1. | .3182568 .1985711 1.60 0.117 -.0837294 .7202429 | w1y_y | .0033666 .0489628 0.07 0.946 -.0957535 .1024867 x1 | -.3785716 .0887871 -4.26 0.000 -.5583117 -.1988314 x2 | -1.327288 .3396291 -3.91 0.000 -2.014831 -.6397446 _cons | 46.90497 5.612251 8.36 0.000 35.54357 58.26638 ------------------------------------------------------------------------------ Rho Value = 0.0034 Chi2 Test = 0.005 P-Value > Chi2(1) 0.9455 ------------------------------------------------------------------------------ ============================================================================== * Panel Model Selection Diagnostic Criteria ==============================================================================
- Log Likelihood Function LLF = -154.5282 - Akaike Final Prediction Error AIC = 319.0563 - Schwartz Criterion SC = 327.7447 - Akaike Information Criterion ln AIC = 4.7587 - Schwarz Criterion ln SC = 4.9656 - Amemiya Prediction Criterion FPE = 113.6551 - Hannan-Quinn Criterion HQ = 125.7791 - Rice Criterion Rice = 120.6074 - Shibata Criterion Shibata = 113.7703 - Craven-Wahba Generalized Cross Validation-GCV = 118.4050 ------------------------------------------------------------------------------
============================================================================== *** Spatial Panel Aautocorrelation Tests ============================================================================== Ho: Error has No Spatial AutoCorrelation Ha: Error has Spatial AutoCorrelation
- GLOBAL Moran MI = -0.0540 P-Value > Z(-0.241) 0.8098 - GLOBAL Geary GC = 0.9516 P-Value > Z(-0.337) 0.7363 - GLOBAL Getis-Ords GO = 0.1544 P-Value > Z(0.241) 0.8098 ------------------------------------------------------------------------------ - Moran MI Error Test = 0.1799 P-Value > Z(1.658) 0.8572 ------------------------------------------------------------------------------ - LM Error (Burridge) = 0.1435 P-Value > Chi2(1) 0.7049 - LM Error (Robust) = 0.2699 P-Value > Chi2(1) 0.6034 ------------------------------------------------------------------------------ Ho: Spatial Lagged Dependent Variable has No Spatial AutoCorrelation Ha: Spatial Lagged Dependent Variable has Spatial AutoCorrelation
- LM Lag (Anselin) = 0.0283 P-Value > Chi2(1) 0.8664 - LM Lag (Robust) = 0.1547 P-Value > Chi2(1) 0.6941 ------------------------------------------------------------------------------ Ho: No General Spatial AutoCorrelation Ha: General Spatial AutoCorrelation
- LM SAC (LMErr+LMLag_R) = 0.2982 P-Value > Chi2(2) 0.8615 - LM SAC (LMLag+LMErr_R) = 0.2982 P-Value > Chi2(2) 0.8615 ------------------------------------------------------------------------------
============================================================================== *** Panel Heteroscedasticity Tests ============================================================================== Ho: Panel Homoscedasticity - Ha: Panel Heteroscedasticity
- Engle LM ARCH Test AR(1): E2 = E2_1 = 0.1498 P-Value > Chi2(1) 0.6987 ------------------------------------------------------------------------------ - Hall-Pagan LM Test: E2 = Yh = 0.2754 P-Value > Chi2(1) 0.5997 - Hall-Pagan LM Test: E2 = Yh2 = 0.8971 P-Value > Chi2(1) 0.3436 - Hall-Pagan LM Test: E2 = LYh2 = 0.0375 P-Value > Chi2(1) 0.8465 ------------------------------------------------------------------------------ - Harvey LM Test: LogE2 = X = 1.0744 P-Value > Chi2(2) 0.5844 - Wald Test: LogE2 = X = 2.6510 P-Value > Chi2(1) 0.1035 - Glejser LM Test: |E| = X = 3.4689 P-Value > Chi2(2) 0.1765 - Breusch-Godfrey Test: E = E_1 X = 2.6890 P-Value > Chi2(1) 0.1010 ------------------------------------------------------------------------------ - White Test - Koenker(R2): E2 = X = 6.9894 P-Value > Chi2(3) 0.0722 - White Test - B-P-G (SSR): E2 = X = 7.0490 P-Value > Chi2(3) 0.0704 ------------------------------------------------------------------------------ - White Test - Koenker(R2): E2 = X X2 = 13.3794 P-Value > Chi2(6) 0.0374 - White Test - B-P-G (SSR): E2 = X X2 = 13.4935 P-Value > Chi2(6) 0.0358 ------------------------------------------------------------------------------ - White Test - Koenker(R2): E2 = X X2 XX= 18.2000 P-Value > Chi2(9) 0.0329 - White Test - B-P-G (SSR): E2 = X X2 XX= 18.3552 P-Value > Chi2(9) 0.0313 ------------------------------------------------------------------------------ - Cook-Weisberg LM Test: E2/S2n = Yh = 0.2778 P-Value > Chi2(1) 0.5982 - Cook-Weisberg LM Test: E2/S2n = X = 7.0490 P-Value > Chi2(3) 0.0704 ------------------------------------------------------------------------------ *** Single Variable Tests (E2/Sig2): - Cook-Weisberg LM Test: w1y_y = 1.1426 P-Value > Chi2(1) 0.2851 - Cook-Weisberg LM Test: x1 = 2.4347 P-Value > Chi2(1) 0.1187 - Cook-Weisberg LM Test: x2 = 0.9916 P-Value > Chi2(1) 0.3193 ------------------------------------------------------------------------------ *** Single Variable Tests: - King LM Test: w1y_y = 0.9862 P-Value > Chi2(1) 0.3207 - King LM Test: x1 = 3.0023 P-Value > Chi2(1) 0.0831 - King LM Test: x2 = 1.0363 P-Value > Chi2(1) 0.3087 ------------------------------------------------------------------------------
============================================================================== * Panel Non Normality Tests ============================================================================== Ho: Normality - Ha: Non Normality ------------------------------------------------------------------------------ *** Non Normality Tests: - Jarque-Bera LM Test = 0.4464 P-Value > Chi2(2) 0.7999 - White IM Test = 1.8983 P-Value > Chi2(2) 0.3871 - Doornik-Hansen LM Test = 0.9400 P-Value > Chi2(2) 0.6250 - Geary LM Test = 0.0601 P-Value > Chi2(2) 0.9704 - Anderson-Darling Z Test = 0.2264 P > Z( 0.932) 0.8243 - D'Agostino-Pearson LM Test = 0.7879 P-Value > Chi2(2) 0.6744 ------------------------------------------------------------------------------ *** Skewness Tests: - Srivastava LM Skewness Test = 0.4459 P-Value > Chi2(1) 0.5043 - Small LM Skewness Test = 0.5604 P-Value > Chi2(1) 0.4541 - Skewness Z Test = 0.7486 P-Value > Chi2(1) 0.4541 ------------------------------------------------------------------------------ *** Kurtosis Tests: - Srivastava Z Kurtosis Test = 0.0226 P-Value > Z(0,1) 0.9820 - Small LM Kurtosis Test = 0.2275 P-Value > Chi2(1) 0.6334 - Kurtosis Z Test = 0.4769 P-Value > Chi2(1) 0.6334 ------------------------------------------------------------------------------ Skewness Coefficient = 0.2524 - Standard Deviation = 0.3654 Kurtosis Coefficient = 3.0171 - Standard Deviation = 0.7166 ------------------------------------------------------------------------------ Runs Test: (22) 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 - (Model= sar) *
+---------------------------------------------------------------------------+ | Variable | Marginal_Effect(B) | Elasticity(Es) | Mean | |------------+--------------------+--------------------+--------------------| | L.y | 0.3183 | 0.3120 | 34.4349 | | w1y_y | 0.0034 | 0.0099 | 102.8825 | | x1 | -0.3786 | -0.4142 | 38.4362 | | x2 | -1.3273 | -0.5431 | 14.3749 | +---------------------------------------------------------------------------+ Mean of Dependent Variable = 35.1288
. spregdpd y x1 x2 , nc(7) wmfile(SPWxt) model(sar) run(xtabond) inst(x1 x2) mf > x(lin)
============================================================================== *** Binary (0/1) Weight Matrix: 49x49 - NC=7 NT=7 (Non Normalized) ============================================================================== * Spatial Lag Arellano-Bond Linear Dynamic Panel Data Regression ============================================================================== y = w1y_y + x1 + x2 ------------------------------------------------------------------------------ Sample Size = 42 | Cross Sections Number = 7 Wald Test = 30.8937 | P-Value > Chi2(4) = 0.0000 F-Test = 7.7234 | P-Value > F(4 , 38) = 0.0002 (Buse 1973) R2 = 0.4484 | Raw Moments R2 = 0.9660 (Buse 1973) R2 Adj = 0.4049 | Raw Moments R2 Adj = 0.9633 Root MSE (Sigma) = 14.4152 | Log Likelihood Function = -142.6350 ------------------------------------------------------------------------------ - R2h= 0.3728 R2h Adj= 0.3233 F-Test = 7.33 P-Value > F(4 , 38) 0.0005 - R2v= 0.4088 R2v Adj= 0.3622 F-Test = 8.53 P-Value > F(4 , 38) 0.0002 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- y | L1. | -.0374973 .20904 -0.18 0.859 -.4606767 .3856821 | w1y_y | -.139615 .0999317 -1.40 0.170 -.3419162 .0626861 x1 | -.294787 .0937949 -3.14 0.003 -.4846649 -.1049091 x2 | -.7536025 .4087571 -1.84 0.073 -1.581088 .073883 _cons | 73.07181 12.58054 5.81 0.000 47.60384 98.53978 ------------------------------------------------------------------------------ Rho Value = -0.1396 Chi2 Test = 1.952 P-Value > Chi2(1) 0.1705 ------------------------------------------------------------------------------ * Over Identification Restrictions Test Ho: Over Identification Restrictions are Valid - Sargan Over Identification LM Test = 18.987 P-Value > Chi2(17) 0.3293 ------------------------------------------------------------------------------
* Linear: Marginal Effect - Elasticity - Spatial Panel - (Model= sar) *
+---------------------------------------------------------------------------+ | Variable | Marginal_Effect(B) | Elasticity(Es) | Mean | |------------+--------------------+--------------------+--------------------| | L.y | -0.0375 | -0.0371 | 34.7923 | | w1y_y | -0.1396 | -0.3975 | 100.0064 | | x1 | -0.2948 | -0.3225 | 38.4362 | | x2 | -0.7536 | -0.3084 | 14.3749 | +---------------------------------------------------------------------------+ Mean of Dependent Variable = 35.1288
+---------+ ----+ Authors +----------------------------------------------------------
- Emad Abd Elmessih Shehata Professor (PhD Economics) Agricultural Research Center - Agricultural Economics Research Institute - Eg > ypt Email: emadstat@hotmail.com WebPage: http://emadstat.110mb.com/stata.htm WebPage at IDEAS: http://ideas.repec.org/f/psh494.html WebPage at EconPapers: http://econpapers.repec.org/RAS/psh494.htm
- Sahra Khaleel A. Mickaiel Professor (PhD Economics) Cairo University - Faculty of Agriculture - Department of Economics - Egypt Email: sahra_atta@hotmail.com WebPage: http://sahraecon.110mb.com/stata.htm WebPage at IDEAS: http://ideas.repec.org/f/pmi520.html WebPage at EconPapers: http://econpapers.repec.org/RAS/pmi520.htm
+-------------------+ ----+ spregdpd Citation +------------------------------------------------
Shehata, Emad Abd Elmessih & Sahra Khaleel A. Mickaiel (2012) SPREGDPD: "Spatial Panel Arellano-Bond Linear Dynamic Regression: Lag & Durbin Models"
http://ideas.repec.org/c/boc/bocode/s457506.html
http://econpapers.repec.org/software/bocbocode/s457506.htm
Online Help:
(1) Spatial Econometrics Panel Data Regression Models: gs2slsxt Generalized Spatial Panel 2SLS Regression gs2slsarxt Generalized Spatial Panel Autoregressive 2SLS Regression spglsxt Spatial Panel Autoregressive Generalized Least Squares Regression spgmmxt Spatial Panel Autoregressive Generalized Method of Moments Regress > ion spmstarxt (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressive Re > gression: Spatial Lag Panel Models spmstardxt (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressive Re > gression: Spatial Durbin Panel Models spmstardhxt (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressive Re > gression: Spatial Durbin Multiplicative Heteroscedasticity Panel Models spmstarhxt (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressive Re > gression: Spatial Lag Multiplicative Heteroscedasticity Panel Models spregdhp Spatial Panel Han-Philips Linear Dynamic Regression: Lag & Durbin > Models spregdpd Spatial Panel Arellano-Bond Linear Dynamic Regression: Lag & Durbi > n Models spregfext Spatial Panel Fixed Effects Regression: Lag & Durbin Models spregrext Spatial Panel Random Effects Regression: Lag & Durbin Models spregsacxt MLE Spatial AutoCorrelation Panel Regression (SAC) spregsarxt MLE Spatial Lag Panel Regression (SAR) spregsdmxt MLE Spatial Durbin Panel Regression (SDM) spregsemxt MLE Spatial Error Panel Regression (SEM) spxttobit Tobit Spatial Panel Autoregressive GLS Regression spregxt Spatial Panel Regression Econometric Models: Complete Stata Module Software Toolkit
(2) Spatial Econometrics Cross Section Data Regression Models: gs2sls Generalized Spatial 2SLS Cross Sections Regression gs2slsar Generalized Spatial Autoregressive 2SLS Cross Sections Regression gs3sls Generalized Spatial Autoregressive 3SLS Regression gs3slsar Generalized Spatial Autoregressive 3SLS Cross Sections Regression gsp3sls Generalized Spatial 3SLS Cross Sections Regression spautoreg Spatial Cross Section Regression Models (Lag-Error-Durbin-SAC-SPGLS-GS2SLS-GS3SLS-SPML-SPGS-SPIVREG-IVTobi > t) spgmm Spatial Autoregressive GMM Cross Sections Regression spmstar (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressive Re > gression: Spatial Lag Cross Sections Models spmstard (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressive Re > gression: Spatial Durbin Cross Sections Models spmstardh (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressive Re > gression: Spatial Durbin Multiplicative Heteroscedasticity Cross Sections Mo > dels spmstarh (m-STAR) Spatial Multiparametric Spatio Temporal AutoRegressive Re > gression: Spatial Lag Multiplicative Heteroscedasticity Cross Sections Model > s spregsac MLE Spatial AutoCorrelation Cross Sections Regression (SAC) spregsar MLE Spatial Lag Cross Sections Regression (SAR) spregsdm MLE Spatial Durbin Cross Sections Regression (SDM) spregsem MLE Spatial Error Cross Sections Regression (SEM) spregcs Spatial Cross Section Regression Econometric Models: Complete Stata Module Software Toolkit
(3) Spatial Weight Matrix: spcs2xt Convert Cross Section to Panel Spatial Weight Matrix spweight Cross Section and Panel Spatial Weight Matrix spweightcs Cross Section Spatial Weight Matrix spweightxt Panel Spatial Weight Matrix
(4) Panel Data Regression Models: xtregdhp Han-Philips (2010) Linear Dynamic Panel Data Regression xtregam Amemiya Random-Effects Panel Data: Ridge & Weighted Regression xtregbem Between-Effects Panel Data: Ridge & Weighted Regression xtregbn Balestra-Nerlove Random-Effects Panel Data: Ridge & Weighted Regre > ssion xtregfem Fixed-Effects Panel Data: Ridge & Weighted Regression xtregmle Trevor Breusch MLE Random-Effects Panel Data: Ridge & Weighted Reg > ression xtregrem Fuller-Battese GLS Random-Effects Panel Data: Ridge & Weighted Reg > ression xtregsam Swamy-Arora Random-Effects Panel Data: Ridge & Weighted Regression xtregwem Within-Effects Panel Data: Ridge & Weighted Regression xtregwhm Wallace-Hussain Random-Effects Panel Data: Ridge & Weighted Regres > sion xtreghet MLE Random-Effects Multiplicative Heteroscedasticity Panel Data Re > gression xtidt Identification Variables in Panel Data