spdep v1.1-3


Monthly downloads



Spatial Dependence: Weighting Schemes, Statistics

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 'Morans I' and 'Gearys C' proposed by 'Cliff' and 'Ord' (1973, ISBN: 0850860369) and (1981, ISBN: 0850860814), 'Hubert/Mantel' general cross product statistic, Empirical Bayes estimates and 'Assun<c3><a7><c3><a3>o/Reis' (1999) <doi:10.1002/(SICI)1097-0258(19990830)18:16%3C2147::AID-SIM179%3E3.0.CO;2-I> Index, 'Getis/Ord' G ('Getis' and 'Ord' 1992) <doi:10.1111/j.1538-4632.1992.tb00261.x> and multicoloured join count statistics, 'APLE' ('Li 'et al.' ) <doi:10.1111/j.1538-4632.2007.00708.x>, local 'Moran's I' ('Anselin' 1995) <doi:10.1111/j.1538-4632.1995.tb00338.x> and 'Getis/Ord' G ('Ord' and 'Getis' 1995) <doi:10.1111/j.1538-4632.1995.tb00912.x>, 'saddlepoint' approximations ('Tiefelsdorf' 2002) <doi:10.1111/j.1538-4632.2002.tb01084.x> and exact tests for global and local 'Moran's I' ('Bivand et al.' 2009) <doi:10.1016/j.csda.2008.07.021> and 'LOSH' local indicators of spatial heteroscedasticity ('Ord' and 'Getis') <doi:10.1007/s00168-011-0492-y>. The implementation of most of the measures is described in 'Bivand' and 'Wong' (2018) <doi:10.1007/s11749-018-0599-x>. 'spdep' >= 1.1-1 corresponds to 'spatialreg' >= 1.1-1, in which the model fitting functions are deprecated and pass through to 'spatialreg', but will mask those in 'spatialreg'. From versions 1.2-1, the functions will be made defunct in 'spdep'. For now 'spatialreg' only has functions from 'spdep', where they are shown as deprecated. 'spatialreg' only loads the namespace of 'spdep'; if you attach 'spdep', the same functions in the other package will be masked. Some feed through adequately, others do not.

Functions in spdep

Name Description
knearneigh K nearest neighbours for spatial weights
autocov_dist Distance-weighted autocovariate
bhicv Data set with 4 life condition indices of Belo Horizonte region
nb2INLA Output spatial neighbours for INLA
listw2sn Spatial neighbour sparse representation
nb2WB Output spatial weights for WinBUGS
p.adjustSP Adjust local association measures' p-values
lee.test Lee's L test for spatial autocorrelation
joincount.test BB join count statistic for k-coloured factors
graphneigh Graph based spatial weights
plot.mst Plot the Minimum Spanning Tree
droplinks Drop links in a neighbours list
prunecost Compute cost of prune each edge
grid2nb Construct neighbours for a GridTopology
prunemst Prune a Minimun Spanning Tree
lee Compute Lee's statistic
dnearneigh Neighbourhood contiguity by distance
joincount.mc Permutation test for same colour join count statistics
joincount.multi BB, BW and Jtot join count statistic for k-coloured factors
localmoran.sad Saddlepoint approximation of local Moran's Ii tests
spdep-deprecated Deprecated Functions in Package spdep
set.mcOption Options for parallel support
Rotation Rotate a set of point by a certain angle
spdep Return package version number
moran Compute Moran's I
mat2listw Convert a square spatial weights matrix to a weights list object
localmoran.exact Exact local Moran's Ii tests
aple.mc Approximate profile-likelihood estimator (APLE) permutation test
EBest Global Empirical Bayes estimator
EBlocal Local Empirical Bayes estimator
write.nb.gal Write a neighbours list as a GAL lattice file
nblag Higher order neighbours lists
nb2blocknb Block up neighbour list for location-less observations
lm.morantest.sad Saddlepoint approximation of global Moran's I test
lee.mc Permutation test for Lee's L statistic
nb2lines Use vector files for import and export of weights
lm.morantest.exact Exact global Moran's I test
aple.plot Approximate profile-likelihood estimator (APLE) scatterplot
nb.set.operations Set operations on neighborhood objects
airdist Measure distance from plot
geary.mc Permutation test for Geary's C statistic
geary Compute Geary's C
card Cardinalities for neighbours lists
skater Spatial 'K'luster Analysis by Tree Edge Removal
set.spChkOption Control checking of spatial object IDs
spweights.constants Provides constants for spatial weights matrices
diffnb Differences between neighbours lists
aple Approximate profile-likelihood estimator (APLE)
Graph Components Depth First Search on Neighbor Lists
cell2nb Generate neighbours list for grid cells
knn2nb Neighbours list from knn object
ssw Compute the sum of dissimilarity
geary.test Geary's C test for spatial autocorrelation
lag.listw Spatial lag of a numeric vector
localG G and Gstar local spatial statistics
globalG.test Global G test for spatial autocorrelation
eire Eire data sets
edit.nb Interactive editing of neighbours lists
lm.LMtests Lagrange Multiplier diagnostics for spatial dependence in linear models
lm.morantest Moran's I test for residual spatial autocorrelation
localmoran Local Moran's I statistic
moran.mc Permutation test for Moran's I statistic
moran.plot Moran scatterplot
include.self Include self in neighbours list
nbcosts Compute cost of edges
nbdists Spatial link distance measures
poly2nb Construct neighbours list from polygon list
probmap Probability mapping for rates
invIrM Compute SAR generating operator
sp.correlogram Spatial correlogram
nb2listw Spatial weights for neighbours lists
mstree Find the minimal spanning tree
sp.mantel.mc Mantel-Hubert spatial general cross product statistic
moran.test Moran's I test for spatial autocorrelation
plot.nb Plot a neighbours list
plot.skater Plot the object of skater class
tolerance.nb Function to construct edges based on a tolerance angle and a maximum distance
nb2mat Spatial weights matrices for neighbours lists
read.gal Read a GAL lattice file into a neighbours list
summary.nb Print and summary function for neighbours and weights lists
tri2nb Neighbours list from tri object
read.gwt2nb Read and write spatial neighbour files
subset.listw Subset a spatial weights list
is.symmetric.nb Test a neighbours list for symmetry
subset.nb Subset a neighbours list
EBImoran.mc Permutation test for empirical Bayes index
LOSH.mc Bootstrapping-based test for local spatial heteroscedasticity
aggregate.nb Aggregate a spatial neighbours object
LOSH Local spatial heteroscedasticity
oldcol Columbus OH spatial analysis data set - old numbering
choynowski Choynowski probability map values
columbus Columbus OH spatial analysis data set
LOSH.cs Chi-square based test for local spatial heteroscedasticity
No Results!

Vignettes of spdep

No Results!

Last month downloads


Include our badge in your README