correlog {ncf} | R Documentation |
Uni- and multivariate spatial correlograms
Description
correlog
is the function to estimate spatial (cross-)correlograms. Either univariate or multivariate (time seres) for each site can be used.
Usage
correlog(
x,
y,
z,
w = NULL,
increment,
resamp = 999,
latlon = FALSE,
na.rm = FALSE,
quiet = FALSE
)
Arguments
x |
vector of length n representing the x coordinates (or longitude; see latlon). |
y |
vector of length n representing the y coordinates (or latitude). |
z |
vector of length n or matrix of dimension n x p representing p observation at each location. |
w |
an optional second variable with identical dimension to z (to estimate cross-correlograms). |
increment |
increment for the uniformly distributed distance classes. |
resamp |
the number of permutations under the null to assess level of significance. |
latlon |
If TRUE, coordinates are latitude and longitude. |
na.rm |
If TRUE, NA's will be dealt with through pairwise deletion of missing values. |
quiet |
If TRUE, the counter is suppressed during execution. |
Details
The spatial (cross-)correlogram and Mantel (cross-)correlogram estimates the spatial dependence at discrete distance classes.
The region-wide similarity forms the reference line (the zero-line); the x-intercept is thus the distance at which object are no more similar than that expected by-chance-alone across the region.
If the data are univariate, the spatial dependence is measured by Moran's I. If it is multivariate, it is measured by the centred Mantel statistic. (Use correlog.nc
if the non-centered multivariate correlogram is desired).
Missing values are allowed – values are assumed missing at random.
Value
An object of class "correlog" is returned, consisting of the following components:
correlation |
the value for the Moran (or Mantel) similarity. |
mean.of.class |
the actual average of the distances within each distance class. |
nlok |
the number of pairs within each distance class. |
x.intercept |
the interpolate x.intercept of Epperson (1993). |
p |
the permutation two-sided p-value for each distance-class. |
corr0 |
If a cross-correlogram is calculated, corr0 gives the empirical cross-correlation at distance zero. |
Author(s)
Ottar N. Bjornstad onb1@psu.edu
References
Bjornstad, O.N., Ims, R.A. & Lambin, X. (1999) Spatial population dynamics: Analysing patterns and processes of population synchrony. Trends in Ecology and Evolution, 11, 427-431. <doi:10.1016/S0169-5347(99)01677-8>
Bjornstad, O.N. & Falck, W. (2001) Nonparametric spatial covariance functions: estimation and testing. Environmental and Ecological Statistics, 8:53-70. <doi:10.1023/A:1009601932481>
Epperson, B.K. (1993) Recent advances in correlation studies of spatial patterns of genetic variation. Evolutionary Biology, 27, 95-155. <doi:10.1007/978-1-4615-2878-4_4>
See Also
plot.correlog
, spline.correlog
, correlog.nc
Examples
# first generate some sample data
x <- expand.grid(1:20, 1:5)[, 1]
y <- expand.grid(1:20, 1:5)[, 2]
# z data from an exponential random field
z <- cbind(
rmvn.spa(x = x, y = y, p = 2, method = "exp"),
rmvn.spa(x = x, y = y, p = 2, method = "exp")
)
# w data from a gaussian random field
w <- cbind(
rmvn.spa(x = x, y = y, p = 2, method = "gaus"),
rmvn.spa(x = x, y = y, p = 2, method = "gaus")
)
# Spatial correlogram
fit1 <- correlog(x = x, y = y, z = z[, 1], increment = 2, resamp = 0)
## Not run: plot(fit1)
# Mantel correlogram
fit2 <- correlog(x = x, y = y, z = z, increment = 2, resamp = 0)
## Not run: plot(fit2)
# Mantel cross-correlogram
fit3 <- correlog(x = x, y = y, z = z, w = w, increment = 2, resamp = 0)
## Not run: plot(fit3)