nullDristribution: Calculate a distribution of how the var of interest is...

Description Usage Arguments Value Examples

View source: R/rectifiedI.R

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

1
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

1
2
3
inputFileName<-system.file("testdata", "chen.csv", package="Irescale")
input<-loadFile(inputFileName)
c<-nullDristribution(input,1000)

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