-------------------------------------------------------------------------------
help: gs2slsar                                                   dialog: gs2sls
> ar
-------------------------------------------------------------------------------

+-------+ ----+ Title +------------------------------------------------------------

gs2slsar: Generalized Spatial Autoregressive Two Stage Least Squares (2SLS) Cross Sections Regression

+-------------------+ ----+ Table of Contents +------------------------------------------------

Syntax Description Model Options Options Spatial Aautocorrelation Tests Model Selection Diagnostic Criteria Heteroscedasticity Tests Non Normality Tests Saved Results References

*** Examples

Author

+--------+ ----+ Syntax +-----------------------------------------------------------

gs2slsar depvar indepvars [weight] , wmfile(weight_file) [ model(2sls|gmm|liml) lmspac lmhet lmnorm diag tests stand inv inv2 order(#) mfx(lin, log) aux(varlist) predict(new_var) resid(new_var) coll zero tolog noconstant level(#) vce(vcetype) ]

+-------------+ ----+ Description +------------------------------------------------------

gs2slsar estimates Generalized Spatial Autoregressive Two Stage Least Squares [Kelejian-Prucha(1998)], for Cross Sections Regression Models. Since no softwares available till now to estimate generalized spatial autoregressive 2SLS for cross section models, I designed gs2slsar as a modification of Kapoor-Kelejian-Prucha (1999), but here I let the estimations deal with cross section 2SLS models, with original constant term.

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).

Buse(1973) R2 in model(gs2slsar) may be negative, to avoid negative R2, you can increase number on instrumental variables by choosing order more than 1 order(2, 3, 4)

*** Important Notes: gs2slsar generates some variables names with prefix: w1x_ , w2x_ , w3x_ , w4x_ , w1y_ , w2y_ , mstar_ , spat_ So, you must avoid to include variables names with thes prefixes

+---------------+ ----+ Model Options +----------------------------------------------------

2sls Two-Stage Least Squares (2SLS) liml Limited Information Maximum Likelihood (LIML) gmm Generalized Method of Moments (GMM)

+---------+ ----+ Options +----------------------------------------------------------

wmfile(weight_file) Open CROSS SECTION weight matrix file.

Spatial Cross Sections Weight Matrix file must be: 1- Square Matrix [NxN] 2- Symmetric Matrix (Optional)

Spatial Weight Matrix has two types: Standardized and binary weight matrix.

stand Use Standardized Weight Matrix, (each row sum equals 1) Default is Binary spatial Weight Matrix which each element i > s 0 or 1

inv Use Inverse Standardized Weight Matrix (1/W)

inv2 Use Inverse Squared Standardized Weight Matrix (1/W^2)

zero convert missing values observations to Zero

aux(varlist) add Auxiliary Variables into regression model without converting them to spatial lagged variables, or without log form, i.e., dummy variables.

order(1, 2, 3, 4) Order of lagged independent variables up to maximum 4th ord > er.

coll keep collinear variables; default is removing collinear vari > ables.

noconstant Exclude Constant Term from RHS Equation

tests display ALL lmh, lmn, lmsp, diag tests

mfx(lin, log) functional form: Linear model (lin), or Log-Log model (log), to compute Total, Direct, and InDirect 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

vce(vcetype) ols, robust, cluster, bootstrap, jackknife, hc2, hc3

level(#) confidence intervals level; default is level(95)

+--------------------------------+ ----+ Spatial Aautocorrelation Tests +-----------------------------------

lmspac Spatial 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 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

+-------------------------------------+ ----+ Model Selection Diagnostic Criteria +------------------------------

diag Model Selection Diagnostic Criteria: - Log Likelihood Function LLF - Akaike Information Criterion (1974) AIC - Akaike Information Criterion (1973) Log AIC - Schwarz Criterion (1978) SC - Schwarz Criterion (1978) Log SC - Amemiya Prediction Criterion (1969) FPE - Hannan-Quinn Criterion (1979) HQ - Rice Criterion (1984) Rice - Shibata Criterion (1981) Shibata - Craven-Wahba Generalized Cross Validation (1979) GCV

+--------------------------+ ----+ Heteroscedasticity Tests +-----------------------------------------

lmhet Heteroscedasticity Tests: * Ho: Homoscedasticity - Ha: Heteroscedasticity - 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 - 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

*** Tobit Model Heteroscedasticity LM Tests - Separate LM Tests - Ho: Homoscedasticity - Joint LM Test - Ho: Homoscedasticity

+---------------------+ ----+ Non Normality Tests +----------------------------------------------

lmnorm Non Normality Tests: * Ho: Normality - Ha: 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)] *** Tobit cross section Non Normality Tests *** LM Test - Ho: No Skewness *** LM test - Ho: No Kurtosis *** LM Test - Ho: Normality (No Kurtosis, No Skewness) - Pagan-Vella LM Test - Chesher-Irish LM Test

+---------------+ ----+ Saved Results +----------------------------------------------------

gs2slsar saves the following results in e():

Scalars

*** Spatial 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

*** 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 LLF e(aic) Akaike Information Criterion (1974) AIC e(laic) Akaike Information Criterion (1973) Log AIC e(sc) Schwarz Criterion (1978) SC e(lsc) Schwarz Criterion (1978) Log SC e(fpe) Amemiya Prediction Criterion (1969) FPE e(hq) Hannan-Quinn Criterion (1979) HQ e(rice) Rice Criterion (1984) Rice e(shibata) Shibata Criterion (1981) Shibata e(gcv) Craven-Wahba Generalized Cross Validation (1979) GCV

*** Heteroscedasticity Tests: 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(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

*** 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)]

e(lmnpv) Pagan-Vella LM Test (Tobit Model) e(lmnpvp) Pagan-Vella LM Test (Tobit Model) P-Value e(lmnci) Chesher-Irish LM Test (Tobit Model) e(lmncip) Chesher-Irish LM Test (Tobit Model) P-Value

Macros e(cmd) name of the command e(cmdline) command as typed e(depvar) Name of dependent variable e(predict) program used to implement predict e(wmat) name of spatial weight matrix e(dlmat) name of spmat object in dlmat() e(elmat) name of spmat object in elmat() e(endog) names of endogenous variables e(eqnames) names of equations e(het) heteroskedastic or homoskedastic e(technique) maximization technique from technique() option e(title) title in estimation output

Matrixes e(b) coefficient vector e(V) variance-covariance matrix of the estimators e(mfxlin) Marginal Effect and Elasticity in Lin Form e(mfxlog) Marginal Effect and Elasticity in Log Form

Functions e(sample) marks estimation sample

+------------+ ----+ 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.

Breusch, Trevor & Adrian Pagan (1980) "The Lagrange Multiplier Test and its Applications to Model Specification in Econometrics", Review of Economic Studies 47; 239-253.

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.

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..

Griffiths, W., R. Carter Hill & George Judge (1993) "Learning and Practicing Econometrics", John Wiley & Sons, Inc., New York, USA.

Harry H. Kelejian and Ingmar R. Prucha (1998) "A Generalized Spatial Two-Stage Least Squares Procedures for Estimating a Spatial Autoregressive Model with Autoregressive Disturbances", Journal of Real Estate Finance and Economics, (17); 99-121. http://econweb.umd.edu/~prucha/Papers/JREFE17(1998).pdf

Harvey, Andrew (1990) "The Econometric Analysis of Time Series", 2nd edition, MIT Press, Cambridge, Massachusetts.

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.

+----------+ ----+ 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 gs2slsar. -------------------------------------------------------------------------------

clear all

sysuse gs2slsar.dta, clear

* (1) Generalized Spatial Autoregressive 2SLS - AR(1) (gs2slsar) gs2slsar y x1 x2 , wmfile(SPWcs) order(1) mfx(lin) test

gs2slsar y x1 x2 , wmfile(SPWcs) order(1) mfx(lin) test aux(x3) gs2slsar y x1 x2 x3 , wmfile(SPWcs) order(1) mfx(lin) test

* note the difference of x3 coef with and without aux option.

gs2slsar y x1 x2 , wmfile(SPWcs) order(1) mfx(log) test tolog

gs2slsar y x1 x2 [weight=x1] , wmfile(SPWcs) order(1) mfx(lin) test -------------------------------------------------------------------------------

* (2) Generalized Spatial Autoregressive 2SLS - AR(2) (gs2slsar) gs2slsar y x1 x2 , wmfile(SPWcs) order(2) mfx(lin) test -------------------------------------------------------------------------------

* (3) Generalized Spatial Autoregressive 2SLS - AR(3) (gs2slsar) gs2slsar y x1 x2 , wmfile(SPWcs) order(3) mfx(lin) test -------------------------------------------------------------------------------

* (4) Generalized Spatial Autoregressive 2SLS - AR(4) (gs2slsar) gs2slsar y x1 x2 , wmfile(SPWcs) order(4) mfx(lin) test -------------------------------------------------------------------------------

* (5) Generalized Spatial Autoregressive GMM - AR(1) (gs2slsar) gs2slsar y x1 x2 , wmfile(SPWcs) order(1) mfx(lin) test model(gmm) -------------------------------------------------------------------------------

* (6) Generalized Spatial Autoregressive LIML - AR(1) (gs2slsar) gs2slsar y x1 x2 , wmfile(SPWcs) order(1) mfx(lin) test model(liml) -------------------------------------------------------------------------------

* Generalized Spatial Autoregressive 2SLS (GS2SLSAR) (Cont.) This example is taken from Prucha data about: Generalized Spatial Two-Stage Least Squares Procedures for Estimating a Spatial Autoregressive Model with Autoregressive Disturbances More details can be found in: http://econweb.umd.edu/~prucha/Research_Prog2.htm Results of (gs2slsar) with order(2) is identical to: http://econweb.umd.edu/~prucha/STATPROG/2SLS/PROGRAM2.log

clear all sysuse gs2slsar1.dta , clear gs2slsar y x1 , wmfile(SPWcs1) order(2) -------------------------------------------------------------------------------

. clear all . sysuse gs2slsar.dta, clear . gs2slsar y x1 x2 , wmfile(SPWcs) order(1) mfx(lin) test

============================================================================== *** Binary (0/1) Weight Matrix: 49x49 (Non Normalized) ============================================================================== ============================================================================== * Generalized Spatial Autoregressive Two Stage Least Squares (GS2SLSAR) ============================================================================== y = w1y_y + x1 + x2 ------------------------------------------------------------------------------ Sample Size = 49 Wald Test = 64.5302 | P-Value > Chi2(3) = 0.0000 F-Test = 21.5101 | P-Value > F(3 , 46) = 0.0000 (Buse 1973) R2 = 0.4421 | Raw Moments R2 = 0.8986 (Buse 1973) R2 Adj = 0.4178 | Raw Moments R2 Adj = 0.8941 Root MSE (Sigma) = 12.7668 | Log Likelihood Function = -192.7755 ------------------------------------------------------------------------------ - R2h= 0.4666 R2h Adj= 0.4434 F-Test = 13.12 P-Value > F(3 , 46) 0.0000 - R2v= 0.6640 R2v Adj= 0.6494 F-Test = 29.64 P-Value > F(3 , 46) 0.0000 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- w1y_y | -.0507279 .0325268 -1.56 0.126 -.1162009 .0147452 x1 | -.3577038 .1161887 -3.08 0.004 -.5915795 -.1238282 x2 | -1.65663 .3191003 -5.19 0.000 -2.298946 -1.014315 _cons | 82.73615 9.880248 8.37 0.000 62.84825 102.6241 ------------------------------------------------------------------------------ Rho Value = -0.0507 F Test = 2.432 P-Value > F(1, 46) 0.1257 ------------------------------------------------------------------------------ * Y = LHS Dependent Variable: 1 = y * Yi = RHS Endogenous Variables: 1 = w1y_y * Xi = RHS Exogenous Vars: 2 = x1 x2 * Z = Overall Instrumental Variables: 4 : x1 x2 w1x_x1 w1x_x2 ------------------------------------------------------------------------------

============================================================================== *** Spatial Aautocorrelation Tests ============================================================================== Ho: Error has No Spatial AutoCorrelation Ha: Error has Spatial AutoCorrelation

- GLOBAL Moran MI = 0.2132 P-Value > Z( 2.741) 0.0061 - GLOBAL Geary GC = 0.6493 P-Value > Z(-2.849) 0.0044 - GLOBAL Getis-Ords GO = -1.0268 P-Value > Z(-1.022) 0.3069 ------------------------------------------------------------------------------ - Moran MI Error Test = 0.9040 P-Value > Z(10.833) 0.3660 ------------------------------------------------------------------------------ - LM Error (Burridge) = 4.1860 P-Value > Chi2(1) 0.0408 - LM Error (Robust) = 0.5352 P-Value > Chi2(1) 0.4644 ------------------------------------------------------------------------------ Ho: Spatial Lagged Dependent Variable has No Spatial AutoCorrelation Ha: Spatial Lagged Dependent Variable has Spatial AutoCorrelation

- LM Lag (Anselin) = 3.7857 P-Value > Chi2(1) 0.0517 - LM Lag (Robust) = 0.1349 P-Value > Chi2(1) 0.7134 ------------------------------------------------------------------------------ Ho: No General Spatial AutoCorrelation Ha: General Spatial AutoCorrelation

- LM SAC (LMErr+LMLag_R) = 4.3209 P-Value > Chi2(2) 0.1153 - LM SAC (LMLag+LMErr_R) = 4.3209 P-Value > Chi2(2) 0.1153 ------------------------------------------------------------------------------

============================================================================== * Model Selection Diagnostic Criteria ============================================================================== - Log Likelihood Function LLF = -192.7755 - Akaike Final Prediction Error AIC = 393.5510 - Schwarz Criterion SC = 401.1183 - Akaike Information Criterion ln AIC = 5.1938 - Schwarz Criterion ln SC = 5.3482 - Amemiya Prediction Criterion FPE = 176.2954 - Hannan-Quinn Criterion HQ = 191.0181 - Rice Criterion Rice = 182.8670 - Shibata Criterion Shibata = 177.9925 - Craven-Wahba Generalized Cross Validation-GCV = 181.4221 ------------------------------------------------------------------------------

============================================================================== * Heteroscedasticity Tests ============================================================================== Ho: Homoscedasticity - Ha: Heteroscedasticity ------------------------------------------------------------------------------ - Hall-Pagan LM Test: E2 = Yh = 0.3087 P-Value > Chi2(1) 0.5785 - Hall-Pagan LM Test: E2 = Yh2 = 0.3867 P-Value > Chi2(1) 0.5340 - Hall-Pagan LM Test: E2 = LYh2 = 0.0002 P-Value > Chi2(1) 0.9895 ------------------------------------------------------------------------------ - Harvey LM Test: LogE2 = X = 9.4468 P-Value > Chi2(2) 0.0089 - Wald LM Test: LogE2 = X = 23.3090 P-Value > Chi2(1) 0.0000 - Glejser LM Test: |E| = X = 7.4778 P-Value > Chi2(2) 0.0238 ------------------------------------------------------------------------------ - Machado-Santos-Silva Test: Ev=Yh Yh2 = 0.8115 P-Value > Chi2(2) 0.6665 - Machado-Santos-Silva Test: Ev=X = 7.4295 P-Value > Chi2(3) 0.0594 ------------------------------------------------------------------------------ - White Test -Koenker(R2): E2 = X = 7.5813 P-Value > Chi2(3) 0.0555 - White Test -B-P-G (SSR): E2 = X = 8.3450 P-Value > Chi2(3) 0.0394 ------------------------------------------------------------------------------ - White Test -Koenker(R2): E2 = X X2 = 9.3282 P-Value > Chi2(6) 0.1559 - White Test -B-P-G (SSR): E2 = X X2 = 10.2679 P-Value > Chi2(6) 0.1138 ------------------------------------------------------------------------------ - White Test -Koenker(R2): E2 = X X2 XX= 22.5613 P-Value > Chi2(9) 0.0073 - White Test -B-P-G (SSR): E2 = X X2 XX= 24.8339 P-Value > Chi2(9) 0.0032 ------------------------------------------------------------------------------ - Cook-Weisberg LM Test E2/Sig2 = Yh = 0.3398 P-Value > Chi2(1) 0.5599 - Cook-Weisberg LM Test E2/Sig2 = X = 8.3450 P-Value > Chi2(3) 0.0394 ------------------------------------------------------------------------------ *** Single Variable Tests (E2/Sig2): - Cook-Weisberg LM Test: w1y_y = 1.1518 P-Value > Chi2(1) 0.2832 - Cook-Weisberg LM Test: x1 = 1.9612 P-Value > Chi2(1) 0.1614 - Cook-Weisberg LM Test: x2 = 1.8730 P-Value > Chi2(1) 0.1711 ------------------------------------------------------------------------------ *** Single Variable Tests: - King LM Test: w1y_y = 0.9640 P-Value > Chi2(1) 0.3262 - King LM Test: x1 = 0.9705 P-Value > Chi2(1) 0.3246 - King LM Test: x2 = 2.0373 P-Value > Chi2(1) 0.1535

============================================================================== * Non Normality Tests ============================================================================== Ho: Normality - Ha: Non Normality ------------------------------------------------------------------------------ *** Non Normality Tests: - Jarque-Bera LM Test = 0.8712 P-Value > Chi2(2) 0.6469 - White IM Test = 3.9414 P-Value > Chi2(2) 0.1394 - Doornik-Hansen LM Test = 1.6641 P-Value > Chi2(2) 0.4352 - Geary LM Test = -3.0301 P-Value > Chi2(2) 0.2198 - Anderson-Darling Z Test = 0.2011 P > Z( 1.216) 0.8881 - D'Agostino-Pearson LM Test = 1.5506 P-Value > Chi2(2) 0.4606 ------------------------------------------------------------------------------ *** Skewness Tests: - Srivastava LM Skewness Test = 0.7342 P-Value > Chi2(1) 0.3915 - Small LM Skewness Test = 0.8897 P-Value > Chi2(1) 0.3456 - Skewness Z Test = -0.9432 P-Value > Chi2(1) 0.3456 ------------------------------------------------------------------------------ *** Kurtosis Tests: - Srivastava Z Kurtosis Test = 0.3701 P-Value > Z(0,1) 0.7113 - Small LM Kurtosis Test = 0.6609 P-Value > Chi2(1) 0.4162 - Kurtosis Z Test = 0.8130 P-Value > Chi2(1) 0.4162 ------------------------------------------------------------------------------ Skewness Coefficient = -0.2998 - Standard Deviation = 0.3398 Kurtosis Coefficient = 3.2590 - Standard Deviation = 0.6681 ------------------------------------------------------------------------------ Runs Test: (15) Runs - (25) Positives - (24) Negatives Standard Deviation Runs Sig(k) = 3.4619 , Mean Runs E(k) = 25.4898 95% Conf. Interval [E(k)+/- 1.96* Sig(k)] = (18.7045 , 32.2751 ) ------------------------------------------------------------------------------

* Linear: Marginal Effect - Elasticity - (Model= 2sls) *

+-----------------------------------------------------------------------------+ | Variable | Marginal_Effect(B) | Elasticity(Es) | Mean | |--------------+--------------------+--------------------+--------------------| | w1y_y | -0.0507 | -0.2461 | 170.4034 | | x1 | -0.3577 | -0.3914 | 38.4362 | | x2 | -1.6566 | -0.6779 | 14.3749 | +-----------------------------------------------------------------------------+ Mean of Dependent Variable = 35.1288

+--------+ ----+ Author +-----------------------------------------------------------

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

+-------------------+ ----+ GS2SLSAR Citation +------------------------------------------------

Shehata, Emad Abd Elmessih (2012) GS2SLSAR: "Generalized Spatial Autoregressive Two Stage Least Squares (2SLS) Cross Sections Regression"

http://ideas.repec.org/c/boc/bocode/S457474.html

http://econpapers.repec.org/software/bocbocode/S457474.htm

Online Help:

*** Spatial Econometrics Regression Models:

------------------------------------------------------------------------------- > - *** (1) Spatial Panel Data Regression Models: spregxt Spatial Panel Regression Econometric Models: Stata Module Toolkit 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 Lag Panel Models spmstardxt (m-STAR) Spatial Durbin Panel Models spmstardhxt (m-STAR) Spatial Durbin Multiplicative Heteroscedasticity Panel Mo > dels spmstarhxt (m-STAR) Spatial Lag Multiplicative Heteroscedasticity Panel Model > s 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) ------------------------------------------------------------------------------- > - *** (2) Spatial Cross Section Regression Models: spregcs Spatial Cross Section Regression Econometric Models: Stata Module > Toolkit 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 spgmm Spatial Autoregressive GMM Cross Sections Regression spmstar (m-STAR) Spatial Lag Cross Sections Models spmstard (m-STAR) Spatial Durbin Cross Sections Models spmstardh (m-STAR) Spatial Durbin Multiplicative Heteroscedasticity Cross Se > ctions Models spmstarh (m-STAR) Spatial Lag Multiplicative Heteroscedasticity Cross Secti > ons Models 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) ------------------------------------------------------------------------------- > - *** (3) Tobit Spatial Regression Models:

*** (3-1) Tobit Spatial Panel Data Regression Models: sptobitgmmxt Tobit Spatial GMM Panel Regression sptobitmstarxtTobit (m-STAR) Spatial Lag Panel Models sptobitmstardxtTobit (m-STAR) Spatial Durbin Panel Models sptobitmstardhxtTobit (m-STAR) Spatial Durbin Multiplicative Heteroscedasticity > Panel Models sptobitmstarhxtTobit (m-STAR) Spatial Lag Multiplicative Heteroscedasticity Pan > el Models sptobitsacxt Tobit MLE Spatial AutoCorrelation (SAC) Panel Regression sptobitsarxt Tobit MLE Spatial Lag Panel Regression sptobitsdmxt Tobit MLE Spatial Panel Durbin Regression sptobitsemxt Tobit MLE Spatial Error Panel Regression spxttobit Tobit Spatial Panel Autoregressive GLS Regression -------------------------------------------------------------- *** (3-2) Tobit Spatial Cross Section Regression Models: sptobitgmm Tobit Spatial GMM Cross Sections Regression sptobitmstar Tobit (m-STAR) Spatial Lag Cross Sections Models sptobitmstardTobit (m-STAR) Spatial Durbin Cross Sections Models sptobitmstardhTobit (m-STAR) Spatial Durbin Multiplicative Heteroscedasticity C > ross Sections sptobitmstarhTobit (m-STAR) Spatial Lag Multiplicative Heteroscedasticity Cross > Sections sptobitsac Tobit MLE AutoCorrelation (SAC) Cross Sections Regression sptobitsar Tobit MLE Spatial Lag Cross Sections Regression sptobitsdm Tobit MLE Spatial Durbin Cross Sections Regression sptobitsem Tobit MLE Spatial Error Cross Sections Regression ------------------------------------------------------------------------------- > - *** (4) 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 ------------------------------------------------------------------------------- > -