calcBins: A function calculating the spatial/spatio-temporal bins

Description Usage Arguments Value Author(s) Examples

Description

The (spatio-temporal) space is subdivided into pairs of observations that belong to certain spatial/spatio-temporal distance classes. For each distance class, the mean separating distance of all pairs involved is calculated alongside a correlation measure. The spatial/spatio-temporal correlogram is plotted by default.

Usage

1
2
calcBins(data, var, nbins = 15, boundaries = NA, cutoff = NA,
         ..., cor.method="fasttau", plot=TRUE)

Arguments

data

Either some spatial data.frame extending Spatial or a spatio-temporal data.frame extending ST.

var

A vector containing the variable names of interest to select a subset of the variables present in the data slot.

nbins

the number of spatial bins.

boundaries

The left hand-side limits of the lag classes to be investigated, if set to NA, the cutoff will be split in equal parts according to nbins.

cutoff

The largest spatial distance to be investigated, if set to NA, one third of the bounding box's diagonal will be used.

...

Additional arguments for the spatio-temporal case:

instances

To reduce the data size or circumvent unwanted autocorrelation effects, one might provide a number of randomly selected time instances from the spatio-temporal data.frame. If this parameter is set to NA, the complete time series will be used, if different from a single number, instances will be passed on as to index time.

tlags

a vector indicating the time lags to be investigated

cor.method

defining the correlation method that should be used. Possible choices are kendall, pearson, spearman and fasttau (default) that re-uses a very fast implementation of Kendall's tau from VineCopula-package.

plot

Whether the correlogram should be plotted.

Value

A list containing the following entries

meanDists

A vector holding the mean separating distance for each lag.

lagCor

A vector holding the calculated correlation measure for each lag.

lagData

the data pairs for each lag

lags

In the spatial case, a vector holding the indices of locations used for each lag. In the spatio-temporal case, a list with a vector of spatial and temporal indices used in the lag classes each.

Author(s)

Benedikt Graeler

Examples

1
2
3
4
5
6
7
library("sp")
data("meuse")
coordinates(meuse) = ~x+y
meuse$rtZinc <- rank(meuse$zinc)/(length(meuse)+1)

## lag classes ##
bins <- calcBins(meuse, var="rtZinc", nbins=10, cutoff=800)

spcopula documentation built on May 2, 2019, 4:49 p.m.