Learn R Programming

geoR (version 1.2-5)

variog.model.env: Envelops for Empirical Variograms Based on Model Parameters

Description

Computes envelopes for a empirical variogram by simulating data for given model parameters.

Usage

variog.model.env(geodata, coords = geodata$coords, obj.variog,
                 model.pars, nsim = 99, save.sim = FALSE,
                 messages.screen = TRUE)

Arguments

geodata
a list containing element coords as described next. Typically an object of the class "geodata" - a geoR data-set. If not provided the argument coords must be provided instead.
coords
an $n \times 2$ matrix, each row containing Euclidean coordinates of the n data locations. By default it takes the element coords of the argument geodata.
obj.variog
an object of the class "variogram", typically an output of the function variog.
model.pars
a list with model specification and parameter values. The input is typically an object of the class variomodel which is an output of likfit, va
nsim
number of simulations used to compute the envelopes. Defaults to 99.
save.sim
logical. Indicates whether or not the simulated data are included in the output. Defaults to FALSE.
messages.screen
logical. If TRUE, the default, status messages are printed while the function is running.

Value

  • An object of the class "variogram.envelope" which is a list with the components:
  • ua vector with distances.
  • v.lowera vector with the minimum variogram values at each distance in u.
  • v.uppera vector with the maximum variogram values at each distance in u.
  • simulationsa matrix with the simulated data. Only returned if save.sim = TRUE.

Details

The envelopes are computed assuming a (transformed) Gaussian random field model. Simulated values are generated at the data locations, given the model parameters. The empirical variogram is computed for each simulation using the same lags as for the original variogram of the data. The envelopes are computed by taking, at each lag, the maximum and minimum values of the variograms for the simulated data.

References

Further information about geoR can be found at: http://www.maths.lancs.ac.uk/~ribeiro/geoR.

See Also

variog.mc.env for envelops computed by using data permutation, variog for variogram calculations, plot.variogram and variog.mc.env for graphical output. The functions likfit, variofit are used to estimate the model parameters.

Examples

Run this code
if(is.R()) data(s100)
s100.ml <- likfit(s100, ini = c(0.5, 0.5), fix.nugget = TRUE)
s100.vario <- variog(s100, max.dist = 1)
s100.env <- variog.model.env(s100, obj.v = s100.vario,
                             model.pars = s100.ml)
plot(s100.vario, env = s100.env)

Run the code above in your browser using DataLab