R: Adds a Bayesian Estimate of the Variogram to a Plot

lines.variomodel.krige.bayes {geoR} | R Documentation

## Adds a Bayesian Estimate of the Variogram to a Plot

### Description

Adds a Bayesian estimate of the variogram model to a plot typically with an empirical variogram. The estimate is a chosen summary (mean, mode or mean) of the posterior distribution returned by the function `krige.bayes`.

### Usage

    ## S3 method for class 'krige.bayes'
    lines.variomodel(x, summary.posterior, max.dist, uvec,
                     posterior = c("variogram", "parameters"),  ...)

### Arguments

`x` | an object of the class `krige.bayes`, typically an output of the function `krige.bayes`.
`summary.posterior` | specify which summary of the posterior distribution should be used as the parameter estimate. Options are `"mean"`, `"median"` or `"mode"`. See `DETAILS` below.
`max.dist` | numerical, the maximum distance for the x-axis.
`uvec` | a numerical vector with support points to compute the variogram values. Only used if `posterior = "variogram"`. Defaults to `seq(0, max.dist, length = 51)`.
`posterior` | indicates whether the the variogram line is based on the posterior of the variogram function (default) or the posterior of the model parameters.
`...` | arguments passed to the functions `lines` or `curve`.

### Details

The function `krige.bayes` returns samples from the posterior distribution of the parameters (sigma^2, phi, tausq.rel).

This function allows for two basic options to draw a line with a summary of the variogram function.

1. [1.]"variogram": for each sample of the parameters the variogram function is computed at the support points defined in the argument `uvec`. Then a function provided by the user in the argument `summary.posterior` is used to compute a summary of the values obtained at each support point.

2. [2.]"parameters": in this case summaries of the posterior distribution of the model parameters as "plugged-in" in the variogram function. One of the options `"mode"` (default) ,`"median"` or `"mean"` can be provided in the argument `summary.posterior`. The option `mode`, uses the mode of (phi, tau^2.rel) and the mode of of sigma^2 conditional on the modes of the former parameters. For the options `mean` and `median` these summaries are computed from the samples of the posterior.

### Value

A line with the estimated variogram plot is added to the plot in the current graphics device. No values are returned.

### Author(s)

Paulo J. 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.

### See Also

`lines.variomodel`, `krige.bayes` and `lines`.

### Examples

    #See examples in the documentation of the function krige.bayes().

[Package geoR version 1.7-5.2 Index]