correlog.nc {ncf} | R Documentation |
Non-centered spatial (cross-)correlogram
Description
correlog.nc
is the function to estimate the non-centered (cross-)correlogram. The non-centered correlogram provides estimates of the spatial correlation for discrete distance classes. The function requires multiple observations at each location (use correlog
otherwise).
Usage
correlog.nc(
x,
y,
z,
w = NULL,
increment,
resamp = 999,
na.rm = FALSE,
latlon = 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 |
a matrix of dimension n x p representing p (>1) 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. |
na.rm |
If TRUE, NA's will be dealt with through pairwise deletion of missing values. |
latlon |
If TRUE, coordinates are latitude and longitude. |
quiet |
If TRUE, the counter is suppressed during execution. |
Details
The non-centered correlogram estimates spatial dependence at discrete distance classes. The method corresponds to the modified correlogram of Koenig & Knops(1998), but augmented to potentially estimate the cross-correlogram). The function requires multiple observations at each location. Missing values is allowed in the multivariate case (pairwise deletion will be used).
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 p-value for each distance-class. |
corr0 |
If a cross-correlogram is calculated, corr0 gives the empirical within-patch cross-correlation. |
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>
Koenig, W.D. & Knops, J.M.H. (1998) Testing for spatial autocorrelation in ecological studies. Ecography, 21, 423-429. <doi:10.1111/j.1600-0587.1998.tb00407.x>
See Also
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")
)
# noncentered (Mantel) correlogram
fit1 <- correlog.nc(x = x, y = y, z = z, increment = 2, resamp = 499)
## Not run: plot(fit1)