help for spseudor2

Title

spseudor2 --- Calculates goodness-of-fit measures in spatial autoregressive models

Syntax

spseudor2, wmat(name)

Description

spseudor2 calculates two so-called pseudo R2 measures to assess goodness of fit in spatial
autoregressive models estimated by spatial two stage least squares or spatial GMM. The first measure is
computed as the square of the correlation between the predicted and observed values of the dependent
variable. The other one is calculated as the ratio of the variance of the predicted values to the
variance of the observed values of the dependent variable.

In calculating the predicted values of the dependent variable, spseudor2 takes into account
the fact that the spatially lagged dependent variable is endogenous.

N.B.: spseudor2 is intended to work after ivregress and ivreg29 and requires at least Stata 10.1.

Also, spseudor2 assumes that the spatially lagged dependent variable precedes all other endogenous variables, if any, and is
the first variable of the listed right-hanside variables in the model.

Options

Options

wmat(name) indicates the name of the spatial weights matrix used in the spatial autoregressive
model estimation. The matrix must have been saved to a Mata file.

Saved Results

spseudor2 saves the following results in r():

Scalars
r(sqcorr) The square of the correlation between the predicted and observed values of the dependent variable
r(varRatio) The ratio of the variance of the predicted value to the variance of the observed value of the dependent variable

Example

. spseudor2, wmat(winvecon)

Go to http://stasacode.com for more examples as to how to add the calculated goodness-of-fit measures
to estimation results for model comparison purposes.

Author

P. Wilner Jeanty, Dept. of Agricultural, Environmental, and Development Economics,

The Ohio State University

Email to jeanty.1@osu.edu