Learn R Programming

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

spdep (version 0.4-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 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

40,443

Version

0.4-9

License

GPL (>= 2)

Maintainer

Roger Bivand

Last Published

January 20th, 2025

Functions in spdep (0.4-9)

geary

Compute Geary's C
joincount.mc

Permutation test for same colour join count statistics
probmap

Probability mapping for rates
summary.nb

Print and summary function for neighbours and weights lists
EBest

Global Empirical Bayes estimator
asMatrixCsrListw

Convert spatial weights list to CSR matrix form
moran

Compute Moran's I
as_dgRMatrix_listw

Interface between Matrix class objects and weights lists
oldcol

Columbus OH spatial analysis data set - old numbering
nb2listw

Spatial weights for neighbours lists
tri2nb

Neighbours list from tri object
geary.mc

Permutation test for Geary's C statistic
GMerrorsar

Spatial simultaneous autoregressive error model estimation by GMM
read.gwt2nb

Read and write spatial neighbour files
invIrM

Compute SAR generating operator
diffnb

Differences between neighbours lists
EBlocal

Local Empirical Bayes estimator
anova.sarlm

Comparison of simultaneous autoregressive models
similar.listw

Create symmetric similar weights lists
plot.nb

Plot a neighbours list
edit.nb

Interactive editing of neighbours lists
spdep

Return package version number
globalG.test

test for spatial autocorrelation
airdist

Measure distance from plot
eire

Eire data sets
joincount.test

BB join count statistic for k-coloured factors
lagsarlm

Spatial simultaneous autoregressive lag model estimation
is.symmetric.nb

Test a neighbours list for symmetry
SpatialFiltering

Semi-parametric spatial filtering
Graph Components

Depth First Search on Neighbor Lists
geary.test

Geary's C test for spatial autocorrelation
knearneigh

K nearest neighbours for spatial weights
lm.morantest.sad

Saddlepoint approximation of global Moran's I test
summary.sarlm

summary method for class sarlm
lag.listw

Spatial lag of a numeric vector
nb2lines

Use arc-type shapefiles for import and export of weights
predict.sarlm

Prediction for spatial simultaneous autoregressive linear model objects
cell2nb

Generate neighbours list for grid cells
card

Cardinalities for neighbours lists
afcon

Spatial patterns of conflict in Africa 1966-78
errorsarlm

Spatial simultaneous autoregressive error model estimation
moran.mc

Permutation test for Moran's I statistic
boston

Corrected Boston Housing Data
spautolm

Spatial conditional and simultaneous autoregression model estimation
stsls

Generalized spatial two stage least squares
include.self

Include self in neighbours list
used.cars

US 1960 used car prices
graphneigh

Graph based spatial weights
knn2nb

Neighbours list from knn object
moran.test

Moran's I test for spatial autocorrelation
joincount.multi

BB, BW and Jtot join count statistic for k-coloured factors
moran.plot

Moran scatterplot
write.nb.gal

Write a neighbours list as a GAL lattice file
poly2nb

Construct neighbours list from polygon list
nb2WB

Output spatial weights for WinBUGS
columbus

Columbus OH spatial analysis data set
subset.listw

Subset a spatial weights list
nblag

Higher order neighbours lists
nc.sids

North Carolina SIDS data
residuals.sarlm

Access functions for spatial simultaneous autoregressive linear model objects
dnearneigh

Neighbourhood contiguity by distance
set.spChkOption

Control checking of spatial object IDs
choynowski

Choynowski probability map values
eigenw

Spatial weights matrix eigenvalues
hopkins

Hopkins burnt savanna herb remains
bptest.sarlm

Breusch-Pagan test for spatial models
droplinks

Drop links in a neighbours list
sp.correlogram

Spatial correlogram
nb.set.operations

Set operations on neighborhood objects
lm.morantest

Moran's I test for residual spatial autocorrelation
listw2sn

Spatial neighbour sparse representation
autocov_dist

Distance-weighted autocovariate
subset.nb

Subset a neighbours list
huddersfield

Prevalence of respiratory symptoms
localmoran

Local Moran's I statistic
nb2blocknb

Block up neighbour list for location-less observations
EBImoran.mc

Permutation test for empirical Bayes index
nb2mat

Spatial weights matrices for neighbours lists
NY_data

New York leukemia data
read.gal

Read a GAL lattice file into a neighbours list
lm.LMtests

Lagrange Multiplier diagnostics for spatial dependence in linear models
spweights.constants

Provides constants for spatial weights matrices
baltimore

House sales prices, Baltimore, MD 1978
LR.sarlm

Likelihood ratio test
ME

Moran eigenvector GLM filtering
getisord

Getis-Ord remote sensing example data
mat2listw

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

G and Gstar local spatial statistics
p.adjustSP

Adjust local association measures' p-values
auckland

Marshall's infant mortality in Auckland dataset
localmoran.sad

Saddlepoint approximation of local Moran's Ii tests
nbdists

Spatial link distance measures
sp.mantel.mc

Mantel-Hubert spatial general cross product statistic