Correlogram

Share:

Description

Calculates and plots a correlogram

Usage

1
2
correlogram(x, v, dist = 5000, dmatrix = FALSE, ns = 99,
  latlong = FALSE, ...)

Arguments

x

SpatialPointsDataFrame object

v

Test variable in x@data

dist

Distance of correlation lags, if latlong=TRUE units are in kilometres

dmatrix

Should the distance matrix be include in output (TRUE/FALSE)

ns

Number of simulations to derive simulation envelope

latlong

Coordinates are in latlong (TRUE/FALSE)

...

Arguments passed to cor ('pearson', 'kendall' or 'spearman')

Value

A list object containing:

autocorrelation is a data.frame object with the following components

autocorrelation - Autocorrelation value for each distance lag

dist - Value of distance lag

lci - Lower confidence interval (p=0.025)

uci - Upper confidence interval (p=0.975)

CorrPlot recordedplot object to recall plot

dmatrix Distance matrix (if dmatrix=TRUE)

Note

depends: sp

Author(s)

Jeffrey S. Evans <jeffrey_evans@tnc.org>

Examples

1
2
3
4
library(sp)
data(meuse)
coordinates(meuse) = ~x+y
zinc.cg <- correlogram(x = meuse, v = meuse@data[,'zinc'], dist = 250, ns = 9)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.