nblag {spdep} | R Documentation

## Higher order neighbours lists

### Description

The function creates higher order neighbour lists, where higher order neighbours are only `lags` links from each other on the graph described by the input neighbours list. It will refuse to lag neighbours lists with the attribute self.included set to TRUE.

### Usage

    nblag(neighbours, maxlag)

### Arguments

`neighbours` | input neighbours list of class `nb`
`maxlag` | the maximum lag to be constructed

### Value

returns a list of lagged neighbours lists each with class `nb`

### Author(s)

Roger Bivand Roger.Bivand@nhh.no

### See Also

`summary.nb`

### Examples

    data(columbus)
    summary(col.gal.nb, coords)
    library(maptools)
    plot(polys, border="grey", forcefill=FALSE)
    plot(col.gal.nb, coords, add=TRUE)
    title(main="GAL order 1 (black) and 2 (red) links")
    col.lags <- nblag(col.gal.nb, 2)
    summary(col.lags[[2]], coords)
    plot(col.lags[[2]], coords, add=TRUE, col="red", lty=2)

[Package spdep version 0.3-25 Index]