Skip to content

spdep

Spatial Dependence: Weighting Schemes, Statistics

v1.4-2 · Feb 13, 2026 · GPL (>= 2)

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 '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çã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', 'Gearys C' ('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 these measures is described in 'Bivand' and 'Wong' (2018) <doi:10.1007/s11749-018-0599-x>, with further extensions in 'Bivand' (2022) <doi:10.1111/gean.12319>. 'Lagrange' multiplier tests for spatial dependence in linear models are provided ('Anselin et al'. 1996) <doi:10.1016/0166-0462(95)02111-6>, as are 'Rao' score tests for hypothesised spatial 'Durbin' models based on linear models ('Koley' and 'Bera' 2023) <doi:10.1080/17421772.2023.2256810>. Additions in 2024 include Local Indicators for Categorical Data based on 'Carrer et al.' (2021) <doi:10.1016/j.jas.2020.105306> and 'Bivand et al.' (2017) <doi:10.1016/j.spasta.2017.03.003>; also Weighted Multivariate Spatial Autocorrelation Measures ('Bavaud' 2024) <doi:10.1111/gean.12390>. <doi:10.1080/17421772.2023.2256810>. A local indicators for categorical data (LICD) implementation based on 'Carrer et al.' (2021) <doi:10.1016/j.jas.2020.105306> and 'Bivand et al.' (2017) <doi:10.1016/j.spasta.2017.03.003> was added in 1.3-7. Multivariate 'spatialdelta' ('Bavaud' 2024) <doi:10.1111/gean.12390> was added in 1.3-13 ('Bivand' 2025 <doi:10.26034/la.cdclsl.2025.8343>). From 'spdep' and 'spatialreg' versions >= 1.2-1, the model fitting functions previously present in this package are defunct in 'spdep' and may be found in 'spatialreg'.

Downloads

48.6K

Last 30 days

522nd

138.5K

Last 90 days

567.4K

Last year

Trend: +2.5% (30d vs prior 30d)

CRAN Check Status

3 NOTE
11 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 NOTE
r-oldrel-macos-x86_64 NOTE
r-oldrel-windows-x86_64 NOTE
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (3 non-OK)
NOTE r-oldrel-macos-arm64

installed package size

installed size is  9.8Mb
  sub-directories of 1Mb or more:
    doc   6.0Mb
    etc   2.0Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  9.8Mb
  sub-directories of 1Mb or more:
    doc   6.0Mb
    etc   2.0Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  9.6Mb
  sub-directories of 1Mb or more:
    doc   6.0Mb
    etc   2.1Mb

Check History

NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-oldrel-macos-arm64

installed package size

installed size is  9.8Mb
  sub-directories of 1Mb or more:
    doc   6.0Mb
    etc   2.0Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  9.8Mb
  sub-directories of 1Mb or more:
    doc   6.0Mb
    etc   2.0Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  9.6Mb
  sub-directories of 1Mb or more:
    doc   6.0Mb
    etc   2.1Mb

Reverse Dependencies (129)

Dependency Network

Dependencies Reverse dependencies spData sf deldir boot units s2 e1071 sp BSPADATA Compind DCluster SpatialRegimes smlmkalman spatialprobit ssfa swash AGPRIS ArchipelagoEngine CARBayes CARBayesST ClustGeo DHSr DIFM +114 more reverse deps spdep

Version History

new 1.4-2 Mar 10, 2026
updated 1.4-2 ← 1.4-1 diff Feb 12, 2026
updated 1.4-1 ← 1.3-13 diff Aug 30, 2025
updated 1.3-13 ← 1.3-11 diff Jun 9, 2025
updated 1.3-11 ← 1.3-10 diff Apr 23, 2025
updated 1.3-10 ← 1.3-9 diff Jan 19, 2025
updated 1.3-9 ← 1.3-8 diff Jan 15, 2025
updated 1.3-8 ← 1.3-7 diff Dec 1, 2024
updated 1.3-7 ← 1.3-6 diff Nov 24, 2024
updated 1.3-6 ← 1.3-5 diff Sep 12, 2024
updated 1.3-5 ← 1.3-4 diff Jun 9, 2024
updated 1.3-4 ← 1.3-3 diff May 30, 2024
updated 1.3-3 ← 1.3-1 diff Feb 6, 2024
updated 1.3-1 ← 1.2-8 diff Nov 22, 2023
updated 1.2-8 ← 1.2-7 diff Feb 27, 2023
updated 1.2-7 ← 1.2-5 diff Sep 30, 2022
updated 1.2-5 ← 1.2-4 diff Aug 11, 2022
updated 1.2-4 ← 1.2-3 diff Apr 17, 2022
updated 1.2-3 ← 1.2-2 diff Mar 28, 2022
updated 1.2-2 ← 1.2-1 diff Jan 28, 2022