powered by
A function for calculating spatial autocorrelation using Moran's I.
acfft(coord, f, lim1 = 1, lim2 = 2, dmax = 10)
A matrix of two columns with corresponding cartesian coordinates. Currently only supports integer coordinates.
A vector which is the same length as x and y
x
y
Lower bound for first bin. Default is 1
Upper bound for first bin. Default is 2
Number of distance bins to examine. Bins are formed by annuli of gradually increasing radii. Default is 10.
A vector of Moran's I values for each distance bin.
# NOT RUN { data(musdata) coords<- musdata[,4:5] mglm <- glm(musculus ~ pollution + exposure, "poisson", musdata) ac<-acfft(coords,resid(mglm,type="pearson"),lim1=0,lim2=1) ac # }
Run the code above in your browser using DataLab