calculateMoranI {Irescale} | R Documentation |
calculateMoranI
Moran's I computing method.
I = varOfInterest^t \times weightedM \times varOfInterest
calculateMoranI(distM, varOfInterest, scaling = TRUE)
distM |
the distance matrix. Altough the equation asks for weighted distant matrix, the paramenter that is required is only the distance matrix because this procedure calculate calculates the weighted distance mantrix by itself. |
varOfInterest |
the variable of interest to calculate Moran's I. |
scaling |
if the values are previously scaled, set this parameter to False. The default value is TRUE. |
Moran's I
Chen Y (2013). “New approaches for calculating Moran’s index of spatial autocorrelation.” PloS one, 8(7), e68336.
inputFileName<-system.file("testdata", "chen.csv", package="Irescale")
input<-loadFile(inputFileName)
distM<-calculateEuclideanDistance(input$data)
I<-calculateMoranI(distM = distM,varOfInterest = input$varOfInterest)