localICorrection: Scaling process for Local Moran's I.

Description Usage Arguments Value Examples

View source: R/rectifiedI.R

Description

localICorrection . consists in centering the local I value (I-median) and scaling by the difference between the median and 1st or 99th quantile. The correction is according to the following equation:

I = ≤ft\{ \begin{array}{lr} \frac{(I-median)}{(median - Q1)}& I < median\\ \frac{(I-median)}{(Q99-median)}& I>median\\ \end{array}\right\}

Usage

1
localICorrection(localI, vI, statsVI, scalingUpTo = "Quantile")

Arguments

localI

Local Moran's I, It could be computed using calculateLocalMoranI function.

vI

the vector obtained by resamplingI.

statsVI

the statistic vector obtained from summaryLocalIVector.

scalingUpTo

the rescaling could be done up to the 0.01% and 99.9% quantile or max and min values. The two possible options are: "MaxMin", or "Quantile". The default value for this parameter is Quantile.

Value

rescaled local I vector

Examples

1
2
3
4
5
6
7
inputFileName<-system.file("testdata", "chen.csv", package="Irescale")
input<-loadFile(inputFileName)
distM<-calculateEuclideanDistance(input$data)
localI <- calculateLocalI(input$varOfInterest,distM)
vI<-resamplingLocalI(input$varOfInterest,distM)
statsVI<-summaryLocalIVector(vI)
corrections<-localICorrection(localI,vI,scalingUpTo="Quantile")

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