Learn R Programming

geoR (version 1.0-0)

lines.variomodel: Line with a Variogram Model

Description

This function adds a theoretical and/or fitted variogram to the current plot. The variogram model to be added is typically an output of a variogram estimation function. Alternatively a model cab be specified by the user.

Usage

lines.variomodel(obj, max.dist = obj$max.dist, length = 100, ...)

Arguments

obj
an object of the class variomodel which is a list containing information about the model parameters.
max.dist
maximum distance (x-axis) to compute and draw the line representing the variogram model. The default is the distance given by obj$max.dist.
length
number of points between 0 and max.dist to compute the values of the variogram model.
...
arguments to be passed to the function lines.

Value

  • A line with a variogram model is added to a plot on the current graphics device. No values are returned.

Details

Allows theoretical and/or fitted variogram(s) be added to a plot. Together with plot.variogram can be used to compare sample variograms against fitted models returned by olsfit, wlsfit and/or likfit.

References

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

See Also

plot.variogram, lines.variogram, olsfit, wlsfit, likfit, lines.

Examples

Run this code
sim <- grf(100, cov.pars=c(1, .3))
# generates simulated data
vario <- variog(sim)
# computes empirical variogram
plot(vario)
# plots the empirical variogram
vario.wls <- wlsfit(vario, ini=c(1, .3), fix.nugget = T)
# estimate parameters
lines(vario.wls)
# adds fitted model to the plot

Run the code above in your browser using DataLab