Learn R Programming

⚠️There's a newer version (1.3-13) of this package.Take me there.

spdep (version 0.1-9)

Spatial dependence: weighting schemes, statistics and models

Description

A collection of functions to create spatial weights matrix objects from polygon contiguities, from point patterns by distance and tesselations, for summarising these objects, and for permitting their use in spatial data analysis; a collection of tests for spatial autocorrelation, including global Moran's I, Geary's C, Hubert/Mantel general cross product statistic, Empirical Bayes estimates and spatial Index, and Getis/Ord G, local Moran's I and Getis/Ord G, saddlepoint approximations for global and local Moran's I; and functions for estimating spatial simultaneous autoregressive (SAR) models.

Copy Link

Version

Install

install.packages('spdep')

Monthly Downloads

40,858

Version

0.1-9

License

GPL version 2 or newer

Maintainer

Roger Bivand

Last Published

June 10th, 2025

Functions in spdep (0.1-9)

set.spChkOption

Control checking of spatial object IDs
read.gal

Read a GAL lattice file into a neighbours list
EBImoran.mc

Permutation test for empirical Bayes index
knn2nb

Neighbours list from knn object
moran.test

Moran's I test for spatial autocorrelation
listw2sn

Spatial neighbour sparse representation
nb2mat

Spatial weights matrices for neighbours lists
graphneigh

Graph based spatial weights
nb.set.operations

Set operations on neighborhood objects
LR.sarlm

Likelihood ratio test
EBlocal

Local Empirical Bayes estimator
errorsarlm

Spatial simultaneous autoregressive error model estimation
EBest

Global Empirical Bayes estimator
nbdists

Spatial link distance measures
moran.plot

Moran scatterplot
localmoran.sad

Saddlepoint approximation of local Moran's Ii tests
spweights.constants

Provides constants for spatial weights matrices
sp.mantel.mc

Mantel-Hubert spatial general cross product statistic
geary.mc

Permutation test for Geary's C statistic
dnearneigh

Neighbourhood contiguity by distance
tri2nb

Neighbours list from tri object
joincount.test

BB join count statistic for k-coloured factors
edit.nb

Interactive editing of neighbours lists
geary.test

Geary's C test for spatial autocorrelation
localG

G and Gstar local spatial statistics
cell2nb

Generate neighbours list for grid cells
Graph Components

Depth First Search on Neighbor Lists
lm.LMtests

Lagrange Multiplier diagnostics for spatial dependence in linear models
include.self

Include self in neighbours list
predict.sarlm

Prediction for spatial simultaneous autoregressive linear model objects
joincount.mc

Permutation test for same colour join count statistics
summary.sarlm

summary method for class sarlm
probmap

Probability mapping for rates
moran.mc

Permutation test for Moran's I statistic
knearneigh

K nearest neighbours for spatial weights
poly2nb

Construct neighbours list from polygon list
nblag

Higher order neighbours lists
write.nb.gal

Write a neighbours list as a GAL lattice file
lag.listw

Spatial lag of a numeric vector
localmoran

Local Moran's I statistic
droplinks

Drop links in a neighbours list
plotpolys

Plot polygons
subset.nb

Subset a neighbours list
joincount

Count joins between same colours
lm.morantest

Moran's I test for residual spatial autocorrelation
invIrM

Compute SAR generating operator
diffnb

Differences between neighbours lists
card

Cardinalities for neighbours lists
geary

Compute Geary's C
eigenw

Spatial weights matrix eigenvalues
globalG.test

test for spatial autocorrelation
residuals.sarlm

Access functions for spatial simultaneous autoregressive linear model objects
airdist

Measure distance from plot
is.symmetric.nb

Test a neighbours list for symmetry
moran

Compute Moran's I
lm.morantest.sad

Saddlepoint approximation of global Moran's I test
sp.correlogram

Spatial correlogram
summary.nb

Summary function for neighbours lists
lagsarlm

Spatial simultaneous autoregressive lag model estimation
nb2listw

Spatial weights for neighbours lists
plot.nb

Plot a neighbours list
afcon

Spatial patterns of conflict in Africa 1966-78
eire

Eire data sets
nc.sids

North Carolina SIDS data
oldcol

Columbus OH spatial analysis data set - old numbering
getisord

Getis-Ord remote sensing example data
used.cars

US 1960 used car prices
columbus

Columbus OH spatial analysis data set
boston

Corrected Boston Housing Data
auckland

Marshall's infant mortality in Auckland dataset
BH

Belo Horizont 1994 homicide data