robustaple: Permutation test for Robust APLE statistic

View source: R/robustaple.R

robustapleR Documentation

Permutation test for Robust APLE statistic

Description

A permutation test for Robust APLE 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

robustaple(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

robustaple(sampledata$x,sampledata$w)

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