# spdep: Spatial Dependence: Weighting Schemes, Statistics and Models

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.

- Author
- Roger Bivand [cre, aut], Micah Altman [ctb], Luc Anselin [ctb], Renato Assunção [ctb], Olaf Berke [ctb], Andrew Bernat [ctb], Guillaume Blanchet [ctb], Eric Blankmeyer [ctb], Marilia Carvalho [ctb], Bjarke Christensen [ctb], Yongwan Chun [ctb], Carsten Dormann [ctb], Stéphane Dray [ctb], Virgilio Gómez-Rubio [ctb], Martin Gubri [ctb], Rein Halbersma [ctb], Elias Krainski [ctb], Pierre Legendre [ctb], Nicholas Lewin-Koh [ctb], Hongfei Li [ctb], Jielai Ma [ctb], Abhirup Mallik [ctb, trl], Giovanni Millo [ctb], Werner Mueller [ctb], Hisaji Ono [ctb], Pedro Peres-Neto [ctb], Gianfranco Piras [ctb], Markus Reder [ctb], Michael Tiefelsdorf [ctb], Danlin Yu [ctb]
- Date of publication
- 2016-12-09 07:53:09
- Maintainer
- Roger Bivand <Roger.Bivand@nhh.no>
- License
- GPL (>= 2)
- Version
- 0.6-9
- URLs

## Man pages

- afcon
- Spatial patterns of conflict in Africa 1966-78
- aggregate.nb
- Aggregate a spatial neighbours object
- airdist
- Measure distance from plot
- anova.sarlm
- Comparison of simultaneous autoregressive models
- aple
- Approximate profile-likelihood estimator (APLE)
- aple.mc
- Approximate profile-likelihood estimator (APLE) permutation...
- aple.plot
- Approximate profile-likelihood estimator (APLE) scatterplot
- as_dgRMatrix_listw
- Interface between Matrix class objects and weights lists
- auckland
- Marshall's infant mortality in Auckland dataset
- autocov_dist
- Distance-weighted autocovariate
- baltimore
- House sales prices, Baltimore, MD 1978
- bhicv
- Data set with 4 life condition indices of Belo Horizonte...
- boston
- Corrected Boston Housing Data
- bptest.sarlm
- Breusch-Pagan test for spatial models
- card
- Cardinalities for neighbours lists
- cell2nb
- Generate neighbours list for grid cells
- choynowski
- Choynowski probability map values
- COL.OLD
- Columbus OH spatial analysis data set - old numbering
- columbus
- Columbus OH spatial analysis data set
- compon
- Depth First Search on Neighbor Lists
- diffnb
- Differences between neighbours lists
- dnearneigh
- Neighbourhood contiguity by distance
- do_ldet
- Spatial regression model Jacobian computations
- droplinks
- Drop links in a neighbours list
- EBest
- Global Empirical Bayes estimator
- EBImoran.mc
- Permutation test for empirical Bayes index
- EBlocal
- Local Empirical Bayes estimator
- edit.nb
- Interactive editing of neighbours lists
- eigenw
- Spatial weights matrix eigenvalues
- eire
- Eire data sets
- elect80
- 1980 Presidential election results
- errorsarlm
- Spatial simultaneous autoregressive error model estimation
- geary
- Compute Geary's C
- geary.mc
- Permutation test for Geary's C statistic
- geary.test
- Geary's C test for spatial autocorrelation
- getisord
- Getis-Ord remote sensing example data
- globalG.test
- Global G test for spatial autocorrelation
- GMerrorsar
- Spatial simultaneous autoregressive error model estimation by...
- graphneigh
- Graph based spatial weights
- gstsls
- Spatial simultaneous autoregressive SAC model estimation by...
- hopkins
- Hopkins burnt savanna herb remains
- house
- Lucas county OH housing
- huddersfield
- Prevalence of respiratory symptoms
- impacts.sarlm
- Impacts in spatial lag models
- include.self
- Include self in neighbours list
- invIrM
- Compute SAR generating operator
- joincount.mc
- Permutation test for same colour join count statistics
- joincount.multi
- BB, BW and Jtot join count statistic for k-coloured factors
- joincount.test
- BB join count statistic for k-coloured factors
- knearneigh
- K nearest neighbours for spatial weights
- knn2nb
- Neighbours list from knn object
- lag.listw
- Spatial lag of a numeric vector
- lagmess
- Matrix exponential spatial lag model
- lagsarlm
- Spatial simultaneous autoregressive lag model estimation
- lee
- Compute Lee's statistic
- lee.mc
- Permutation test for Lee's L statistic
- lee.test
- Lee's L test for spatial autocorrelation
- lextrB
- Find extreme eigenvalues of binary symmetric spatial weights
- listw2sn
- Spatial neighbour sparse representation
- lm.LMtests
- Lagrange Multiplier diagnostics for spatial dependence in...
- lm.morantest
- Moran's I test for residual spatial autocorrelation
- lm.morantest.exact
- Exact global Moran's I test
- lm.morantest.sad
- Saddlepoint approximation of global Moran's I test
- localG
- G and Gstar local spatial statistics
- localmoran
- Local Moran's I statistic
- localmoran.exact
- Exact local Moran's Ii tests
- localmoran.sad
- Saddlepoint approximation of local Moran's Ii tests
- LR.sarlm
- Likelihood ratio test
- mat2listw
- Convert a square spatial weights matrix to a weights list...
- MCMCsamp
- MCMC sample from fitted spatial regression
- ME
- Moran eigenvector GLM filtering
- moran
- Compute Moran's I
- moran.mc
- Permutation test for Moran's I statistic
- moran.plot
- Moran scatterplot
- moran.test
- Moran's I test for spatial autocorrelation
- mstree
- Find the minimal spanning tree
- nb2blocknb
- Block up neighbour list for location-less observations
- nb2INLA
- Output spatial neighbours for INLA
- nb2lines
- Use arc-type shapefiles for import and export of weights
- nb2listw
- Spatial weights for neighbours lists
- nb2mat
- Spatial weights matrices for neighbours lists
- nb2WB
- Output spatial weights for WinBUGS
- nbcosts
- Compute cost of edges
- nbdists
- Spatial link distance measures
- nblag
- Higher order neighbours lists
- nboperations
- Set operations on neighborhood objects
- nc.sids
- North Carolina SIDS data
- NY_data
- New York leukemia data
- p.adjustSP
- Adjust local association measures' p-values
- plot.mst
- Plot the Minimum Spanning Tree
- plot.nb
- Plot a neighbours list
- plot.skater
- Plot the object of skater class
- poly2nb
- Construct neighbours list from polygon list
- predict.sarlm
- Prediction for spatial simultaneous autoregressive linear...
- probmap
- Probability mapping for rates
- prunecost
- Compute cost of prune each edge
- prunemst
- Prune a Minimun Spanning Tree
- read.gal
- Read a GAL lattice file into a neighbours list
- read.gwt2nb
- Read and write spatial neighbour files
- residuals.sarlm
- Access functions for spatial simultaneous autoregressive...
- rotation
- Rotate a set of point by a certain angle
- sacsarlm
- Spatial simultaneous autoregressive SAC model estimation
- set.mcOption
- Options for parallel support
- set.spChkOption
- Control checking of spatial object IDs
- similar.listw
- Create symmetric similar weights lists
- skater
- Spatial 'K'luster Analysis by Tree Edge Removal
- SpatialFiltering
- Semi-parametric spatial filtering
- spautolm
- Spatial conditional and simultaneous autoregression model...
- sp.correlogram
- Spatial correlogram
- spdep
- Return package version number
- sp.mantel.mc
- Mantel-Hubert spatial general cross product statistic
- spweights.constants
- Provides constants for spatial weights matrices
- ssw
- Compute the sum of dissimilarity
- stsls
- Generalized spatial two stage least squares
- subset.listw
- Subset a spatial weights list
- subset.nb
- Subset a neighbours list
- summary.nb
- Print and summary function for neighbours and weights lists
- summary.sarlm
- summary method for class sarlm
- testnb
- Test a neighbours list for symmetry
- tolerance.nb
- Function to construct edges based on a tolerance angle and a...
- tri2nb
- Neighbours list from tri object
- trW
- Spatial weights matrix powers traces
- used.cars
- US 1960 used car prices
- wheat
- Mercer and Hall wheat yield data
- write.nb.gal
- Write a neighbours list as a GAL lattice file

## Files in this package

spdep/ChangeLog |

spdep/DESCRIPTION |

spdep/NAMESPACE |

spdep/R |

spdep/R/AAA.R |

spdep/R/EBI.R |

spdep/R/LR.spsarlm.R |

spdep/R/ME.R |

spdep/R/SpatialFiltering.R |

spdep/R/airdist.R |

spdep/R/anova.sarlm.R |

spdep/R/aple.R |

spdep/R/aple.mc.R |

spdep/R/apleplot.R |

spdep/R/autocov.R |

spdep/R/bptest.sarlm.R |

spdep/R/card.R |

spdep/R/cellneighbours.R |

spdep/R/choynowski.R |

spdep/R/components.R |

spdep/R/cyclical.R |

spdep/R/diffnb.R |

spdep/R/dnearneigh.R |

spdep/R/droplinks.R |

spdep/R/edit.nb.R |

spdep/R/eigenw.R |

spdep/R/error.hessian.R |

spdep/R/error.spsarlm.R |

spdep/R/gabrielneigh.R |

spdep/R/geary.R |

spdep/R/globalG.R |

spdep/R/graph2nb.R |

spdep/R/impacts.R |

spdep/R/jacobian.R |

spdep/R/jacobian_setup.R |

spdep/R/jc.R |

spdep/R/knearneigh.R |

spdep/R/knn2nb.R |

spdep/R/kpgm_new.R |

spdep/R/lag.hessian.R |

spdep/R/lag.spsarlm.R |

spdep/R/lee.R |

spdep/R/lee.mc.R |

spdep/R/lee.test.R |

spdep/R/lee_internal.R |

spdep/R/lextrB.R |

spdep/R/lextrW.R |

spdep/R/listw2Matrix.R |

spdep/R/listw2sn.R |

spdep/R/lm.LMtests.R |

spdep/R/lm.morantest.R |

spdep/R/localG.R |

spdep/R/localmoran.R |

spdep/R/localmoran.exact.R |

spdep/R/mcmcsamp.R |

spdep/R/mess.R |

spdep/R/moran.R |

spdep/R/moran.exact.R |

spdep/R/moran.exact.alt.R |

spdep/R/moran.plot.R |

spdep/R/mstree.R |

spdep/R/mtlocalmoran.R |

spdep/R/mtmoran.R |

spdep/R/nb2blocknb.R |

spdep/R/nb2lines.R |

spdep/R/nb2listw.R |

spdep/R/nb2mat.R |

spdep/R/nbcosts.R |

spdep/R/nbdists.R |

spdep/R/nblag.R |

spdep/R/nboperations.R |

spdep/R/p.adjustSP.R |

spdep/R/plot.mst.R |

spdep/R/plot.nb.R |

spdep/R/plot.skater.R |

spdep/R/poly2nb.R |

spdep/R/prunecost.R |

spdep/R/prunemst.R |

spdep/R/read.gal.R |

spdep/R/read.gwt2nb.R |

spdep/R/relneigh.R |

spdep/R/rotation.R |

spdep/R/s2sls.R |

spdep/R/sacsarlm.R |

spdep/R/sarlm.R |

spdep/R/skater.R |

spdep/R/soi.R |

spdep/R/sp.correlogram.R |

spdep/R/sp.mantel.R |

spdep/R/spBreg.R |

spdep/R/spChkOption.R |

spdep/R/spautolm.R |

spdep/R/subset.nb.R |

spdep/R/summary.nb.R |

spdep/R/summary.spsarlm.R |

spdep/R/tolerance.nb.R |

spdep/R/tri2nb.R |

spdep/R/utils.R |

spdep/R/weights-utils.R |

spdep/build |

spdep/build/vignette.rds |

spdep/data |

spdep/data/NY_data.rda |

spdep/data/afcon.rda |

spdep/data/auckland.rda |

spdep/data/baltimore.rda |

spdep/data/boston.rda |

spdep/data/columbus.rda |

spdep/data/datalist |

spdep/data/eire.rda |

spdep/data/elect80.rda |

spdep/data/getisord.rda |

spdep/data/hopkins.rda |

spdep/data/house.RData |

spdep/data/huddersfield.rda |

spdep/data/nc.sids.rda |

spdep/data/oldcol.rda |

spdep/data/used.cars.rda |

spdep/data/wheat.rda |

spdep/inst |

spdep/inst/CHANGES |

spdep/inst/CITATION |

spdep/inst/ChangeLog |

spdep/inst/README |

spdep/inst/doc |

spdep/inst/doc/CO69.R |

spdep/inst/doc/CO69.Rnw |

spdep/inst/doc/CO69.pdf |

spdep/inst/doc/SpatialFiltering.R |

spdep/inst/doc/SpatialFiltering.Rnw |

spdep/inst/doc/SpatialFiltering.pdf |

spdep/inst/doc/backstore |

spdep/inst/doc/backstore/boot_res.RData |

spdep/inst/doc/backstore/nyME_res.RData |

spdep/inst/doc/nb.R |

spdep/inst/doc/nb.Rnw |

spdep/inst/doc/nb.pdf |

spdep/inst/doc/nb_igraph.Rmd |

spdep/inst/doc/nb_igraph.html |

spdep/inst/doc/sids.R |

spdep/inst/doc/sids.Rnw |

spdep/inst/doc/sids.pdf |

spdep/inst/etc |

spdep/inst/etc/misc |

spdep/inst/etc/misc/geary_eire.txt |

spdep/inst/etc/misc/nc_xtra.dbf |

spdep/inst/etc/misc/nyadjwts.dbf |

spdep/inst/etc/misc/nydata.dbf |

spdep/inst/etc/misc/raw_grass_borders.RData |

spdep/inst/etc/misc/unstand_sn.txt |

spdep/inst/etc/shapes |

spdep/inst/etc/shapes/NY8_utm18.dbf |

spdep/inst/etc/shapes/NY8_utm18.prj |

spdep/inst/etc/shapes/NY8_utm18.shp |

spdep/inst/etc/shapes/NY8_utm18.shx |

spdep/inst/etc/shapes/auckland.dbf |

spdep/inst/etc/shapes/auckland.shp |

spdep/inst/etc/shapes/auckland.shx |

spdep/inst/etc/shapes/bhicv.dbf |

spdep/inst/etc/shapes/bhicv.shp |

spdep/inst/etc/shapes/bhicv.shx |

spdep/inst/etc/shapes/boston_tracts.dbf |

spdep/inst/etc/shapes/boston_tracts.prj |

spdep/inst/etc/shapes/boston_tracts.shp |

spdep/inst/etc/shapes/boston_tracts.shx |

spdep/inst/etc/shapes/columbus.dbf |

spdep/inst/etc/shapes/columbus.shp |

spdep/inst/etc/shapes/columbus.shx |

spdep/inst/etc/shapes/eire.dbf |

spdep/inst/etc/shapes/eire.shp |

spdep/inst/etc/shapes/eire.shx |

spdep/inst/etc/shapes/sids.dbf |

spdep/inst/etc/shapes/sids.shp |

spdep/inst/etc/shapes/sids.shx |

spdep/inst/etc/shapes/wheat.dbf |

spdep/inst/etc/shapes/wheat.shp |

spdep/inst/etc/shapes/wheat.shx |

spdep/inst/etc/weights |

spdep/inst/etc/weights/NY_nb.gal |

spdep/inst/etc/weights/baltk4.GWT |

spdep/inst/etc/weights/columbus.gal |

spdep/inst/etc/weights/ncCC89.gal |

spdep/inst/etc/weights/ncCR85.gal |

spdep/inst/etc/weights/us48.txt |

spdep/inst/etc/weights/us48_q.GAL |

spdep/inst/etc/weights/us48_rk.GAL |

spdep/inst/etc/weights/wmat.dat |

spdep/man |

spdep/man/COL.OLD.Rd |

spdep/man/EBImoran.mc.Rd |

spdep/man/EBest.Rd |

spdep/man/EBlocal.Rd |

spdep/man/GMerrorsar.Rd |

spdep/man/LR.sarlm.Rd |

spdep/man/MCMCsamp.Rd |

spdep/man/ME.Rd |

spdep/man/NY_data.Rd |

spdep/man/SpatialFiltering.Rd |

spdep/man/afcon.Rd |

spdep/man/aggregate.nb.Rd |

spdep/man/airdist.Rd |

spdep/man/anova.sarlm.Rd |

spdep/man/aple.Rd |

spdep/man/aple.mc.Rd |

spdep/man/aple.plot.Rd |

spdep/man/as_dgRMatrix_listw.Rd |

spdep/man/auckland.Rd |

spdep/man/autocov_dist.Rd |

spdep/man/baltimore.Rd |

spdep/man/bhicv.Rd |

spdep/man/boston.Rd |

spdep/man/bptest.sarlm.Rd |

spdep/man/card.Rd |

spdep/man/cell2nb.Rd |

spdep/man/choynowski.Rd |

spdep/man/columbus.Rd |

spdep/man/compon.Rd |

spdep/man/diffnb.Rd |

spdep/man/dnearneigh.Rd |

spdep/man/do_ldet.Rd |

spdep/man/droplinks.Rd |

spdep/man/edit.nb.Rd |

spdep/man/eigenw.Rd |

spdep/man/eire.Rd |

spdep/man/elect80.Rd |

spdep/man/errorsarlm.Rd |

spdep/man/geary.Rd |

spdep/man/geary.mc.Rd |

spdep/man/geary.test.Rd |

spdep/man/getisord.Rd |

spdep/man/globalG.test.Rd |

spdep/man/graphneigh.Rd |

spdep/man/gstsls.Rd |

spdep/man/hopkins.Rd |

spdep/man/house.Rd |

spdep/man/huddersfield.Rd |

spdep/man/impacts.sarlm.Rd |

spdep/man/include.self.Rd |

spdep/man/invIrM.Rd |

spdep/man/joincount.mc.Rd |

spdep/man/joincount.multi.Rd |

spdep/man/joincount.test.Rd |

spdep/man/knearneigh.Rd |

spdep/man/knn2nb.Rd |

spdep/man/lag.listw.Rd |

spdep/man/lagmess.Rd |

spdep/man/lagsarlm.Rd |

spdep/man/lee.Rd |

spdep/man/lee.mc.Rd |

spdep/man/lee.test.Rd |

spdep/man/lextrB.Rd |

spdep/man/listw2sn.Rd |

spdep/man/lm.LMtests.Rd |

spdep/man/lm.morantest.Rd |

spdep/man/lm.morantest.exact.Rd |

spdep/man/lm.morantest.sad.Rd |

spdep/man/localG.Rd |

spdep/man/localmoran.Rd |

spdep/man/localmoran.exact.Rd |

spdep/man/localmoran.sad.Rd |

spdep/man/mat2listw.Rd |

spdep/man/moran.Rd |

spdep/man/moran.mc.Rd |

spdep/man/moran.plot.Rd |

spdep/man/moran.test.Rd |

spdep/man/mstree.Rd |

spdep/man/nb2INLA.Rd |

spdep/man/nb2WB.Rd |

spdep/man/nb2blocknb.Rd |

spdep/man/nb2lines.Rd |

spdep/man/nb2listw.Rd |

spdep/man/nb2mat.Rd |

spdep/man/nbcosts.Rd |

spdep/man/nbdists.Rd |

spdep/man/nblag.Rd |

spdep/man/nboperations.Rd |

spdep/man/nc.sids.Rd |

spdep/man/p.adjustSP.Rd |

spdep/man/plot.mst.Rd |

spdep/man/plot.nb.Rd |

spdep/man/plot.skater.Rd |

spdep/man/poly2nb.Rd |

spdep/man/predict.sarlm.Rd |

spdep/man/probmap.Rd |

spdep/man/prunecost.Rd |

spdep/man/prunemst.Rd |

spdep/man/read.gal.Rd |

spdep/man/read.gwt2nb.Rd |

spdep/man/residuals.sarlm.Rd |

spdep/man/rotation.Rd |

spdep/man/sacsarlm.Rd |

spdep/man/set.mcOption.Rd |

spdep/man/set.spChkOption.Rd |

spdep/man/similar.listw.Rd |

spdep/man/skater.Rd |

spdep/man/sp.correlogram.Rd |

spdep/man/sp.mantel.mc.Rd |

spdep/man/spautolm.Rd |

spdep/man/spdep.Rd |

spdep/man/spweights.constants.Rd |

spdep/man/ssw.Rd |

spdep/man/stsls.Rd |

spdep/man/subset.listw.Rd |

spdep/man/subset.nb.Rd |

spdep/man/summary.nb.Rd |

spdep/man/summary.sarlm.Rd |

spdep/man/testnb.Rd |

spdep/man/tolerance.nb.Rd |

spdep/man/trW.Rd |

spdep/man/tri2nb.Rd |

spdep/man/used.cars.Rd |

spdep/man/wheat.Rd |

spdep/man/write.nb.gal.Rd |

spdep/src |

spdep/src/Makevars |

spdep/src/card.c |

spdep/src/dfs_ncomp.c |

spdep/src/dnn.c |

spdep/src/eminmaxC.c |

spdep/src/gabriel.c |

spdep/src/gearyw.c |

spdep/src/gsymtest.c |

spdep/src/init.c |

spdep/src/insiders.c |

spdep/src/jc.c |

spdep/src/knn.c |

spdep/src/lagw.c |

spdep/src/listw2Matrix.c |

spdep/src/listw2sn.c |

spdep/src/ml_sse.c |

spdep/src/mom_calc.c |

spdep/src/nbdists.c |

spdep/src/polypoly.c |

spdep/src/relative.c |

spdep/src/skater.c |

spdep/src/spdep.h |

spdep/src/symtest.c |

spdep/vignettes |

spdep/vignettes/CO69.Rnw |

spdep/vignettes/SpatialFiltering.Rnw |

spdep/vignettes/nb.Rnw |

spdep/vignettes/nb_igraph.Rmd |

spdep/vignettes/sids.Rnw |