robustmoran: Permutation test for Robust Moran's I statistic

View source: R/robustmoran.R

robustmoranR Documentation

Permutation test for Robust Moran's I statistic

Description

A permutation test for Robust Moran's I statistic calculated by using nsim random permutations of x for the given spatial weighting scheme generated with spdep, to establish the rank of the observed statistic in relation to the nsim simulated values.

Usage

robustmoran(x, listw, alternative = "greater", nsim = 999)

Arguments

x

a numeric vector the same length as the neighbours list in spdep listw

listw

a listw object created with spdep for example by spdep::nb2listw

alternative

alternative a character string specifying the alternative hypothesis, must be "greater" (default), or "less".

nsim

number of permutations

Value

A list with statistic, p.value and res

Examples

robustmoran(sampledata$x,sampledata$w)

vincnardelli/robspdep documentation built on April 11, 2024, 10:30 a.m.