Learn R Programming

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

spdep (version 0.5-88)

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 tessellations, for summarizing these objects, and for permitting their use in spatial data analysis, including regional aggregation by minimum spanning tree; a collection of tests for spatial autocorrelation, including global Moran's I, APLE, 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 and exact tests for global and local Moran's I; and functions for estimating spatial simultaneous autoregressive (SAR) lag and error models, impact measures for lag 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,858

Version

0.5-88

License

GPL (>= 2)

Maintainer

Roger Bivand

Last Published

March 17th, 2015

Functions in spdep (0.5-88)

boston

Corrected Boston Housing Data
subset.nb

Subset a neighbours list
moran

Compute Moran's I
dnearneigh

Neighbourhood contiguity by distance
subset.listw

Subset a spatial weights list
sp.mantel.mc

Mantel-Hubert spatial general cross product statistic
graphneigh

Graph based spatial weights
globalG.test

Global G test for spatial autocorrelation
aple.mc

Approximate profile-likelihood estimator (APLE) permutation test
bptest.sarlm

Breusch-Pagan test for spatial models
hopkins

Hopkins burnt savanna herb remains
gstsls

Spatial simultaneous autoregressive SAC model estimation by GMM
lee.test

Lee's L test for spatial autocorrelation
p.adjustSP

Adjust local association measures' p-values
Rotation

Rotate a set of point by a certain angle
EBlocal

Local Empirical Bayes estimator
lm.LMtests

Lagrange Multiplier diagnostics for spatial dependence in linear models
columbus

Columbus OH spatial analysis data set
localmoran.sad

Saddlepoint approximation of local Moran's Ii tests
invIrM

Compute SAR generating operator
joincount.mc

Permutation test for same colour join count statistics
aggregate.nb

Aggregate a spatial neighbours object
nb.set.operations

Set operations on neighborhood objects
as_dgRMatrix_listw

Interface between Matrix class objects and weights lists
joincount.test

BB join count statistic for k-coloured factors
plot.skater

Plot the object of skater class
stsls

Generalized spatial two stage least squares
summary.sarlm

summary method for class sarlm
include.self

Include self in neighbours list
impacts

Impacts in spatial lag models
trW

Spatial weights matrix powers traces
card

Cardinalities for neighbours lists
spdep

Return package version number
mat2listw

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

Choynowski probability map values
bhicv

Data set with 4 life condition indices of Belo Horizonte region
droplinks

Drop links in a neighbours list
lagsarlm

Spatial simultaneous autoregressive lag model estimation
Graph Components

Depth First Search on Neighbor Lists
nb2blocknb

Block up neighbour list for location-less observations
EBest

Global Empirical Bayes estimator
errorsarlm

Spatial simultaneous autoregressive error model estimation
nbdists

Spatial link distance measures
lee.mc

Permutation test for Lee's L statistic
probmap

Probability mapping for rates
elect80

1980 Presidential election results
prunecost

Compute cost of prune each edge
anova.sarlm

Comparison of simultaneous autoregressive models
localG

G and Gstar local spatial statistics
huddersfield

Prevalence of respiratory symptoms
knearneigh

K nearest neighbours for spatial weights
lag.listw

Spatial lag of a numeric vector
GMerrorsar

Spatial simultaneous autoregressive error model estimation by GMM
house

Lucas county OH housing
eigenw

Spatial weights matrix eigenvalues
lee

Compute Lee's statistic
LR.sarlm

Likelihood ratio test
do_ldet

Spatial regression model Jacobian computations
localmoran

Local Moran's I statistic
diffnb

Differences between neighbours lists
nb2mat

Spatial weights matrices for neighbours lists
set.spChkOption

Control checking of spatial object IDs
auckland

Marshall's infant mortality in Auckland dataset
EBImoran.mc

Permutation test for empirical Bayes index
plot.nb

Plot a neighbours list
ME

Moran eigenvector GLM filtering
nb2lines

Use arc-type shapefiles for import and export of weights
spautolm

Spatial conditional and simultaneous autoregression model estimation
eire

Eire data sets
summary.nb

Print and summary function for neighbours and weights lists
autocov_dist

Distance-weighted autocovariate
nc.sids

North Carolina SIDS data
listw2sn

Spatial neighbour sparse representation
predict.sarlm

Prediction for spatial simultaneous autoregressive linear model objects
read.gal

Read a GAL lattice file into a neighbours list
joincount.multi

BB, BW and Jtot join count statistic for k-coloured factors
MCMCsamp

MCMC sample from fitted spatial regression
SpatialFiltering

Semi-parametric spatial filtering
baltimore

House sales prices, Baltimore, MD 1978
aple

Approximate profile-likelihood estimator (APLE)
similar.listw

Create symmetric similar weights lists
afcon

Spatial patterns of conflict in Africa 1966-78
geary.test

Geary's C test for spatial autocorrelation
write.nb.gal

Write a neighbours list as a GAL lattice file
plot.mst

Plot the Minimum Spanning Tree
edit.nb

Interactive editing of neighbours lists
poly2nb

Construct neighbours list from polygon list
mstree

Find the minimal spanning tree
knn2nb

Neighbours list from knn object
lm.morantest.exact

Exact global Moran's I test
geary.mc

Permutation test for Geary's C statistic
spweights.constants

Provides constants for spatial weights matrices
tolerance.nb

Function to construct edges based on a tolerance angle and a maximum distance
residuals.sarlm

Access functions for spatial simultaneous autoregressive linear model objects
prunemst

Prune a Minimun Spanning Tree
nb2listw

Spatial weights for neighbours lists
sp.correlogram

Spatial correlogram
nb2WB

Output spatial weights for WinBUGS
localmoran.exact

Exact local Moran's Ii tests
read.gwt2nb

Read and write spatial neighbour files
skater

Spatial 'K'luster Analysis by Tree Edge Removal
ssw

Compute the sum of dissimilarity
geary

Compute Geary's C
nbcosts

Compute cost of edges
is.symmetric.nb

Test a neighbours list for symmetry
sacsarlm

Spatial simultaneous autoregressive SAC model estimation
moran.mc

Permutation test for Moran's I statistic
lagmess

Matrix exponential spatial lag model
nb2INLA

Output spatial neighbours for INLA
used.cars

US 1960 used car prices
tri2nb

Neighbours list from tri object
wheat

Mercer and Hall wheat yield data
oldcol

Columbus OH spatial analysis data set - old numbering
airdist

Measure distance from plot
lm.morantest

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

Saddlepoint approximation of global Moran's I test
nblag

Higher order neighbours lists
set.mcOption

Options for parallel support
aple.plot

Approximate profile-likelihood estimator (APLE) scatterplot
NY_data

New York leukemia data
getisord

Getis-Ord remote sensing example data
lextrB

Find extreme eigenvalues of binary symmetric spatial weights
cell2nb

Generate neighbours list for grid cells
moran.test

Moran's I test for spatial autocorrelation
moran.plot

Moran scatterplot