help: spregcs dialog:

Title

spregcs: Spatial Cross Sections Econometric Regression Models:

(SAR - SEM - SDM - SAC - mSTAR - GWR - GS2SLS - GS2SLSAR - GS3SLS - GS3SLSAR -

IVTOBIT - SARARGS - SARARIV - SARARML - SPGMM - OLS - LAG - DURBIN)

Table of Contents

Syntax

Description

Options

Model Options

Run Options

GMM Options

Ridge Options

Weight Options

Weighted Variable Type Options

Other Options

Spatial Aautocorrelation Tests

Model Selection Diagnostic Criteria

Heteroscedasticity Tests

Non Normality Tests

Hausman Specification Test OLS/IV-2SLS Tests

Identification Restrictions LM Tests

REgression Specification Error Tests (RESET)

Linear vs Log-Linear Functional Form Tests

Multicollinearity Diagnostic Tests

Saved Results

References

*** Examples

Acknowledgments

Author

Syntax

spregcs depvar indepvars ,

[model(sar|sem|sdm|sac|gwr|mstar|mstard|sararml|sarargs|sarariv)

model(spgmm|gs2sls|gs2slsar|gs3sls|gs3slsar|ols|lag|durbin)

run(ols|tobit|sfa|2sls|fuller|gmm|kclass|liml|melo) hetcov(gmm_type)

wmfile(weight_file) weights(yh|yh2|abse|e2|x|xi|x2|xi2) wvar(varname) ridge(orr|grr1|grr2|grr3) kr(#)

lmspac lmauto lmhet lmform lmnorm lmcl lmiden hausman reset diag tests

stand inv inv2 dn dist(norm|exp|weib|hn|tn) mfx(lin, log) spar(rho, lam)

endog(vars) inst(vars) var2(varlist) aux(varlist) mhet(varlist)

vhet(varlist) nwmat(#) order(#) inrho(real 0) inlambda(real 0) ll(real 0)

eq(1, 2) predict(new_var) resid(new_var) iter(#) tech(name) rest(#)

coll cost zero ols 2sls 3sls sure mvreg first noconstant noconexog

tobit tolog nolog robust twostep grids(#) het impower(#) level(#)

vce(vcetype) maximize other maximization options ]

Description

spregcs is a complete toolkit software package
for Spatial Cross Sections Regression Models estimation
Many types of spatial autocorrelations were taken under consedration, i.e.,
(SAR - SEM - SDM - SAC - MSTAR - GS2SLS - GS2SLSAR - GS3SLS - GS3SLSAR -
IVTOBIT - SARARGS - SARARIV - SARARML - SPGMM - OLS - LAG - DURBIN)

spregcs can estimate the following models:
1- Heteroscedastic Regression Models in disturbance term.
2- Non Normal Regression Models in disturbance term.
3- Multicollinearity Regression Models in independent variables.

In fact spregcs estimates many Spatial & Non Spatial Models, even OLS regression:

- spregcs varlist , model(ols) run(ols)
without choosing: wmfile( )
spregcs let you get identical OLS results from regress

- ALL Diagnostic tests also are valid in the case of all models.

spregcs estimates Continuous and Truncated Dependent Variables models tobit.

model(sar, sem, sdm, sac, spgmm, ols, lag, durbin) deals with data either continuous or truncated dependent variable. If depvar has missing values or lower limits,
so in this case model(sar, sem, sdm, sac, spgmm, ols, lag, durbin) will fit spatial cross section model via tobit model,
and thus spregcs can resolve the problem of missing values that exist in many kinds of data. Otherwise, in the case of continuous data, the normal estimation will be used.

spregcs can generate:

- Binary / Standardized Weight Matrix.
- Inverse / Inverse Squared Standardized Weight Matrix.
- Binary / Standardized / Inverse Eigenvalues Variable.
- Spatial lagged variables up to 4th order.

spregcs predicted values in model(sar, sdm, sac) models are obtained from conditional expectation expression.

Yh = E(y|x) = inv(I-Rho*W) * X*Beta

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(gs2sls, 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:
spregcs 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

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 is 0 or 1

inv Use Inverse Standardized Weight Matrix (1/W)

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

Model Options

1- model(sar) MLE Spatial Lag Model (SAR)

2- model(sdm) MLE Spatial Durbin Model (SDM)

3- model(sem) MLE Spatial Error Model (SEM)

4- model(sac) MLE Spatial Lag / Error Model (SAC) "Spatial AutoCorrelation"

5- model(mstar) Multiparametric Spatio Temporal AutoRegressive Regression Model

mSTAR Lag Model

6- model(mstard) Multiparametric Spatio Temporal AutoRegressive Regression Model

mSTAR Durbin Model

model(mstar, mstard) are used with more than Weight Matrix: (Border, Language, Currency, Trade...)

7- model(gwr) Geographically Weighted Regressions (GWR)

8- model(spgmm) Spatial Autoregressive Generalized Method of Moments Model

When cross section data model with error are both spatially correlated.
Generalized Method of Moments (GMM) that suggested in Kelejian-Prucha (1999) is used in the estimation of model(spgmm)

9- model(spgmm) Tobit Spatial Autoregressive GMM with option(tobit)

10- model(gs2sls) Generalized Spatial 2SLS

11- model(gs2slsar) Generalized Spatial Autoregressive 2SLS [Kelejian-Prucha(1998)]

Since no softwares available till now to estimate generalized spatial cross section autoregressive 2SLS models, I designed gs2slsar as a modification of Kapoor-Kelejian-Prucha (1999).

12- model(gs3sls) Generalized Spatial 3SLS Model

13- model(gs3slsar) Generalized Spatial Autoregressive 3SLS Model [Kelejian-Prucha(2004)]

14- model(ivtobit) MLE - IV Spatial Tobit Model Truncated depvar (ivtobit)

15- model(sararml) MLE - Spatial Lag/Autoregressive Error (spreg)

Requires Stata v11.2 and (sppack) module ssc install sppack

16- model(sarargs) Generalized Spatial Lag/Autoregressive Error GS2SLS (spreg)

Requires Stata v11.2 and (sppack) module ssc install sppack

17- model(sarariv) Generalized Spatial Lag/Autoregressive Error IV-GS2SLS (spivreg)

Requires Stata v11.2 and (sppack) module ssc install sppack

18- model(ols) Linear Models (Non Spatial)
19- model(lag) Linear Spatial Lag Models (SAR)
20- model(durbin) Linear Spatial Durbin Models (SDM)

Run Options

run( ) is used with Spatial: model(ols, lag, durbin, gs2sls, gs2slsar)

1- run(ols) [regress] Ordinary Least Squares (OLS)
2- run(qreg) [qreg] Quantile Regression (QREG)
3- run(rreg) [rreg] Robust Regression (RREG)
4- run(sfa) [frontier] Stochastic Frontier Regression
5- run(tobit) [tobit] Tobit Regression

6- run(2sls) Two-Stage Least Squares (2SLS)
7- run(fuller) Fuller k-Class LIML
kf(#) Fuller k-Class LIML Value
8- run(gmm) Generalized Method of Moments (GMM)
9- run(kclass) Theil K-Class LIML
kc(#) Theil k-Class LIML Value
10- run(liml) Limited-Information Maximum Likelihood (LIML)
11- run(melo) Minimum Expected Loss (MELO)

robust Use Huber-White Variance-Covariance Matrix

GMM Options

hetcov Options Description

hetcov(white) White Method

hetcov(bart) Bartlett Method

hetcov(dan) Daniell Method

hetcov(nwest) Newey-West Method

hetcov(parzen) Parzen Method

hetcov(quad) Quadratic Spectral Method

hetcov(tent) Tent Method

hetcov(trunc) Truncated Method

hetcov(tukeym) Tukey-Hamming Method

hetcov(tukeyn) Tukey-Hanning Method

Ridge Options

kr(#) Ridge k value, must be in the range (0 < k < 1).

IF kr(0) in ridge(orr, grr1, grr2, grr3), model will be normal cross section regression.

ridge(orr) : Ordinary Ridge Regression [Judge,et al(1988,p.878) eq.21.4.2].
ridge(grr1): Generalized Ridge Regression [Judge,et al(1988,p.881) eq.21.4.12].
ridge(grr2): Iterative Generalized Ridge [Judge,et al(1988,p.881) eq.21.4.12].
ridge(grr3): Adaptive Generalized Ridge [Strawderman(1978)].

ridge( ) works only with:
model(ols, lag, durbin, spgmm)
run(2sls, fuller, gmm, kclass, liml, melo)

spregcs estimates Ridge regression as a multicollinearity remediation method.

General form of Ridge Coefficients and Covariance Matrix are:

Br = inv[X'X + kI] X'Y

Cov=Sig^2 * inv[X'X + kI] (X'X) inv[X'X + kI]

where:
Br = Ridge Coefficients Vector (k x 1).
Cov = Ridge Covariance Matrix (k x k).
Y = Dependent Variable Vector (N x 1).
X = Independent Variables Matrix (N x k).
k = Ridge Value (0 < k < 1).
I = Diagonal Matrix of Cross Product Matrix (Xs'Xs).
Xs = Standardized Variables Matrix in Deviation from Mean.
Sig2 = (Y-X*Br)'(Y-X*Br)/DF

Weight Options

wvar(varname) Weighted Variable Name

wvar( ) must be combined with: weights(x, xi, x2, xi2)"

Weighted Variable Type Options

weights(yh) Yh - Predicted Value

weights(yh2) Yh^2 - Predicted Value Squared

weights(abse) abs(E) - Absolute Value of Residual

weights(e2) E^2 - Residual Squared

weights(x) (x) Variable

weights(xi) (1/x) Inverse Variable

weights(x2) (x^2) Squared Variable

weights(xi2) (1/x^2) Inverse Squared Variable

Other Options

zero convert missing values observations to Zero

order(1,2,3,4) Order of lagged independent variables up to maximum 4th order.
order(2,3,4) works only with: model(gs2sls, gs2slsar). Default is 1

nwmat(1,2,3,4) number of Rho's matrixes to be used with: model(mstar, mstard)}

endog(vars) add other additional Endogenous Variables
in model(gs2sls, gs2slsar, sarariv, ivtobit)

inst(vars) add other additional Instrumental Variables with
model(gs2sls, gs2slsar, sarariv, ivtobit)
if the same variables are included in aux(varlist),
so Instrumental Variables will be Exogenous variables in RHS side

spregcs command:
spregcs y1 x1 x2 , wmfile(SPWcs) model(gs2sls) run(2sls) endog(y2) inst(x3 x4)

is identical to
ivregress 2sls y1 x1 x2 (w1y_y1 y2 = x1 x2 x3 x4 w1x_x1 w1x_x2)

***Both additional Endogenous and Instrumental Variables in:
model(gs2sls, gs2slsar, sarariv, ivtobit)
will be added without converting them to spatial lagged variables

eq(1, 2) Tests for equation (#) in model(gs3sls, gs3slsar), default is 1.

var2(varlist) Dependent-Independent Variables for second equation in model(gs3sls, gs3slsar).

var2(varlist) must be combine with: model(gs3sls)
if you have system of 2 Equations:
Y1 = Y2 X1 X2
Y2 = Y1 X3 X4
Variables of Eq.1 are: Dep. & Indep. Variables
Variables of Eq.2 are: Dep. & Indep. Variables [in option var2( )]; i.e,
spregcs y1 x1 x2 , wmfile(SPWcs) model(gs3sls) var2(y2 x3 x4) eq(1)
spregcs y1 x1 x2 , wmfile(SPWcs) model(gs3sls) var2(y2 x3 x4) eq(2)

rest(#) Number of Restrections.

coll keep collinear variables; default is removing collinear variables.

cost Fit Cost Frontier instead of Production Function run(frontier)

noconstant Exclude Constant Term from RHS Equation only
not valid in model(sem, sac)

noconexog Exclude Constant Term from all Equations
(both RHS and Instrumental Equations).
Default of spregcs is including Constant Term
in both RHS and Instrumental Equations

hausman Hausman Specification Tests

tests display ALL lma, lmc, lmf, lmh, lmn, lmsp, lmi, diag, reset, haus tests

dn Use (N) divisor instead of (N-K) for Degrees of Freedom (DF)

ols model(gs3sls) Ordinary Least Squares (OLS)
2sls model(gs3sls) Two-Stage Least Squares (2SLS)
3sls model(gs3sls) Three-Stage Least Squares (3SLS)
sure model(gs3sls) Seemingly Unrelated Regression Estimation (SURE)
mvreg model(gs3sls) SURE with OLS DF adjustment (MVREG)
first model(gs3sls, ivtobit)
display Full first-stage regression, diagnostic and identification tests

grids(#) model(sararml)initial grid search values of lambda and rho parameters

het model(sarargs, sarariv) Use estimator for heteroskedastic disturbance terms

impower(#) model(sarargs, sarariv)
Use q powers of matrix W to form instrument matrix H (q= 2,3,...,7).
Default is 2

mle conditional maximum-likelihood estimator; {cmd:model(ivtobit)

twostep Newey's two-step estimator; model(ivtobit)

inrho(#) Set initial value for rho; default is 0

inlambda(#) Set initial value for lambda; default is 0

nolog suppress iteration of the log likelihood

tobit Estimate model via Tobit regression

ll(#) value of minimum left-censoring dependent variable with:
model(sar, sem, sdm, sac, spgmm), and run(tobit); default is 0

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.

mfx(lin, log) with model(sar, sdm, sac, mstar, mstard) can calculate:

- Total Marginal Effects and Elasticities.
- Direct Marginal Effects and Elasticities.
- InDirect Marginal Effects and Elasticities.

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

spar(rho, lam) type of spatial autoregressive coefficients, (rho) [Rho], and (lam) [Lambda]

- spar(rho) is default for model(sar, sac, sdm, mstar, mstard, sararml, sarargs, sarariv)
- spar(rho) cannot be used with model(sem)

- spar(lam) is default for model(sem)
- spar(lam) cannot be used with model(sar, sdm, mstar, mstard)
- spar(lam) is an alternative with model(sac)

- model(sac, sararml, sarargs, sarariv) work with the two types spar(rho, lam)
- model(lag, gs2sls, gs2slsar, gs3sls, gs3slsar, ivtobit)
not work with the two types spar(rho, lam)

dist(norm, exp, weib) Distribution of error term:

1- dist(norm) Normal distribution; default.

2- dist(exp) Exponential distribution.

3- dist(weib) Weibull distribution.

4- dist(hn) Half-Normal distribution, run(sfa).

5- dist(tn) Truncated-Normal distribution, run(sfa).

dist option is used to remedy non normality problem, when the error term has non normality distribution.

dist(norm, exp, weib) with model(sar, sem, sdm, sac, mstar, mstard).

dist(norm) is the default distribution.

aux(varlist)add Auxiliary Variables into regression model without converting them to spatial lagged variables, or without log form, i.e., dummy variables.
This option dont include these auxiliary variables among spatial lagged variables, it is useful in model(sdm, durbin, mstard)
to avoid lost degrees of freedom (DF).
Using many dummy variables must be used with caution to avoid multicollinearity problem, that causes singular matrix, and lead to abort estimation.
aux( ) not works with model(sem, sac).

mhet(varlist) Set variable(s) that will be included in Spatial cross section Multiplicative Heteroscedasticity model, this option is used with model(sar, sdm, mstar, mstard), to remidy Heteroscedasticity.
option [weight], can be used in the case of Heteroscedasticity in errors.

vhet(varlist) Explanatory Variables for idiosyncratic error variance function; use noconstant to suppress constant term. this option is used with run(sfa).

predict(new_variable) Predicted values variable

resid(new_variable) Residuals values variable computed as Ue=Y-Yh

robust Huber-White standard errors model(sar, sdm, spgmm)

tech(name) technique algorithm for maximization of the log likelihood function LLF
tech(nr) Newton-Raphson (NR) algorithm; default
tech(bhhh) Berndt-Hall-Hall-Hausman (BHHH) algorithm
tech(dfp) Davidon-Fletcher-Powell (DFP) algorithm
tech(bfgs) Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm

iter(#) maximum iterations; default is 100
if iter(#) is reached (100), this means convergence not achieved yet,
so you can use another technique algorithm to converge LLF function
or exceed number of maximum iterations more than 100.

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

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

Other maximization_options allows the user to specify other maximization options (e.g., difficult, trace, iterate(#), etc.).
However, you should rarely have to specify them, though they may be helpful if parameters approach boundary values.

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 countries

- 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
- Geographically Weighted Regression: wY = wBX ; e = lWe+u

- General Spatial Model is used to deal with both types of spatial dependence,
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 information,
which is related to greater uncertainty, less precision, and larger standard 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 error,
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 specification
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 dependence,
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

*** cross section 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

Hausman Specification Test (InConsistent Problem)

hausman Hausman Specification Test (InConsistent Problem)

- Ho = B Consistent * Ha = B InConsistent
LM = (Bi-Bo)'inv(Vi-Vo)*(Bi-Bo)

Identification Restrictions LM Tests

lmiden Identification Restrictions LM Tests:

- Y = LHS Dependent Variable in Equation i
- Yi = RHS Endogenous Variables in Equation i
- Xi = RHS Included Exogenous Variables in Equation i
- Z = Overall Exogenous Variables in the System
- Sargan LM Test
- Basmann LM Test
- Hansen Over Identification LM Test

REgression Specification Error Tests (RESET)

reset REgression Specification Error Tests (RESET)

* Ho: Model is Specified - Ha: Model is Misspecified
- Ramsey RESET2 Test: Y= X Yh2
- Ramsey RESET3 Test: Y= X Yh2 Yh3
- Ramsey RESET4 Test: Y= X Yh2 Yh3 Yh4
- DeBenedictis-Giles Specification ResetL Test
- DeBenedictis-Giles Specification ResetS Test
- White Functional Form Test: E2= X X2

Linear vs Log-Linear Functional Form Tests

lmform Linear vs Log-Linear Functional Form Tests

- R-squared
- Log Likelihood Function (LLF)
- Antilog R2
- Box-Cox Test
- Bera-McAleer BM Test
- Davidson-Mackinnon PE Test

Multicollinearity Diagnostic Tests

lmcl Multicollinearity Diagnostic Tests

- works if there are two independent variables or more in the model.
spregcs computes OLS Multicollinearity Diagnostic Tests:

1- VIF: variance inflation factors for independent variables
2- Eigenvalues (Eigenval)
3- Condition Index (C_Index)
4- Condition Number (C_Number)
5- R2 between each independent variable with other independent variables (R2_xi,X)

* Correlation Matrix
* Multicollinearity Diagnostic Criteria
* Farrar-Glauber Multicollinearity Tests
Ho: No Multicollinearity - Ha: Multicollinearity
* (1) Farrar-Glauber Multicollinearity Chi2-Test
* (2) Farrar-Glauber Multicollinearity F-Test
* (3) Farrar-Glauber Multicollinearity t-Test
* Multicollinearity Ranges
* Determinant of |X'X|
* Theil R2 Multicollinearity Effect:
- Gleason-Staelin Q0
- Heo Range Q1

- Multicollinearity Detection:

1. A high F statistic or R2 leads to reject the joint hypothesis that all of the coefficients are zero, but individual t-statistics are low.

2. High simple correlation coefficients are sufficient but not necessary for multicollinearity.

3. One can compute condition number. That is, the ratio of largest to smallest root of the matrix x'x. This may not always be useful as the standard errors of the estimates depend on the ratios of elements of characteristic vectors to the roots.

- Multicollinearity Remediation:

1. Use prior information or restrictions on the coefficients. One clever way to do this was developed by Theil and Goldberger. See tgmixed, and Theil(1971, pp 347-352).

2. Use additional data sources. This does not mean more of the same. It means pooling cross section and time series.

3. Transform the data. For example, inversion or differencing.

4. Use a principal components estimator. This involves using a weighted average of the regressors, rather than all of the regressors.

5. Another alternative regression technique is ridge regression. This involves putting extra weight on the main diagonal of X'X.

6. Dropping troublesome RHS variables. This begs the question of specification error.

Saved Results

spregcs 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

e(df1) DF1
e(df2) DF2
e(rmse) Root Mean Squared Error
e(rss) Residual Sum of Squares
e(maxEig) Maximum Eigenvalue
e(minEig) minimum Eigenvalue

e(rank) rank of e(V)
e(rmse_#) root mean squared error for equation #
e(rss_#) residual sum of squares for equation #

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

*** Hausman Specification cross section/IV-cross section Tests:
e(lmhs) Hausman cross section vs IV-cross section
e(lmhsp) Hausman cross section vs IV-cross section P-Value

*** Identification Restrictions LM Tests (gs2sls, gs2slsar, gs3sls, gs3slsar, sarariv, ivtobit):
e(lmb) Basmann LM Test
e(lmbp) Basmann LM Test P-Value
e(lms) Sargan LM Test
e(lmsp) Sargan LM Test P-Value

e(lmihj) Hansen Over Identification J Test for run(gmm)
e(lmihjp) Hansen Over Identification J Test P-Value
e(dfgmm) Hansen Over Identification DF

*** REgression Specification Error Tests (RESET):
e(resetf1) Ramsey Specification ResetF1 Test
e(resetf1p) Ramsey Specification ResetF1 Test P-Value
e(resetf2) Ramsey Specification ResetF2 Test
e(resetf2p) Ramsey Specification ResetF2 Test P-Value
e(resetf3) Ramsey Specification ResetF3 Test
e(resetf3p) Ramsey Specification ResetF3 Test P-Value

e(resetl1) DeBenedictis-Giles Specification ResetL1 Test
e(resetl1p) DeBenedictis-Giles Specification ResetL1 Test P-Value
e(resetl2) DeBenedictis-Giles Specification ResetL2 Test
e(resetl2p) DeBenedictis-Giles Specification ResetL2 Test P-Value
e(resetl3) DeBenedictis-Giles Specification ResetL3 Test
e(resetl3p) DeBenedictis-Giles Specification ResetL3 Test P-Value

e(resets1) DeBenedictis-Giles Specification ResetS1 Test
e(resets1p) DeBenedictis-Giles Specification ResetS1 Test P-Value
e(resets2) DeBenedictis-Giles Specification ResetS2 Test
e(resets2p) DeBenedictis-Giles Specification ResetS2 Test P-Value
e(resets3) DeBenedictis-Giles Specification ResetS3 Test
e(resets3p) DeBenedictis-Giles Specification ResetS3 Test P-Value

e(lmw) Functional Form White LM Test
e(lmwp) Functional Form White LM Test P-Value

*** Linear vs Log-Linear Functional Form Tests:
e(r2lin) Linear R2
e(r2log) Log-Log R2
e(llflin) LLF - Linear
e(llflog) LLF - Log-Log
e(r2lina) Antilog R2 Linear vs Log-Log: R2Lin
e(r2loga) Antilog R2 Log-Log vs Linear: R2log
e(boxcox) Box-Cox Test
e(boxcoxp) Box-Cox Test P-Value
e(bmlin) Bera-McAleer BM Test - Linear ModeL
e(bmlinp) Bera-McAleer BM Test - Linear ModeL P-Value
e(bmlog) Bera-McAleer BM Test - Log-Log ModeL
e(bmlogp) Bera-McAleer BM Test - Log-Log ModeL P-Value
e(dmlin) Davidson-Mackinnon PE Test - Linear ModeL
e(dmlinp) Davidson-Mackinnon PE Test - Linear ModeL P-Value
e(dmlog) Davidson-Mackinnon PE Test - Log-Log ModeL
e(dmlogp) Davidson-Mackinnon PE Test - Log-Log 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(mfxlinb) Beta, Total, Direct, and InDirect Marginal Effect
for model(sar, sdm, sac, sararml, sarargs, sarariv) in Lin Form
e(mfxline) Beta, Total, Direct, and InDirect Elasticity
for model(sar, sdm, sac, sararml, sarargs, sarariv) in Lin Form

e(mfxlogb) Beta, Total, Direct, and InDirect Marginal Effect
for model(sar, sdm, sac, sararml, sarargs, sarariv) in Log Form
e(mfxloge) Beta, Total, Direct, and InDirect Elasticity
for model(sar, sdm, sac, sararml, sarargs, sarariv) in Log Form

e(mfxlin) Marginal Effect and Elasticity in Lin Form
e(mfxlog) Marginal Effect and Elasticity in Log Form

e(gradient) gradient vector
e(ilog) iteration log (up to 20 iterations)
e(ml_h) derivative tolerance, (abs(b)+1e-3)*1e-3
e(ml_scale) derivative scale factor
e(Sigma) Sigma hat matrix
e(first) First-stage regression results

Functions
e(sample) marks estimation sample

References

Anderson T.W., Darling D.A. (1954)
"A Test of Goodness of Fit",
Journal of the American Statisical Association, 49; 765–69.

Anderson, T. W. & H. Rubin (1950)
"The Asymptotic Properties of Estimates of the Parameters of a Single Equation in a Complete System of Stochastic Equations",
Annals of Mathematical Statistics, Vol. 21; 570-82.

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.

Basmann, R.L. (1960)
"On Finite Sample Distributions of Generalized Classical Linear Identifiability Test Statistics",
Journal of the American Statisical Association, 55, Issue 292, DecemberA; 650-59.

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.

Drukker, D. M., I. R. Prucha, and R. Raciborski. (2011)
"Maximum-likelihood and generalized spatial two-stage least-squares estimators for a spatial-autoregressive model with spatial-autoregressive disturbances",
Working paper, University of Maryland, Department of Economics.
http://econweb.umd.edu/~prucha/Papers/WP_spreg_2011.pdf.

Drukker, D. M., I. R. Prucha, and R. Raciborski. (2011)
"A command for estimating spatial-autoregressive models with spatial autoregressive disturbances and additional endogenous variables",
Working paper, The University of Maryland, Department of Economics.
http://econweb.umd.edu/~prucha/Papers/WP_spivreg_2011.pdf.

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.

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.

Godfrey, L. G. (1978)
"Testing for Multiplicative Heteroskedasticity",
Journal of Econometrics, Vol.8; 227-236.

Greene, William (1993)
"Econometric Analysis",
2nd ed., Macmillan Publishing Company Inc., New York, USA..

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

Harry H. Kelejian and Ingmar R. Prucha (1999)
"A Generalized Moments Estimator for the Autoregressive Parameter in a Spatial Model",
International Economic Review, (40); 509-533.
http://econweb.umd.edu/~prucha/Papers/IER40(1999).pdf

Harry H. Kelejian and Ingmar R. Prucha (2004)
"Estimation of Simultaneous Systems of Spatially Interrelated Cross Sectional Equations",
Journal of Econometrics, (118); 27-50.
http://econweb.umd.edu/~prucha/Papers/JE118(2004).pdf

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

Hausman, Jerry (1978)
"Specification Tests in Econometrics",
Econometrica, vol.46, Nov.; 1251-1271.

Hausman, Jerry & Taylor W. (1983)
"Identification in Linear Simultaneous Equations Models with Covariance Restrictions: An Instrumental Variables Interpretation",
Econometrica, vol.51.; 1527-1549.

Hays, Jude C., Aya Kachi & Robert J. Franzese, Jr (2010)
"A Spatial Model Incorporating Dynamic, Endogenous Network Interdependence: A Political Science Application",
Statistical Methodology 7(3); 406-428.

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.

Ljung, G. & George Box (1979)
"On a Measure of Lack of Fit in Time Series Models",
Biometrika, Vol. 66; 265–270.

Maddala, G. (1992)
"Introduction to Econometrics",
2nd ed., Macmillan Publishing Company, New York, USA.

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.

Ramsey, J. B. (1969)
"Tests for Specification Errors in Classical Linear Least-Squares Regression Analysis",
Journal of the Royal Statistical Society, Series B 31; 350-371.

Sargan, J.D. (1958)
"The Estimation of Economic Relationships Using Instrumental Variables",
Econometrica, vol.26; 393-415.

Szroeter, J. (1978)
"A Class of Parametric Tests for Heteroscedasticity in Linear Econometric Models",
Econometrica, 46; 1311-28.

Theil, Henri (1971)
"Principles of Econometrics",
John Wiley & Sons, Inc., New York, USA.

White, Halbert (1980)
"A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity",
Econometrica, 48; 817-838.

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 .

clear all

sysuse spregcs.dta, clear

spregcs y x1 x2 , model(ols) run(ols)
spregcs y x1 x2 , model(ols) run(ols) dn lmsp wmfile(SPWcs)

spregcs y x1 x2 , wmfile(SPWcs) model(sar) mfx(lin)
spregcs y x1 x2 , wmfile(SPWcs) model(sar) mfx(lin) stand tests

* (1) MLE Spatial Lag Model (SAR):
spregcs y x1 x2 , wmfile(SPWcs) model(sar) tests
spregcs y x1 x2 , wmfile(SPWcs) model(sar) mfx(lin)
spregcs y x1 x2 , wmfile(SPWcs) model(sar) mfx(log) tolog
spregcs y x1 x2 , wmfile(SPWcs) model(sar) predict(Yh) resid(Ue)
spregcs ys x1 x2, wmfile(SPWcs) model(sar) tobit ll(0)
spregcs ys x1 x2, wmfile(SPWcs) model(sar) tobit ll(3)

* (2) MLE Spatial Error Model (SEM):
spregcs y x1 x2 , wmfile(SPWcs) model(sem) mfx(lin)
spregcs y x1 x2 , wmfile(SPWcs) model(sem) mfx(log) tolog
spregcs ys x1 x2, wmfile(SPWcs) model(sem) tobit ll(0)

* (3) MLE Spatial Durbin Model (SDM):
spregcs y x1 x2 , wmfile(SPWcs) model(sdm) mfx(lin)
spregcs ys x1 x2, wmfile(SPWcs) model(sdm) tobit ll(0)
spregcs y x1 , wmfile(SPWcs) model(sdm) mfx(lin) aux(x2)
spregcs y x1 x2 , wmfile(SPWcs) model(sdm) mfx(log) tolog

* (4) MLE Spatial AutoCorrelation Model (SAC):
spregcs y x1 x2 , wmfile(SPWcs) model(sac) mfx(lin) spar(rho)
spregcs y x1 x2 , wmfile(SPWcs) model(sac) mfx(log) spar(rho) tolog
spregcs y x1 x2 , wmfile(SPWcs) model(sac) mfx(lin) spar(lam)
spregcs y x1 x2 , wmfile(SPWcs) model(sac) mfx(log) spar(lam) tolog
spregcs ys x1 x2, wmfile(SPWcs) model(sac) tobit ll(0)

* (5) Spatial Exponential Regression Model
spregcs y x1 x2 , wmfile(SPWcs) model(sar) dist(exp)
spregcs y x1 x2 , wmfile(SPWcs) model(sem) dist(exp)
spregcs y x1 x2 , wmfile(SPWcs) model(sdm) dist(exp)
spregcs y x1 x2 , wmfile(SPWcs) model(sac) dist(exp)

* (6) Spatial Weibull Regression Model
spregcs y x1 x2 , wmfile(SPWcs) model(sar) dist(weib)
spregcs y x1 x2 , wmfile(SPWcs) model(sem) dist(weib)
spregcs y x1 x2 , wmfile(SPWcs) model(sdm) dist(weib)
spregcs y x1 x2 , wmfile(SPWcs) model(sac) dist(weib)

* (7) (m-STAR) Multiparametric Spatio Temporal AutoRegressive Regression
*** YOU MUST HAVE DIFFERENT Weighted Matrixes Files:
* (m-STAR) Lag Model

* (7-1) *** rum mstar in 1st nwmat
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1) model(mstar) dist(norm)
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1) model(mstar) dist(exp)
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1) model(mstar) dist(weib)
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1) model(mstar) mhet(x1 x2)

spregcs ys x1 x2, wmfile(SPWmcs1) nwmat(1) model(mstar) tobit ll(0)

* (7-2) *** Import 1 Weight Matrix, and rum mstar in 2nd nwmat
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1)
spregcs y x1 x2 , wmfile(SPWmcs2) nwmat(2) model(mstar) dist(norm)
spregcs y x1 x2 , wmfile(SPWmcs2) nwmat(2) model(mstar) dist(exp)
spregcs y x1 x2 , wmfile(SPWmcs2) nwmat(2) model(mstar) dist(weib)
spregcs y x1 x2 , wmfile(SPWmcs2) nwmat(2) model(mstar) mhet(x1 x2)

spregcs ys x1 x2, wmfile(SPWmcs2) nwmat(2) model(mstar) tobit ll(0)

* (7-3) *** Import 1,2 Weight Matrixes, and rum mstar in 3rd nwmat
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1)
spregcs y x1 x2 , wmfile(SPWmcs2) nwmat(2)
spregcs y x1 x2 , wmfile(SPWmcs3) nwmat(3) model(mstar) dist(norm)
spregcs y x1 x2 , wmfile(SPWmcs3) nwmat(3) model(mstar) dist(exp)
spregcs y x1 x2 , wmfile(SPWmcs3) nwmat(3) model(mstar) dist(weib)
spregcs y x1 x2 , wmfile(SPWmcs3) nwmat(3) model(mstar) mhet(x1)

spregcs ys x1 x2, wmfile(SPWmcs3) nwmat(3) model(mstar) tobit ll(0)

* (7-4) *** Import 1,2,3 Weight Matrixes, and rum mstar in 4th nwmat
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1)
spregcs y x1 x2 , wmfile(SPWmcs2) nwmat(2)
spregcs y x1 x2 , wmfile(SPWmcs3) nwmat(3)
spregcs y x1 x2 , wmfile(SPWmcs4) nwmat(4) model(mstar) dist(norm)
spregcs y x1 x2 , wmfile(SPWmcs4) nwmat(4) model(mstar) dist(exp)
spregcs y x1 x2 , wmfile(SPWmcs4) nwmat(4) model(mstar) dist(weib)
spregcs y x1 x2 , wmfile(SPWmcs4) nwmat(4) model(mstar) mhet(x1)

spregcs ys x1 x2, wmfile(SPWmcs4) nwmat(4) model(mstar) tobit ll(0)

* (8) (m-STAR) Multiparametric Spatio Temporal AutoRegressive Regression
*** YOU MUST HAVE DIFFERENT Weighted Matrixes Files:
* (m-STAR) Durbin Model

* (8-1) *** rum mstar in 1st nwmat
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1) model(mstard) dist(norm)
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1) model(mstard) dist(exp)
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1) model(mstard) dist(weib)
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1) model(mstard) mhet(x1 x2)

spregcs ys x1 x2, wmfile(SPWmcs1) nwmat(1) model(mstard) tobit ll(0)

* (8-2) *** Import 1 Weight Matrix, and rum mstar in 2nd nwmat
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1)
spregcs y x1 x2 , wmfile(SPWmcs2) nwmat(2) model(mstard) dist(norm)
spregcs y x1 x2 , wmfile(SPWmcs2) nwmat(2) model(mstard) dist(exp)
spregcs y x1 x2 , wmfile(SPWmcs2) nwmat(2) model(mstard) dist(weib)
spregcs y x1 x2 , wmfile(SPWmcs2) nwmat(2) model(mstard) mhet(x1 x2)

spregcs ys x1 x2, wmfile(SPWmcs2) nwmat(2) model(mstard) tobit ll(0)

* (8-3) *** Import 1,2 Weight Matrixes, and rum mstar in 3rd nwmat
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1)
spregcs y x1 x2 , wmfile(SPWmcs2) nwmat(2)
spregcs y x1 x2 , wmfile(SPWmcs3) nwmat(3) model(mstard) dist(norm)
spregcs y x1 x2 , wmfile(SPWmcs3) nwmat(3) model(mstard) dist(exp)
spregcs y x1 x2 , wmfile(SPWmcs3) nwmat(3) model(mstard) dist(weib)
spregcs y x1 x2 , wmfile(SPWmcs3) nwmat(3) model(mstard) mhet(x1)

spregcs ys x1 x2, wmfile(SPWmcs3) nwmat(3) model(mstard) tobit ll(0)

* (8-4) *** Import 1,2,3 Weight Matrixes, and rum mstar in 4th nwmat
spregcs y x1 x2 , wmfile(SPWmcs1) nwmat(1)
spregcs y x1 x2 , wmfile(SPWmcs2) nwmat(2)
spregcs y x1 x2 , wmfile(SPWmcs3) nwmat(3)
spregcs y x1 x2 , wmfile(SPWmcs4) nwmat(4) model(mstard) dist(norm)
spregcs y x1 x2 , wmfile(SPWmcs4) nwmat(4) model(mstard) dist(exp)
spregcs y x1 x2 , wmfile(SPWmcs4) nwmat(4) model(mstard) dist(weib)
spregcs y x1 x2 , wmfile(SPWmcs4) nwmat(4) model(mstard) mhet(x1)

spregcs ys x1 x2, wmfile(SPWmcs4) nwmat(4) model(mstard) tobit ll(0)

* (9) Weighted MLE Spatial Models:

* (9-1) Weighted MLE Spatial Lag Model (SAR):
spregcs y x1 x2 , wmfile(SPWcs) model(sar) wvar(x1)

* (9-2) Weighted MLE Spatial Error Model (SEM):
spregcs y x1 x2 , wmfile(SPWcs) model(sem) wvar(x1)

* (9-3) Weighted MLE Spatial Durbin Model (SDM):
spregcs y x1 x2 , wmfile(SPWcs) model(sdm) wvar(x1)

* (9-4) Weighted MLE Spatial AutoCorrelation Model (SAC):
spregcs y x1 x2 , wmfile(SPWcs) model(sac) wvar(x1)

* (9-5) Weighted (m-STAR) Lag Model
spregcs y x1 x2 , wmfile(SPWcs) model(mstar) nw(1) wvar(x1)

* (9-6) Weighted (m-STAR) Durbin Model
spregcs y x1 x2 , wmfile(SPWcs) model(mstard) nw(1) wvar(x1)

* (10) Spatial Tobit - Truncated Dependent Variable (ys)
spregcs ys x1 x2 , wmfile(SPWcs) model(sar)
spregcs ys x1 x2 , wmfile(SPWcs) model(sem)
spregcs ys x1 x2 , wmfile(SPWcs) model(sdm)
spregcs ys x1 x2 , wmfile(SPWcs) model(sac)
spregcs ys x1 x2 , wmfile(SPWcs) model(lag) run(tobit)
spregcs ys x1 x2 , wmfile(SPWcs) model(durbin) run(tobit)

* (11) Spatial Multiplicative Heteroscedasticity
spregcs y x1 x2 , wmfile(SPWcs) model(sar) mhet(x1 x2)
spregcs y x1 x2 , wmfile(SPWcs) model(sdm) mhet(x1 x2)

* (12) Spatial IV Tobit (IVTOBIT)
spregcs ys x1 x2 , wmfile(SPWcs) model(ivtobit) endog(y2) inst(x3 x4)
spregcs ys x1 x2 , wmfile(SPWcs) model(ivtobit) order(1) lmiden
spregcs ys x1 x2 , wmfile(SPWcs) model(ivtobit) order(2) lmiden
spregcs ys x1 x2 , wmfile(SPWcs) model(ivtobit) order(3) lmiden
spregcs ys x1 x2 , wmfile(SPWcs) model(ivtobit) order(4) lmiden

* (13) MLE -Spatial Lag/Autoregressive Error (SARARML)
spregcs y x1 x2 , wmfile(SPWcs) model(sararml) mfx(lin) spar(rho)
spregcs y x1 x2 , wmfile(SPWcs) model(sararml) mfx(lin) spar(lam)

* (14) Generalized Spatial Lag/Autoregressive Error GS2SLS (SARARGS)
spregcs y x1 x2 , wmfile(SPWcs) model(sarargs) mfx(lin) spar(rho)
spregcs y x1 x2 , wmfile(SPWcs) model(sarargs) mfx(lin) spar(lam)

* (15) Generalized Spatial Lag/Autoregressive Error IV-GS2SLS (SARARIV)

spregcs y x1 x2 , wmfile(SPWcs) model(sarariv) endog(y2) spar(rho) mfx(lin) inst(x3 x4)
spregcs y x1 x2 , wmfile(SPWcs) model(sarariv) endog(y2) spar(rho) mfx(lin) lmiden
spregcs y x1 x2 , wmfile(SPWcs) model(sarariv) endog(y2) spar(lam) mfx(lin) lmiden

* (16) Spatial Autoregressive Generalized Method of Moments (SPGMM)
spregcs y x1 x2 , wmfile(SPWcs) model(spgmm) mfx(lin)
spregcs y x1 x2 , wmfile(SPWcs) model(spgmm) ridge(orr) kr(0.5)
spregcs y x1 x2 , wmfile(SPWcs) model(spgmm) ridge(grr1) weight(x) wvar(x1)

* (17) Tobit Spatial Autoregressive Generalized Method of Moments (SPGMM)
spregcs ys x1 x2 , wmfile(SPWcs) model(spgmm) tobit ll(0)
spregcs ys x1 x2 , wmfile(SPWcs) model(spgmm) tobit ll(0) ridge(grr1)
spregcs ys x1 x2 , wmfile(SPWcs) model(spgmm) tobit ll(0) ridge(orr) kr(0.5)
spregcs ys x1 x2 , wmfile(SPWcs) model(spgmm) tobit ll(0) ridge(grr1) weight(x) wvar(x1)

* (18) Generalized Spatial 2SLS Models
* (18-1) Generalized Spatial 2SLS - AR(1) (GS2SLS)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(2sls) endog(y2) inst(x3 x4)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(2sls) ridge(grr1)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(2sls) ridge(orr) kr(0.5)
spregcs ys x1 x2, wmfile(SPWcs) model(gs2sls) run(2sls) order(1) tobit ll(0)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(2sls) order(1) lmiden
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(melo)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(liml)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(kclass) kc(0.5)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(fuller) kf(0.5)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(gmm) hetcov(white)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(gmm) hetcov(white) weights(x) wvar(x1)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(gmm) hetcov(bart)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(gmm) hetcov(dan)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(gmm) hetcov(nwest)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(gmm) hetcov(parzen)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(gmm) hetcov(quad)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(gmm) hetcov(tent)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(gmm) hetcov(trunc)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(gmm) hetcov(tukeym)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(gmm) hetcov(tukeyn)
* (18-2) Generalized Spatial 2SLS - AR(2) (GS2SLS)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(2sls) order(2)
* (18-3) Generalized Spatial 2SLS - AR(3) (GS2SLS)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(2sls) order(3)
* (18-4) Generalized Spatial 2SLS - AR(4) (GS2SLS)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2sls) run(2sls) order(4)

* (19) Generalized Spatial Autoregressive 2SLS (GS2SLSAR)
* (19-1) Generalized Spatial Autoregressive 2SLS - AR(1) (GS2SLSAR)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2slsar) run(2sls) endog(y2) inst(x3 x4)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2slsar) run(2sls) ridge(grr1)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2slsar) run(2sls) ridge(orr) kr(0.5)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2slsar) run(2sls) order(1) lmi haus
spregcs y x1 x2 , wmfile(SPWcs) model(gs2slsar) run(liml) order(1) lmi haus
spregcs y x1 x2 , wmfile(SPWcs) model(gs2slsar) run(melo) order(1) lmi haus
spregcs y x1 x2 , wmfile(SPWcs) model(gs2slsar) run(gmm) hetcov(white) lmi haus
* (19-2) Generalized Spatial Autoregressive 2SLS - AR(2) (GS2SLSAR)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2slsar) run(2sls) order(2)
* (19-3) Generalized Spatial Autoregressive 2SLS - AR(3) (GS2SLSAR)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2slsar) run(2sls) order(3)
* (19-4) Generalized Spatial Autoregressive 2SLS - AR(4) (GS2SLSAR)
spregcs y x1 x2 , wmfile(SPWcs) model(gs2slsar) run(2sls) order(4)

* (20) Generalized Spatial 3SLS - (G32SLS)
* Y1 = Y2 X1 X2
* Y2 = Y1 X3 X4
* (20-1) Generalized Spatial 3SLS - AR(1) (GS3SLS)
spregcs y1 x1 x2 , var2(y2 x3 x4) wmfile(SPWcs) model(gs3sls) eq(1) mfx(lin) order(1)
* (20-2) Generalized Spatial 3SLS - AR(2) (GS3SLS)
spregcs y1 x1 x2 , var2(y2 x3 x4) wmfile(SPWcs) model(gs3sls) eq(1) mfx(lin) order(2)
* (20-3) Generalized Spatial 3SLS - AR(3) (GS3SLS)
spregcs y1 x1 x2 , var2(y2 x3 x4) wmfile(SPWcs) model(gs3sls) eq(1) mfx(lin) order(3)
* (20-4) Generalized Spatial 3SLS - AR(4) (GS3SLS)
spregcs y1 x1 x2 , var2(y2 x3 x4) wmfile(SPWcs) model(gs3sls) eq(1) mfx(lin) order(4)

* (21) Generalized Spatial Autoregressive 3SLS - (GS3SLSAR)
* (21-1) Generalized Spatial Autoregressive 3SLS - AR(1) (GS3SLSAR)
spregcs y1 x1 x2 , var2(y2 x3 x4) wmfile(SPWcs) model(gs3slsar) eq(1)
spregcs y1 x1 x2 , var2(y2 x3 x4) wmfile(SPWcs) model(gs3slsar) eq(1) mfx(lin) order(1)
* (21-2) Generalized Spatial Autoregressive 3SLS - AR(2) (GS3SLSAR)
spregcs y1 x1 x2 , var2(y2 x3 x4) wmfile(SPWcs) model(gs3slsar) eq(1) mfx(lin) order(2)
* (21-3) Generalized Spatial Autoregressive 3SLS - AR(3) (GS3SLSAR)
spregcs y1 x1 x2 , var2(y2 x3 x4) wmfile(SPWcs) model(gs3slsar) eq(1) mfx(lin) order(3)
* (21-4) Generalized Spatial Autoregressive 3SLS - AR(4) (GS3SLSAR)
spregcs y1 x1 x2 , var2(y2 x3 x4) wmfile(SPWcs) model(gs3slsar) eq(1) mfx(lin) order(4)

* (22) Geographically Weighted Regressions (GWR)
* ols spregcs y x1 x2 , wmfile(SPWcs) model(gwr) run(ols)
* sfa spregcs y x1 x2 , wmfile(SPWcs) model(gwr) run(sfa)
* sfa spregcs y x1 x2 , wmfile(SPWcs) model(gwr) run(sfa) cost
* tobit spregcs ys x1 x2, wmfile(SPWcs) model(gwr) run(tobit)

* (23) Non Spatial Regression Models
* Ordinary Least Squares (OLS) Regression:
* ols spregcs y x1 x2 , wmfile(SPWcs) model(ols) run(ols)
* Frontier Regression
* sfa spregcs y x1 x2 , wmfile(SPWcs) model(ols) run(sfa)
* sfa spregcs y x1 x2 , wmfile(SPWcs) model(ols) run(sfa) cost
* Tobit Regression
* tobit spregcs ys x1 x2 , wmfile(SPWcs) model(ols) run(tobit)

* (24) Spatial Lag Regression Models (LAG)
* ols spregcs y x1 x2 , wmfile(SPWcs) model(lag) run(ols)
* sfa spregcs y x1 x2 , wmfile(SPWcs) model(lag) run(sfa)
* sfa spregcs y x1 x2 , wmfile(SPWcs) model(lag) run(sfa) cost
* tobit spregcs ys x1 x2, wmfile(SPWcs) model(lag) run(tobit)

* (25) Spatial Durbin Regression Models (DURBIN)
* ols spregcs y x1 x2 , wmfile(SPWcs) model(durbin) run(ols)
* sfa spregcs y x1 x2 , wmfile(SPWcs) model(durbin) run(sfa)
* sfa spregcs y x1 x2 , wmfile(SPWcs) model(durbin) run(sfa) cost
* tobit spregcs ys x1 x2, wmfile(SPWcs) model(durbin) run(tobit)

* (26) Restrected Spatial Regression Models
spregcs y x1 x2 , wmfile(SPWcs) model(sar) rest(1) mfx(lin) tests
spregcs y x1 x2 , wmfile(SPWcs) model(sdm) rest(1) mfx(lin) tests
spregcs y x1 x2 , wmfile(SPWcs) model(mstar) rest(1) mfx(lin) tests
spregcs y x1 x2 , wmfile(SPWcs) model(mstard) rest(1) mfx(lin) tests

* (17) Spatial Autoregressive Generalized Method of Moments (SPGMM) (Cont.)
This example is taken from Prucha data about:
Generalized Moments Estimator for the Autoregressive Parameter in a Spatial Model
More details can be found in:
http://econweb.umd.edu/~prucha/Research_Prog1.htm
Results of model(spgmm) is identical to:
http://econweb.umd.edu/~prucha/STATPROG/OLS/PROGRAM1.log

clear all
sysuse spregcs1.dta , clear
spregcs y x1 , wmfile(SPWcs1) model(spgmm)

* (19) 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 model(gs2slsar) with order(2) is identical to:
http://econweb.umd.edu/~prucha/STATPROG/2SLS/PROGRAM2.log

clear all
sysuse spregcs2.dta , clear
spregcs y x1 , wmfile(SPWcs1) model(gs2slsar) run(2sls) order(2)

* (21) Generalized Spatial Autoregressive 3SLS (GS3SLSAR) (Cont.)
This example is taken from Prucha data about:
Estimation of Simultaneous Systems of Spatially Interrelated Cross Sectional Equations
More details can be found in:
http://econweb.umd.edu/~prucha/Research_Prog4.htm
Results of model(gs3slsar) with order(2) is identical to:
http://econweb.umd.edu/~prucha/STATPROG/SIMEQU/PROGRAM4.log

clear all
sysuse spregcs3.dta , clear
spregcs y1 x1 , var2(y2 x2) wmfile(SPWcs1) model(gs3slsar) order(2)

Acknowledgments

I would like to thank the authors of the following Stata modules:

- David Drukker, and Ingmar Prucha for writing sppack.

Author

Emad Abd Elmessih Shehata
Professor (PhD Economics)
Agricultural Research Center - Agricultural Economics Research Institute - Egypt
Email: emadstat@hotmail.com
WebPage at IDEAS: http://ideas.repec.org/f/psh494.html
WebPage at EconPapers: http://econpapers.repec.org/RAS/psh494.htm

SPREGCS Citation

Shehata, Emad Abd Elmessih (2016)

SPREGCS: "Stata Module Econometric Toolkit to Estimate Spatial Cross Section Regression Models"

Online Help:

*** Spatial Econometrics Regression Models:

--------------------------------------------------------------------------------
*** (1) Spatial Panel Data Regression Models:
spregxt Spatial Panel Regression Models: Econometric 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 Regression
spmstarxt (m-STAR) Spatial Lag Panel Models
spmstardxt (m-STAR) Spatial Durbin Panel Models
spmstardhxt (m-STAR) Spatial Durbin Multiplicative Heteroscedasticity Panel Models
spmstarhxt (m-STAR) 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 & Durbin 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 Models: Econometric 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 Sections Models
spmstarh (m-STAR) Spatial Lag Multiplicative Heteroscedasticity Cross Sections 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
sptobitmstarxt Tobit (m-STAR) Spatial Lag Panel Models
sptobitmstardxt Tobit (m-STAR) Spatial Durbin Panel Models
sptobitmstardhxt Tobit (m-STAR) Spatial Durbin Multiplicative Heteroscedasticity Panel Models
sptobitmstarhxt Tobit (m-STAR) Spatial Lag Multiplicative Heteroscedasticity Panel 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
sptobitmstard Tobit (m-STAR) Spatial Durbin Cross Sections Models
sptobitmstardh Tobit (m-STAR) Spatial Durbin Multiplicative Heteroscedasticity Cross Sections
sptobitmstarh Tobit (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
--------------------------------------------------------------------------------