vincnardelli / robspdep

robspdep: Robust Spatial Dependence

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

robspdep: Robust Spatial Dependence

arXiv

The R package robspdep is a collection of functions and tests for robust spatial autocorrelation fully compatible with spdep. It include global and local Robust Moran and GK presented in Nardelli and Arbia (2024).

Installation

The package is work in progress and it is not available in the CRAN. However you can install it directly from the github repo.

# The easiest way to get robspdep is to install it from GitHub:
# install.packages("devtools")
devtools::install_github("vincnardelli/robspdep")

Example of usage and comparison with spdep

This is a basic example which shows you how use robspdep and compare the results obtained with spdep:

library(spdep)
library(robspdep)

moran.mc(sampledata$x, sampledata$w, nsim=999)
moran.mc(sampledata$y, sampledata$w, nsim=999)

robustmoran(sampledata$x, sampledata$w)
robustmoran(sampledata$y, sampledata$w)

gk(sampledata$x,sampledata$w)
gk(sampledata$y,sampledata$w)

References

Nardelli, Vincenzo, and Giuseppe Arbia. "On Robust Measures of Spatial Correlation." arXiv preprint arXiv:2402.07297 (2024).

About

robspdep: Robust Spatial Dependence

License:Other


Languages

Language:R 100.0%