nullDristribution {Irescale} | R Documentation |
Calculate a distribution of how the var of interest is correlated to a
Description
nullDristribution
Calculate a linear regression between variable of interest and latitude, longitude and latitude*longitude. The residuals of this data set is calculated
The variable of interest is shuffle by numReplicates times and each time the linear regression and residuals are calculated.
At each interation the correlation between the original residuals and the shuffle residuals is calculated
This vector os correlations is returned and plot it as histogram.
Usage
nullDristribution(data, numReplicates)
Arguments
data |
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. |
numReplicates |
the variable of interest to calculate Moran's I. |
Value
Histogram and the vector of correlations between residuals
Examples
inputFileName<-system.file("testdata", "chen.csv", package="Irescale")
input<-loadFile(inputFileName)
c<-nullDristribution(input,1000)