Learn R Programming

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

spdep (version 0.4-6)

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 Assun��o/Reis Index, Getis/Ord G and multicoloured join count statistics, 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) lag and error models, weighted and unweighted SAR and CAR spatial regression models, semi-parametric and Moran eigenvector spatial filtering, GM SAR error models, and generalized spatial two stage least squares models.

Copy Link

Version

Install

install.packages('spdep')

Monthly Downloads

36,452

Version

0.4-6

License

GPL version 2 or newer

Maintainer

Roger Bivand

Last Published

January 20th, 2025

Functions in spdep (0.4-6)

ME

Moran eigenvector GLM filtering
Graph Components

Depth First Search on Neighbor Lists
anova.sarlm

Comparison of simultaneous autoregressive models
geary.test

Geary's C test for spatial autocorrelation
nblag

Higher order neighbours lists
cell2nb

Generate neighbours list for grid cells
mat2listw

Convert a square spatial weights matrix to a weights list object
moran

Compute Moran's I
globalG.test

test for spatial autocorrelation
is.symmetric.nb

Test a neighbours list for symmetry
include.self

Include self in neighbours list
nb.set.operations

Set operations on neighborhood objects
lagsarlm

Spatial simultaneous autoregressive lag model estimation
localmoran

Local Moran's I statistic
read.gwt2nb

Read and write spatial neighbour files
graphneigh

Graph based spatial weights
geary.mc

Permutation test for Geary's C statistic
geary

Compute Geary's C
EBlocal

Local Empirical Bayes estimator
dnearneigh

Neighbourhood contiguity by distance
probmap

Probability mapping for rates
tri2nb

Neighbours list from tri object
lm.LMtests

Lagrange Multiplier diagnostics for spatial dependence in linear models
nb2lines

Use arc-type shapefiles for import and export of weights
p.adjustSP

Adjust local association measures' p-values
nbdists

Spatial link distance measures
predict.sarlm

Prediction for spatial simultaneous autoregressive linear model objects
EBImoran.mc

Permutation test for empirical Bayes index
asMatrixCsrListw

Convert spatial weights list to CSR matrix form
NY_data

New York leukemia data
LR.sarlm

Likelihood ratio test
spdep

Return package version number
card

Cardinalities for neighbours lists
lm.morantest

Moran's I test for residual spatial autocorrelation
summary.nb

Print and summary function for neighbours and weights lists
as_dgRMatrix_listw

Interface between Matrix class objects and weights lists
joincount.mc

Permutation test for same colour join count statistics
invIrM

Compute SAR generating operator
residuals.sarlm

Access functions for spatial simultaneous autoregressive linear model objects
bptest.sarlm

Breusch-Pagan test for spatial models
stsls

Generalized spatial two stage least squares
poly2nb

Construct neighbours list from polygon list
joincount.multi

BB, BW and Jtot join count statistic for k-coloured factors
localmoran.sad

Saddlepoint approximation of local Moran's Ii tests
similar.listw

Create symmetric similar weights lists
nb2WB

Output spatial weights for WinBUGS
moran.test

Moran's I test for spatial autocorrelation
subset.nb

Subset a neighbours list
baltimore

House sales prices, Baltimore, MD 1978
droplinks

Drop links in a neighbours list
summary.sarlm

summary method for class sarlm
nb2mat

Spatial weights matrices for neighbours lists
hopkins

Hopkins burnt savanna herb remains
SpatialFiltering

Semi-parametric spatial filtering
read.gal

Read a GAL lattice file into a neighbours list
sp.mantel.mc

Mantel-Hubert spatial general cross product statistic
listw2sn

Spatial neighbour sparse representation
localG

G and Gstar local spatial statistics
airdist

Measure distance from plot
plot.nb

Plot a neighbours list
subset.listw

Subset a spatial weights list
choynowski

Choynowski probability map values
GMerrorsar

Spatial simultaneous autoregressive error model estimation by GMM
EBest

Global Empirical Bayes estimator
autocov_dist

Distance-weighted autocovariate
errorsarlm

Spatial simultaneous autoregressive error model estimation
write.nb.gal

Write a neighbours list as a GAL lattice file
huddersfield

Prevalence of respiratory symptoms
lag.listw

Spatial lag of a numeric vector
lm.morantest.sad

Saddlepoint approximation of global Moran's I test
knn2nb

Neighbours list from knn object
knearneigh

K nearest neighbours for spatial weights
nb2blocknb

Block up neighbour list for location-less observations
sp.correlogram

Spatial correlogram
moran.plot

Moran scatterplot
spweights.constants

Provides constants for spatial weights matrices
spautolm

Spatial conditional and simultaneous autoregression model estimation
diffnb

Differences between neighbours lists
eigenw

Spatial weights matrix eigenvalues
joincount.test

BB join count statistic for k-coloured factors
set.spChkOption

Control checking of spatial object IDs
moran.mc

Permutation test for Moran's I statistic
nb2listw

Spatial weights for neighbours lists
edit.nb

Interactive editing of neighbours lists
afcon

Spatial patterns of conflict in Africa 1966-78
boston

Corrected Boston Housing Data
auckland

Marshall's infant mortality in Auckland dataset
oldcol

Columbus OH spatial analysis data set - old numbering
columbus

Columbus OH spatial analysis data set
eire

Eire data sets
nc.sids

North Carolina SIDS data
used.cars

US 1960 used car prices
getisord

Getis-Ord remote sensing example data