slag function

Spatial lag operator

Spatial lag operator

Spatial lagging method for vectors or pseries objects.

## S3 method for class 'pseries' slag(x, listw, maxlag, ...) ## Default S3 method: slag(x, listw, maxlag, index, ...)

Arguments

  • x: an object of class pseries
  • listw: an object of class listw
  • maxlag: the spatial lag order (including lower)
  • index: the default method needs a well-specified index
  • ...: additional arguments to be passed

Returns

a pseries

Author(s)

Giovanni Millo

Examples

data(Produc, package="plm") data(usaww) usalw <- spdep::mat2listw(usaww) fm <- log(gsp)~log(pcap)+log(pc)+log(emp)+unemp+slag(log(pcap), listw=usalw) slxmod <- spreml(fm, data=Produc, w = usaww, model="pooling", lag=FALSE, errors="ols")
  • Maintainer: Giovanni Millo
  • License: GPL-2
  • Last published: 2023-12-20

Useful links