Learn R Programming

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

spdep (version 0.1-2)

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 and Geary's C, local Moran's I, saddlepoint approximations for global and local Moran's I; and functions for estimating spatial simultaneous autoregressive (SAR) models. Was formerly the three packages: spweights, sptests, and spsarlm.

Copy Link

Version

Install

install.packages('spdep')

Monthly Downloads

41,428

Version

0.1-2

License

GPL version 2 or newer

Maintainer

Roger Bivand

Last Published

January 20th, 2025

Functions in spdep (0.1-2)

plot.nb

Plot a neighbours list
graphneigh

Graph based spatial weights
summary.nb

Summary function for neighbours lists
droplinks

Drop links in a neighbours list
geary.mc

Permutation test for Geary's C statistic
lagsarlm

Spatial simultaneous autoregressive lag model estimation
eigenw

Spatial weights matrix eigenvalues
localmoran.sad

Saddlepoint approximation of local Moran's Ii tests
Graph Components

Depth First Search on Neighbor Lists
nbdists

Spatial link distance measures
LR.sarlm

Likelihood ratio test
moran.mc

Permutation test for Moran's I statistic
knn2nb

Neighbours list from knn object
lag.listw

Spatial lag of a numeric vector
include.self

Include self in neighbours list
listw2sn

Spatial neighbour sparse representation
nb2mat

Spatial weights matrices for neighbours lists
cell2nb

Generate neighbours list for grid cells
airdist

Measure distance from plot
moran.plot

Moran scatterplot
lm.morantest

Moran's I test for residual spatial autocorrelation
lm.morantest.sad

Saddlepoint approximation of global Moran's I test
nb.set.operations

Set operations on neighborhood objects
geary

Compute Geary's C
nb2listw

Spatial weights for neighbours lists
geary.test

Geary's C test for spatial autocorrelation
nblag

Higher order neighbours lists
invIrM

Compute SAR generating operator
plotpolys

Plot polygons
moran.test

Moran's I test for spatial autocorrelation
subset.nb

Subset a neighbours list
localG

G and Gstar local spatial statistics
spweights.constants

Provides constants for spatial weights matrices
joincount.mc

Permutation test for same colour join count statistics
errorsarlm

Spatial simultaneous autoregressive error model estimation
tri2nb

Neighbours list from tri object
joincount.test

BB join count statistic for k-coloured factors
dnearneigh

Neighbourhood contiguity by distance
card

Cardinalities for neighbours lists
is.symmetric.nb

Test a neighbours list for symmetry
moran

Compute Moran's I
write.nb.gal

Write a neighbours list as a GAL lattice file
diffnb

Differences between neighbours lists
edit.nb

Interactive editing of neighbours lists
summary.sarlm

summary method for class sarlm
read.gal

Read a GAL lattice file into a neighbours list
knearneigh

K nearest neighbours for spatial weights
joincount

Count joins between same colours
lm.LMtests

Lagrange Multiplier diagnostics for spatial dependence in linear models
localmoran

Local Moran's I statistic
poly2nb

Construct neighbours list from polygon list
oldcol

Columbus OH spatial analysis data set - old numbering
columbus

Columbus OH spatial analysis data set
used.cars

US 1960 used car prices
eire

Eire data sets
afcon

Spatial patterns of conflict in Africa 1966-78
getisord

Getis-Ord remote sensing example data