help spreg postestimationalso see:spreg-------------------------------------------------------------------------------

Title

spreg postestimation-- Postestimation tools for spreg

DescriptionThe following postestimation commands are available after

spreg:command description ------------------------------------------------------------------------- INCLUDE help post_estat INCLUDE help post_estimates INCLUDE help post_lincom INCLUDE help post_lrtest INCLUDE help post_nlcom

predictpredicted values INCLUDE help post_predictnl INCLUDE help post_test INCLUDE help post_testnl -------------------------------------------------------------------------

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

statisticDescription ------------------------------------------------------------------------- Mainrformreduced-form predicted values; the defaultlimitedpredictions based on a limited information setnaivepredictions based on the observed values ofyxblinear predictionrftransform(real matrix T)user-provided (I-lambda*W)^(-1) -------------------------------------------------------------------------

Options for predict+------+ ----+ Main +-------------------------------------------------------------

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

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

naivepredicted values based on the observed values ofy,lambda*W*y+X*b.

xbcalculates the linear predictionX*b.See

Remarksbelow for a detailed explanation of thepredictoptions.

rftransform()tellspredictuse the user-specified inverse of (I-lambda*W). The matrixTshould reside in Mata memory. This option is available only with the reduced-form predictor.

The methods implemented in

predictafterspregare 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+eThis model specifies a system of

nsimultaneous equations for the dependent variabley.The predictor based on the reduced-form equation is obtained by solving the model for the endogenous variable

ywhich gives (I-lambda*W)^(-1)*X*bfor the SAR and SARAR models andX*bfor 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) * (I-lambda*W')^(-1) E(w_i*y) =w_i* (I-lambda*W)^(-1) *X*bcov(u_i,w_i*y) =sigma^2 *w_i*Y*w_i' var(w_i*y) =sigma^2 *u_i*(I-lambda*W')^(-1)*w_i'where

w_iandu_idenote theith row ofWandU, respectively. The limited information set predictor for observationiis 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_idenotes theith row ofX. Because the formula involves thesigma^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 combinationW*y, thus it is more efficient than the reduced-form predictor. Both predictors are unbiased predictors conditional on their information set.The naive predictor is obtained by treating the values of

yon the right-hand side as given, which results in the formulalambda*W*y+X*bfor the SAR and SARAR models, andX*bfor 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 whenlambda=rho= 0.The naive predictor ignores the feedback that the neighboring observations may have on the value of

yin a given observation. The reduced-form and limited information set predictors factor this feedback into the computations through the (I-lambda*W)^(-1)*X*bterm. 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.

ExamplesSetup

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

factoriesin observation 50 by 1 and obtain a new set of predicted values. replace factories = factories+1 in 50. predict y1Compare the two sets of predicted values

. gen deltay = abs(y1-y0). count if deltay!=0Note that a change in one observation resulted in a total of 25 changes.

ReferencesDrukker, 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 Economics37, 363-374.

Also seeOnline:

spreg,spivreg(if installed)