acfft: Spatial autocorrelation diagnostics

View source: R/acfft.R

acfftR Documentation

Spatial autocorrelation diagnostics

Description

A function for calculating spatial autocorrelation using Moran's I.

Usage

acfft(coord, f, lim1 = 1, lim2 = 2, dmax = 10)

Arguments

coord

A matrix of two columns with corresponding cartesian coordinates. Currently only supports integer coordinates.

f

A vector which is the same length as x and y

lim1

Lower bound for first bin. Default is 1

lim2

Upper bound for first bin. Default is 2

dmax

Number of distance bins to examine. Bins are formed by annuli of gradually increasing radii. Default is 10.

Value

A vector of Moran's I values for each distance bin.

Author(s)

Gudrun Carl

Examples

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


levisc8/spind documentation built on April 3, 2024, 4:52 a.m.