Title
spmat lag -- Create a spatial lag variable
Syntax
spmat lag [type] newvar objname varname
Description
spmat lag creates a new variable that is a product of the spatial-weighting matrix contained in the spmat object objname and the variable varname. Algebraically, spmat lag computes W*y, where W is the spatial-weighting matrix and y is the variable.
The default storage type is float. Specify double for the type to store the result in double precision.
Example
Setup . use pollute . spmat use cobj using pollute.spmat
Create the variable pollution_w containing a spatial lag of variable pollution . spmat lag double pollution_w cobj pollution
Also see
Online: spmat, spreg, spivreg, spmap, shp2dta, mif2dta (if installed)