*! version 1.0.2 16oct2015
help spmat lag

Title

spmat lag -- Create a spatial lag variable

Syntax

spmat lag [type] newvar objname varname [, id(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.

When specified, the id() option causes spmat lag to assert that the
identifiers in the dataset match the identifiers in the spmat object.
The data do not need to be sorted on id variable.

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)