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

Description Usage Arguments Value Examples

View source: R/rectifiedI.R

Description

resamplingI 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
resamplingI(distM, varOfInterest, n = 1000, scaling = TRUE)

Arguments

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.

varOfInterest

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

n

number of permutations. The default value is 1000

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 Moran's I.

Examples

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

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