aple: Permutation test for APLE statistic

View source: R/aple.R

apleR Documentation

Permutation test for APLE statistic

Description

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

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

aple(sampledata$x,sampledata$w)

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