Learn R Programming

pgirmess (version 1.3.8)

variogenv: Envelops for empirical variograms based on permutations

Description

Computes envelops for empirical variograms by permutation of the data values on the spatial locations.

Usage

variogenv(formula, locations, data, R = 99,...)

Arguments

formula
formula defining the response vector and (possible) regressors, in case of absence of regressors, use e.g. 'z~1'
locations
spatial data locations: a formula with only the coordinate variables in the right hand (explanatory variable) side e.g. '~x+y'
data
data frame where the names in formula are to be found
R
number of simulations used to compute the envelope. Default to 99
...
further arguments to be passed

Value

  • An object of class 'variogenv' inheriting from 'data.frame'.
  • npthe number of point pairs for this estimate
  • distthe average distance of all point pairs considered for this estimate
  • vgm.obsthe actual sample variogram estimate
  • upper.limthe upper limit of the enveloppe
  • lower.limthe lower limit of the enveloppe

Details

Data values are randomly allocated to the spatial locations. The empirical variogram is computed for each simulation using the same lags as for the variogram originally computed for the data. The envelops are computed by taking, at each lag, the maximum and minimum values of the variograms for the simulated data. A plot method do exist, see plot.variogenv. 'variogenv' is just a wrapper of the function variogram of the gstat package and is similar in its principle to the function variog.mc.env of the geoR package.

References

Pebesma, E.J., 2004. Multivariable geostatistics in S: the gstat package. Computers & Geosciences, 30: 683-691. http://www.gstat.org/ Information on the package 'geoR' can be found at: http://www.est.ufpr.br/geoR

See Also

plot.variogenv, variogram, variog.mc.env

Examples

Run this code
library(gstat)
data(meuse)
myvar<-variogenv(log(zinc)~1, loc=~x+y, meuse)
myvar
plot(myvar)

Run the code above in your browser using DataLab