Package: spdep 1.3-6
spdep: 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çã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>. 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'.
Authors:
spdep_1.3-6.tar.gz
spdep_1.3-6.zip(r-4.5)spdep_1.3-6.zip(r-4.4)spdep_1.3-6.zip(r-4.3)
spdep_1.3-6.tgz(r-4.4-x86_64)spdep_1.3-6.tgz(r-4.4-arm64)spdep_1.3-6.tgz(r-4.3-x86_64)spdep_1.3-6.tgz(r-4.3-arm64)
spdep_1.3-6.tar.gz(r-4.5-noble)spdep_1.3-6.tar.gz(r-4.4-noble)
spdep_1.3-6.tgz(r-4.4-emscripten)spdep_1.3-6.tgz(r-4.3-emscripten)
spdep.pdf |spdep.html✨
spdep/json (API)
NEWS
# Install 'spdep' in R: |
install.packages('spdep', repos = c('https://r-spatial.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/r-spatial/spdep/issues
- COL.OLD - Columbus OH spatial analysis data set - old numbering
- COL.nb - Columbus OH spatial analysis data set - old numbering
- bbs - Columbus OH spatial analysis data set
- col.gal.nb - Columbus OH spatial analysis data set
- columbus - Columbus OH spatial analysis data set
- coords - Columbus OH spatial analysis data set
- eire.coords.utm - Eire data sets
- eire.df - Eire data sets
- eire.nb - Eire data sets
- eire.polys.utm - Eire data sets
- polys - Columbus OH spatial analysis data set
spatial-autocorrelationspatial-dependencespatial-weights
Last updated 1 months agofrom:dbd3074b88. Checks:OK: 3 NOTE: 6. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Nov 01 2024 |
R-4.5-win-x86_64 | OK | Nov 01 2024 |
R-4.5-linux-x86_64 | OK | Nov 01 2024 |
R-4.4-win-x86_64 | NOTE | Nov 01 2024 |
R-4.4-mac-x86_64 | NOTE | Nov 01 2024 |
R-4.4-mac-aarch64 | NOTE | Nov 01 2024 |
R-4.3-win-x86_64 | NOTE | Nov 01 2024 |
R-4.3-mac-x86_64 | NOTE | Nov 01 2024 |
R-4.3-mac-aarch64 | NOTE | Nov 01 2024 |
Exports:addlinks1aggregate.nbairdistas.data.frame.localmoranexas.data.frame.localmoransadautocov_distcardcell2nbchkIDschoynowskicoercecomplement.nbdf2sndiffnbdnearneighdroplinksEBestEBImoran.mcEBlocaledit.nbgabrielneighgearygeary.mcgeary.testget.ClusterOptionget.coresOptionget.mcOptionget.NoNeighbourOptionget.spChkOptionget.SubgraphCeilingget.SubgraphOptionget.VerboseOptionget.ZeroPolicyOptionglobalG.testgraph2nbgrid2nbhotspotinclude.selfintersect.nbis.symmetric.glistis.symmetric.nbjoincount.mcjoincount.multijoincount.testknearneighknn2nblag.listwleelee.mclee.testlicd_multilistw2lineslistw2matlistw2snlistw2starlistw2Ulistw2WBlm.LMtestslm.morantestlm.morantest.exactlm.morantest.sadlm.RStestslocal_joincount_bvlocal_joincount_unilocalClocalC_permlocalGlocalG_permlocalGSlocalmoranlocalmoran_bvlocalmoran_permlocalmoran.exactlocalmoran.exact.altlocalmoran.sadLOSHLOSH.csLOSH.mcmake.sym.nbmat2listwmoranmoran_bvmoran.mcmoran.plotmoran.testmstreen.comp.nbnb2blocknbnb2INLAnb2linesnb2listwnb2listwdistnb2matnb2WBnbcostnbcostsnbdistsnblagnblag_cumulold.make.sym.nbp.adjustSPplot.Gabrielplot.listwplot.mc.simplot.mstplot.nbplot.relativeplot.skaterplot.spcorpoly2nbprint.jclistprint.jcmultiprint.localmoranexprint.localmoransadprint.moranexprint.moransadprint.spcorprint.summary.localmoransadprint.summary.moransadprobmapprunecostprunemstread_swm_dbfread.dat2listwread.galread.geodaread.gwt2nbread.swmdbf2listwrelativeneighremove.selfRotationSD.RStestsset.ClusterOptionset.coresOptionset.mcOptionset.NoNeighbourOptionset.spChkOptionset.SubgraphCeilingset.SubgraphOptionset.VerboseOptionset.ZeroPolicyOptionsetdiff.nbskatersn2listwsoi.graphsp.correlogramsp.mantel.mcspdepspNamedVecspweights.constantssswsubset.listwsubset.nbsummary.localmoransadsummary.moransadsym.attr.nbSzerotolerance.nbtri2nbunion.nbvi2mrcwrite.nb.galwrite.sn2datwrite.sn2DBFwrite.sn2gwt
Dependencies:bootclassclassIntDBIdeldire1071KernSmoothlatticemagrittrMASSproxyRcpps2sfspspDataunitswk
“The Problem of Spatial Autocorrelation:” forty years on
Rendered fromCO69.Rmd
usingknitr::rmarkdown
on Nov 01 2024.Last update: 2024-09-07
Started: 2019-01-09
Creating Neighbours
Rendered fromnb.Rmd
usingknitr::rmarkdown
on Nov 01 2024.Last update: 2024-09-07
Started: 2020-11-23
Creating Neighbours using sf objects
Rendered fromnb_sf.Rmd
usingknitr::rmarkdown
on Nov 01 2024.Last update: 2024-09-02
Started: 2017-11-01
Introduction to the North Carolina SIDS data set (re-revised)
Rendered fromsids.Rmd
usingknitr::rmarkdown
on Nov 01 2024.Last update: 2024-09-07
Started: 2019-01-09
No-neighbour observation and subgraph handling
Rendered fromsubgraphs.Rmd
usingknitr::rmarkdown
on Nov 01 2024.Last update: 2024-10-02
Started: 2024-09-06
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Aggregate a spatial neighbours object | aggregate.nb |
Measure distance from plot | airdist |
Distance-weighted autocovariate | autocov_dist |
Data set with 4 life condition indices of Belo Horizonte region | bhicv |
Cardinalities for neighbours lists | card |
Generate neighbours list for grid cells | cell2nb vi2mrc |
Choynowski probability map values | choynowski |
Columbus OH spatial analysis data set | bbs col.gal.nb columbus coords polys |
Differences between neighbours lists | diffnb |
Neighbourhood contiguity by distance | dnearneigh |
Drop and add links in a neighbours list | addlinks1 droplinks |
Global Empirical Bayes estimator | EBest |
Permutation test for empirical Bayes index | EBImoran EBImoran.mc |
Local Empirical Bayes estimator | EBlocal |
Interactive editing of neighbours lists | edit.nb |
Eire data sets | eire eire.coords.utm eire.df eire.nb eire.polys.utm |
Compute Geary's C | geary |
Permutation test for Geary's C statistic | geary.mc |
Geary's C test for spatial autocorrelation | geary.test |
Global G test for spatial autocorrelation | globalG.test |
Depth First Search on Neighbor Lists | n.comp.nb |
Graph based spatial weights | gabrielneigh graph2nb plot.Gabriel plot.relative relativeneigh soi.graph |
Construct neighbours for a GridTopology | grid2nb |
Cluster Classifications for Local Indicators of Spatial Association and Local Indicators for Categorical Data | hotspot hotspot.data.frame.localmoranex hotspot.default hotspot.licd hotspot.localC hotspot.localG hotspot.localmoran hotspot.summary.localmoransad |
Include self in neighbours list | include.self remove.self |
Test a neighbours list for symmetry | is.symmetric.glist is.symmetric.nb make.sym.nb old.make.sym.nb sym.attr.nb |
Permutation test for same colour join count statistics | joincount.mc |
BB, BW and Jtot join count statistic for k-coloured factors | joincount.multi print.jcmulti |
BB join count statistic for k-coloured factors | joincount.test print.jclist |
K nearest neighbours for spatial weights | knearneigh |
Neighbours list from knn object | knn2nb |
Spatial lag of a numeric vector | lag.listw |
Compute Lee's statistic | lee |
Permutation test for Lee's L statistic | lee.mc |
Lee's L test for spatial autocorrelation | lee.test |
Local Indicators for Categorical Data | licd_multi |
Spatial neighbour sparse representation | listw2sn sn2listw |
Rao's score (a.k.a Lagrange Multiplier) diagnostics for spatial dependence in linear models | lm.LMtests lm.RStests print.RStestlist print.RStestlist.summary summary.RStestlist |
Moran's I test for residual spatial autocorrelation | lm.morantest |
Exact global Moran's I test | lm.morantest.exact print.moranex |
Saddlepoint approximation of global Moran's I test | lm.morantest.sad print.moransad print.summary.moransad summary.moransad |
Calculate the local bivariate join count | local_joincount_bv |
Calculate the local univariate join count | local_joincount_uni |
Compute Local Geary statistic | localC localC.data.frame localC.default localC.formula localC.list localC.matrix localC_perm localC_perm.default localC_perm.formula |
G and Gstar local spatial statistics | localG localG_perm |
A local hotspot statistic for analysing multiscale datasets | localGS |
Local Moran's I statistic | localmoran localmoran_perm |
Compute the Local Bivariate Moran's I Statistic | localmoran_bv |
Exact local Moran's Ii tests | as.data.frame.localmoranex localmoran.exact localmoran.exact.alt print.localmoranex |
Saddlepoint approximation of local Moran's Ii tests | as.data.frame.localmoransad listw2star localmoran.sad print.localmoransad print.summary.localmoransad summary.localmoransad |
Local spatial heteroscedasticity | LOSH |
Chi-square based test for local spatial heteroscedasticity | LOSH.cs |
Bootstrapping-based test for local spatial heteroscedasticity | LOSH.mc |
Convert a square spatial weights matrix to a weights list object | mat2listw |
Compute Moran's I | moran |
Compute the Global Bivariate Moran's I | moran_bv |
Permutation test for Moran's I statistic | moran.mc |
Moran scatterplot | moran.plot |
Moran's I test for spatial autocorrelation | moran.test |
Find the minimal spanning tree | mstree |
Set operations on neighborhood objects | complement.nb intersect.nb setdiff.nb union.nb |
Block up neighbour list for location-less observations | nb2blocknb |
Output spatial neighbours for INLA | nb2INLA |
Use vector files for import and export of weights | df2sn listw2lines nb2lines |
Spatial weights for neighbours lists | listw2U nb2listw |
Distance-based spatial weights for neighbours lists | nb2listwdist |
Spatial weights matrices for neighbours lists | listw2mat nb2mat |
Output spatial weights for WinBUGS | listw2WB nb2WB |
Compute cost of edges | nbcost nbcosts |
Spatial link distance measures | nbdists |
Higher order neighbours lists | nblag nblag_cumul |
Columbus OH spatial analysis data set - old numbering | COL.nb COL.OLD oldcol |
Adjust local association measures' p-values | p.adjustSP |
Plot the Minimum Spanning Tree | plot.mst |
Plot a neighbours list | plot.listw plot.nb |
Plot the object of skater class | plot.skater |
Construct neighbours list from polygon list | poly2nb |
Probability mapping for rates | probmap |
Compute cost of prune each edge | prunecost |
Prune a Minimun Spanning Tree | prunemst |
Read a GAL lattice file into a neighbours list | read.gal read.geoda |
Read and write spatial neighbour files | read.dat2listw read.gwt2nb read.swmdbf2listw read_swm_dbf write.sn2dat write.sn2DBF write.sn2gwt |
Rotate a set of point by a certain angle | Rotation |
Rao's score and adjusted Rao's score tests of linear hypotheses for spatial Durbin and spatial Durbin error models | SD.RStests |
Options for parallel support | get.ClusterOption get.coresOption get.mcOption set.ClusterOption set.coresOption set.mcOption |
Control checking of spatial object IDs | chkIDs get.listw_is_CsparseMatrix_Option get.NoNeighbourOption get.spChkOption get.SubgraphCeiling get.SubgraphOption get.VerboseOption get.ZeroPolicyOption set.listw_is_CsparseMatrix_Option set.NoNeighbourOption set.spChkOption set.SubgraphCeiling set.SubgraphOption set.VerboseOption set.ZeroPolicyOption spNamedVec |
Spatial 'K'luster Analysis by Tree Edge Removal | skater |
Spatial correlogram | plot.spcor print.spcor sp.correlogram |
Mantel-Hubert spatial general cross product statistic | plot.mc.sim sp.mantel.mc |
Return package version number | spdep |
Defunct Functions in Package 'spdep' | anova.sarlm aple aple.mc aple.plot as.data.frame.sarlm.pred as.spam.listw as_dgRMatrix_listw as_dsCMatrix_I as_dsCMatrix_IrW as_dsTMatrix_listw bptest.sarlm can.be.simmed cheb_setup coef.gmsar coef.lagmess coef.sarlm coef.spautolm coef.stsls coerce,listw,CsparseMatrix-method coerce,listw,RsparseMatrix-method coerce,listw,symmetricMatrix-method create_WX deviance.gmsar deviance.lagmess deviance.sarlm deviance.spautolm deviance.stsls do_ldet eigenw eigen_pre_setup eigen_setup errorsarlm fitted.gmsar fitted.lagmess fitted.ME_res fitted.sarlm fitted.SFResult fitted.spautolm GMargminImage GMerrorsar griffith_sone gstsls Hausman.test Hausman.test.gmsar Hausman.test.sarlm HPDinterval.lagImpact impacts impacts.gmsar impacts.lagmess impacts.MCMC_sac_g impacts.MCMC_sar_g impacts.MCMC_sem_g impacts.sarlm impacts.SLX impacts.stsls intImpacts jacobianSetup Jacobian_W lagmess lagsarlm lextrB lextrS lextrW lmSLX localAple logLik.lagmess logLik.sarlm logLik.spautolm LR.sarlm LR1.sarlm LR1.spautolm LU_prepermutate_setup LU_setup l_max Matrix_J_setup Matrix_setup mcdet_setup MCMCsamp MCMCsamp.sarlm MCMCsamp.spautolm ME moments_setup mom_calc mom_calc_int2 plot.lagImpact powerWeights predict.sarlm predict.SLX print.gmsar print.lagImpact print.lagmess print.ME_res print.sarlm print.sarlm.pred print.SFResult print.spautolm print.stsls print.summary.gmsar print.summary.lagImpact print.summary.lagmess print.summary.sarlm print.summary.spautolm print.summary.stsls residuals.gmsar residuals.lagmess residuals.sarlm residuals.spautolm residuals.stsls sacsarlm SE_classic_setup SE_interp_setup SE_whichMin_setup similar.listw spam_setup spam_update_setup SpatialFiltering spautolm spBreg_err spBreg_lag spBreg_sac spdep-defunct stsls subgraph_eigenw summary.gmsar summary.lagImpact summary.lagmess summary.sarlm summary.spautolm summary.stsls trW vcov.sarlm Wald1.sarlm |
Provides constants for spatial weights matrices | spweights.constants Szero |
Compute the sum of dissimilarity | ssw |
Subset a spatial weights list | subset.listw |
Subset a neighbours list | subset.nb |
Print and summary function for neighbours and weights lists | print.listw print.nb print.summary.listw print.summary.nb summary.listw summary.nb |
Function to construct edges based on a tolerance angle and a maximum distance | tolerance.nb |
Neighbours list from tri object | tri2nb |
Write a neighbours list as a GAL lattice file | write.nb.gal |