# lines.variomodel: Adds a Line with a Variogram Model to a Variogram Plot In geoR: Analysis of Geostatistical Data

## Description

This function adds a line with a variogram model specifyed by the user to a current variogram plot. The variogram is specifyed either by passing a list with values for the variogram elements or using each argument in the function.

## Usage

 ```1 2 3 4 5``` ```## S3 method for class 'variomodel' lines(x, ...) ## Default S3 method: lines.variomodel(x, cov.model, cov.pars, nugget, kappa, max.dist, scaled = FALSE, ...) ```

## Arguments

 `x` a list with the values for the following components: `cov.model`, `cov.pars`, `nugget`, `kappa` , `max.dist`; or a numeric vector with values for x-axis values for the variogram (distances). This argument is not required if the other arguments in the function are provided, otherwise is compulsory. If a list is provided the arguments which match the list elements are ignored. `cov.model` a string with the type of the variogram function. See documentation of `cov.spatial` for further details. `cov.pars` a vector or matrix with the values for the partial sill (sigmasq) and range (phi) parameters. `nugget` a scalar with the value of the nugget (tausq) parameter. `kappa` a scalar with the value of the smoothness (kappa) parameters. Only required if `cov.model` is one of the following: `"matern"`, `"powered.exponential"`, `"cauchy"` and `"gneiting.matern"` `max.dist` maximum distance (x-axis) to compute and draw the line representing the variogram model. If a list is provided in `x` the default is the distance given by `x\$max.dist`. If a vector is provided in `x` it takes `max(x)`. `scaled` logical. If `TRUE` the total sill in the plot is equals to 1. `...` arguments to be passed to the function `curve`.

## Details

Adds a line with a variogram model to a plot. In conjuction with `plot.variogram` can be used for instance to compare sample variograms against fitted models returned by `variofit` and/or `likfit`.

## Value

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

## Author(s)

Paulo Justiniano Ribeiro Jr. paulojus@leg.ufpr.br,
Peter J. Diggle p.diggle@lancaster.ac.uk.

## References

Further information on the package geoR can be found at:
http://www.leg.ufpr.br/geoR.

`lines.variomodel.krige.bayes`, `lines.variomodel.grf`, `lines.variomodel.variofit`, `lines.variomodel.likGRF`, `plot.variogram`, `lines.variogram`, `variofit`, `likfit`, `curve`.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25``` ```# computing and ploting empirical variogram vario <- variog(s100, max.dist = 1) plot(vario) # estimating parameters by weighted least squares vario.wls <- variofit(vario, ini = c(1, .3), fix.nugget = TRUE) # adding fitted model to the plot lines(vario.wls) # # Ploting different variogram models plot(0:1, 0:1, type="n") lines.variomodel(cov.model = "exp", cov.pars = c(.7, .25), nug = 0.3, max.dist = 1) # an alternative way to do this is: my.model <- list(cov.model = "exp", cov.pars = c(.7, .25), nugget = 0.3, max.dist = 1) lines.variomodel(my.model, lwd = 2) # now adding another model lines.variomodel(cov.m = "mat", cov.p = c(.7, .25), nug = 0.3, max.dist = 1, kappa = 1, lty = 2) # adding the so-called "nested" models # two exponential structures lines.variomodel(seq(0,1,l=101), cov.model="exp", cov.pars=rbind(c(0.6,0.15),c(0.4,0.25)), nug=0, col=2) ## exponential and spherical structures lines.variomodel(seq(0,1,l=101), cov.model=c("exp", "sph"), cov.pars=rbind(c(0.6,0.15), c(0.4,0.75)), nug=0, col=3) ```

### Example output

```--------------------------------------------------------------
Analysis of Geostatistical Data
For an Introduction to geoR go to http://www.leg.ufpr.br/geoR
geoR version 1.7-5.2.1 (built on 2016-05-02) is now loaded
--------------------------------------------------------------

Warning message:
no DISPLAY variable so Tk is not available
variog: computing omnidirectional variogram
variofit: covariance model used is matern
variofit: weights used: npairs
variofit: minimisation function used: optim
```

geoR documentation built on Feb. 11, 2020, 1:11 a.m.