resamplingLocalI: Calculates n permutations of the variable of interest to...

Description Usage Arguments Value Examples

View source: R/rectifiedI.R

Description

resamplingLocalI Permute n-1 times the values of the variable of interest to calculate a Null distribution for I. It is done n-1, because one order is the original one, to make sure it is included.

Usage

1
resamplingLocalI(varOfInterest, distM, n = 1000, scaling = TRUE)

Arguments

varOfInterest

the variable name or position of the variable we are interested to calculate the spatial autocorrelation.

distM

the distance matrix. Although the equation requires a weighted distant matrix, the only parameter that will be needed is the distance matrix. This procedure is able to calculate the weighted distance matrix by itself.

n

number of permutations.

scaling

The default value is TRUE. However, if the values are previously scaled, this parameter must be set to FALSE..

Value

A vector with the n calculated Local Moran's I.

Examples

1
2
3
4
inputFileName<-system.file("testdata", "chen.csv", package="Irescale")
input<-loadFile(inputFileName)
distM<-calculateEuclideanDistance(input$data)
vI<-resamplingLocalI(input$varOfInterest,distM,n=100)

Irescale documentation built on Nov. 22, 2019, 1:07 a.m.