*! version 1.0.3 09jun2015
help spreg postestimation also see: spreg

Title

spreg postestimation -- Postestimation tools for spreg

Description

The following postestimation commands are available after spreg:

command description

predict predicted values

Syntax for predict

predict [type] newvar [if] [in] [, statistic]

statistic

Main
rform reduced-form predicted values; the default

limited predictions based on a limited information set

full predictions based on a full information set

naive predictions based on the observed values of y

xb linear prediction

rftransform(real matrix T) user-provided (I-lambda*W)^(-1)

Options for predict

Main

rform predicted values calculated from the reduced-form equation,
y = (I-lambda*W)^(-1)*X*b.

limited predicted values based on the limited information set.
This option is available only for a model with homoskedastically-distributed errors.

full predicted values based on the full information set.
This option is available only for a model with homoskedastically-distributed errors.

naive predicted values based on the observed values of y,
lambda*W*y + X*b.

xb calculates the linear prediction X*b.

See Remarks below for a detailed
explanation of the predict options.

rftransform() tells predict to use the user-specified inverse of
(I-lambda*W). The matrix T should reside in Mata memory.
This option is available only with the reduced-form predictor.

Remarks

The methods implemented in predict after spreg are
documented in Drukker, Prucha, and Raciborski (2011) which can be
downloaded from
http://econweb.umd.edu/~prucha/Papers/WP_spreg_2011.pdf.

Recall the spatial-autoregressive spatial-error (SARAR) model

y = lambda*W*y + X*b + u

u = rho*M*u + e

This model specifies a system of n simultaneous equations for the dependent
variable y.

The predictor based on the reduced-form equation is obtained by solving the
model for the endogenous variable y which gives
(I-lambda*W)^(-1)*X*b for the SAR and SARAR models
and X*b for the SARE model.

The limited information set predictor is described in Kalejian and Prucha (2007).
Let

U = (I-rho*M)^(-1) * (I-rho*M')^(-1)

Y = (I-lambda*W)^(-1) * U * (I-lambda*W')^(-1)

E(w_i*y) = w_i * (I-lambda*W)^(-1) * X*b

var(w_i*y) = sigma^2 * w_i*Y*w_i'

cov(u_i,w_i*y) = sigma^2 * u_i*(I-lambda*W')^(-1)*w_i'

where w_i and u_i denote the ith row of W and U, respectively.
The limited information set predictor for observation i is given by

cov(u_i,w_i*y)
lambda*w_i*y + x_i*b + -------------- * [w_i*y - E(w_i*y)]
var(w_i*y)

where x_i denotes the ith row of X. Because the formula involves
the sigma^2 term, this predictor is available only for a model
with homoskedastically-distributed errors.

The reduced-form predictor is based on the information set {X,W}.
The limited information set predictor includes additionally the linear
combination W*y, thus it is more efficient than the reduced-form
predictor. Both predictors are unbiased predictors conditional on their
information set.

The full information set predictor is described in Kalejian and Prucha (2007).
It is based on the largest information set and is an efficient minimum mean
square error predictor.
Let S_i denote an {n-1} x n selector matrix which is identical
to an n x n identity matrix I except that the ith row of
I is deleted. Let y_i be the available n-1 observations on
the dependent variable.

Define

E(y_i) = S_i * (I-lambda*W)^(-1) * X*b

VC(y_i) = sigma^2 * S_i*Y*S_i'

cov(u_i,y_i) = sigma^2 * u_i*(I-lambda*W')^(-1)*S_i'

The full information set predictor for observation i is given by

lambda*w_i*y + x_i*b + cov(u_i,y_i) * (VC(y_i))^(-1) * [y_i - E(y_i)]

Because the formula involves
the sigma^2 term, this predictor is available only for a model
with homoskedastically-distributed errors.

The naive predictor is obtained by treating the values of y on the
right-hand side as given, which results in the formula
lambda*W*y + X*b for the SAR and SARAR models, and
X*b for the SARE model. Note that this predictor is a special case
of the limited information set predictor with cov(u_i,w_i*y) = 0,
but this this is true only when lambda = rho = 0.

The naive predictor ignores the feedback that the neighboring observations
may have on the value of y in a given observation. The reduced-form and
limited information set predictors factor this feedback into the computations
through the (I-lambda*W)^(-1)*X*b term. If you are
interested in how a change to a covariate in an observation affects the entire
system, you should use the reduced-form or the limited information set predictor.

Examples

Setup

. use pollute

. spmat use cobj using pollute.spmat

. spreg ml pollution factories area, id(id) dlmat(cobj) elmat(cobj)

Obtain predicted values based on the reduced-form equation

. predict y0

Increase factories in observation 50 by 1 and obtain a new set of
predicted values

. replace factories = factories+1 in 50

. predict y1

Compare the two sets of predicted values

. gen deltay = abs(y1-y0)

. count if deltay!=0

Note that a change in one observation resulted in a total of 25 changes.

References

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.

Kelejian H. H., and I. R. Prucha. 2007.
The relative efficiencies of various predictors in spatial econometric models
containing spatial lags. Regional Science and Urban Economics 37, 363-374.

Also see

Online: spreg, spivreg (if installed)