Learn R Programming

geoR (version 1.2-5)

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 list with the model components can be provided by the user.

Usage

## S3 method for class 'variomodel':
lines(x, max.dist, scaled = FALSE,...)

Arguments

x
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.
scaled
logical. If TRUE the total sill in the plot is equals to $1$.
...
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

Adds variogram model(s) to a plot. In conjuction with plot.variogram can be used to compare sample variograms against fitted models returned by variofit and/or likfit.

References

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

See Also

plot.variogram, lines.variogram, variofit, likfit, lines.

Examples

Run this code
if(is.R()) data(s100)
# compute and plot empirical variogram
vario <- variog(s100, max.dist = 1)
plot(vario)
# estimate parameters
vario.wls <- variofit(vario, ini = c(1, .3), fix.nugget = TRUE)
# adds fitted model to the plot  
lines(vario.wls)

Run the code above in your browser using DataLab