Learn R Programming

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

spdep (version 0.2-5)

Spatial dependence: weighting schemes, statistics and models

Description

A collection of functions to create spatial weights matrix objects from polygon contiguities (including the creation of polygon lists from imported shapefiles), 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

41,428

Version

0.2-5

License

GPL version 2 or newer

Maintainer

Roger Bivand

Last Published

January 20th, 2025

Functions in spdep (0.2-5)

baltimore

House sales prices, Baltimore, MD 1978
localmoran

Local Moran's I statistic
residuals.sarlm

Access functions for spatial simultaneous autoregressive linear model objects
cell2nb

Generate neighbours list for grid cells
edit.nb

Interactive editing of neighbours lists
anova.sarlm

Comparison of simultaneous autoregressive models
knearneigh

K nearest neighbours for spatial weights
EBImoran.mc

Permutation test for empirical Bayes index
read.gwt2nb

Read and write GeoDa GWT spatial neighbour files
summary.sarlm

summary method for class sarlm
lm.LMtests

Lagrange Multiplier diagnostics for spatial dependence in linear models
knn2nb

Neighbours list from knn object
geary.test

Geary's C test for spatial autocorrelation
dnearneigh

Neighbourhood contiguity by distance
globalG.test

test for spatial autocorrelation
graphneigh

Graph based spatial weights
nb2listw

Spatial weights for neighbours lists
diffnb

Differences between neighbours lists
geary

Compute Geary's C
droplinks

Drop links in a neighbours list
card

Cardinalities for neighbours lists
airdist

Measure distance from plot
geary.mc

Permutation test for Geary's C statistic
EBlocal

Local Empirical Bayes estimator
joincount.mc

Permutation test for same colour join count statistics
EBest

Global Empirical Bayes estimator
nbdists

Spatial link distance measures
plot.nb

Plot a neighbours list
LR.sarlm

Likelihood ratio test
Graph Components

Depth First Search on Neighbor Lists
errorsarlm

Spatial simultaneous autoregressive error model estimation
poly2nb

Construct neighbours list from polygon list
include.self

Include self in neighbours list
sp.mantel.mc

Mantel-Hubert spatial general cross product statistic
joincount.test

BB join count statistic for k-coloured factors
spdep

Return package version number
lag.listw

Spatial lag of a numeric vector
lm.morantest.sad

Saddlepoint approximation of global Moran's I test
moran.mc

Permutation test for Moran's I statistic
tri2nb

Neighbours list from tri object
nblag

Higher order neighbours lists
lagsarlm

Spatial simultaneous autoregressive lag model estimation
mat2listw

Convert a square spatial weights matrix to a weights list object
lm.morantest

Moran's I test for residual spatial autocorrelation
predict.sarlm

Prediction for spatial simultaneous autoregressive linear model objects
moran.test

Moran's I test for spatial autocorrelation
is.symmetric.nb

Test a neighbours list for symmetry
listw2sn

Spatial neighbour sparse representation
summary.nb

Print and summary function for neighbours and weights lists
set.spChkOption

Control checking of spatial object IDs
nb.set.operations

Set operations on neighborhood objects
invIrM

Compute SAR generating operator
sp.correlogram

Spatial correlogram
probmap

Probability mapping for rates
localmoran.sad

Saddlepoint approximation of local Moran's Ii tests
moran.plot

Moran scatterplot
read.gal

Read a GAL lattice file into a neighbours list
eigenw

Spatial weights matrix eigenvalues
localG

G and Gstar local spatial statistics
moran

Compute Moran's I
subset.nb

Subset a neighbours list
nb2mat

Spatial weights matrices for neighbours lists
write.nb.gal

Write a neighbours list as a GAL lattice file
spweights.constants

Provides constants for spatial weights matrices
oldcol

Columbus OH spatial analysis data set - old numbering
nc.sids

North Carolina SIDS data
boston

Corrected Boston Housing Data
eire

Eire data sets
columbus

Columbus OH spatial analysis data set
getisord

Getis-Ord remote sensing example data
afcon

Spatial patterns of conflict in Africa 1966-78
used.cars

US 1960 used car prices
auckland

Marshall's infant mortality in Auckland dataset