Compute a multivariate empirical variogram. It is strictly equivalent to summing univariate variograms
A matrix with numeric data
A matrix with coordinates of samples
The minimum distance value at which the variogram is computed (i.e. lower bound of the first class)
The maximum distance value at which the variogram is computed (i.e. higher bound of the last class)
Number of classes of distances
A list:
Distances (i.e. centers of distance classes).
Empirical semi-variances.
Number of connections between samples for a given distance.
Number of samples used for the computation of the variogram.
Character vector with the names of the distance classes.
Wagner H. H. (2003) Spatial covariance in plant communities: integrating ordination, geostatistics, and variance testing. Ecology, 84, 1045–1057
if(require(ade4)){
data(oribatid)
# Hellinger transformation
fau <- sqrt(oribatid$fau / outer(apply(oribatid$fau, 1, sum), rep(1, ncol(oribatid$fau)), "*"))
# Removing linear effect
faudt <- resid(lm(as.matrix(fau) ~ as.matrix(oribatid$xy)))
mvspec <- variogmultiv(faudt, oribatid$xy, nclass = 20)
mvspec
plot(mvspec$d, mvspec$var,type = 'b', pch = 20, xlab = "Distance", ylab = "C(distance)")
}