Package 'vardiag'

Title: Variogram Diagnostics
Description: Interactive variogram diagnostics.
Authors: Ernst Glatzer <[email protected]>
Maintainer: Edzer Pebesma <[email protected]>
License: GPL (>= 2)
Version: 0.2-1
Built: 2024-11-08 02:40:15 UTC
Source: https://github.com/edzer/vardiag

Help Index


Plot of Cook's Distances and Reduction Lack of Fit

Description

Produces a plot of Cook's Distances and Lack of Fit for a variogram object.

Usage

CookRLF.varobj(v)

Arguments

v

An object of class varobj

Details

A plot is created on the current graphics device with Reduction in Lack of Fit on the horizontal axis and Cook's Distances on the vertical axis.

After the plot is created, the cursor changes to a cross and points can be identified by left mouse clicks. When there are no further points to be identified, the identification can be ended by a right mouse click.

Author(s)

Ernst Glatzer

References

E. Glatzer, W.G. Mueller, 2004. Residual diagnostics for variogram fitting. Computers and Geosciences 30, pp 859-866.

See Also

PlotDiag.varobj

Examples

data(tulln)
CookRLF.varobj(vs50)

Interactive Identification of Points in a Variogram Diagnostics Plot

Description

Initiates selection of points in a Variogram Diagnostics Plot.

Usage

interact.varobj(v, region = NULL, g = "s", pchi = 0.05, zmv = 0)

Arguments

v

A variogram object

region

a n by 2 matrix of vertices of a polygon, which represents the region of interest.

g

the type of interaction with the following options:

l

selection of a point in the leave-one-out plot.

m

selection of one or two points in the map view. After selection of one point the selection process can be stopped by a right mouse click.

n

selection of a polygon region in the map view. This can be done by left clicking on the vertices of the polygon and stopping by a right mouse click.

s

selection of a point in the studentized square root cloud.

t

selection of a polygon region in the studentized square root cloud. This can be done by left clicking on the vertices of the polygon and stopping by a right mouse click.

x

selection of all points in the studentized square root cloud outside an approximate confidence bound with significance level given by pchi.

pchi

the significance level of the confidence bounds, if option g="x" is given.

zmv

the value of zmv determines which values will be ploted as third dimension (via circles with radius corresponding to the value) in the map view. The following values are possible:

0

no third dimension,

1

values of the original observations,

2

Cook's distances,

3

reduction in lack of fit.

Details

Before the call of this function a diagnostic plot must be created by a call to the function PlotDiag.varobj.

If one point in the map view is selected, this point is marked blue and the index of this observation is printed near the point. All corresponding points in the square root cloud and the leave-one-out plot are marked blue.

If two points in the map view (or one point in the square root cloud or in the leave-one-out plot) are selected, this pair of points is joined by a magenta line and the corresponding point in the square root cloud is marked magenta. One of the selected points in the map view and all corresponding points in the square root cloud and the leave-one-out plot are marked blue. The other selected point in the map view and all corresponding points in the square root cloud and the leave-one-out plot are marked red.

If a region is selected in the map view, all possible pairs of points within the region are joined by magenta lines and for each pair the corresponding point in the square root cloud is marked magenta.

If a region in the square root cloud is selected, all points within that region are marked magenta and all corresponding pairs of points in the map view are joined by magenta lines.

If option g="x" is selected, all points in the square root cloud outside the chosen confidence bound are marked magenta and all corresponding pairs of points in the map view are joined by magenta lines.

Value

the index of the selected pair of observations.

Author(s)

Ernst Glatzer

References

E. Glatzer, W.G. Mueller, 2004. Residual diagnostics for variogram fitting. Computers and Geosciences 30, pp 859-866.

See Also

PlotDiag.varobj

Examples

data(tulln)
PlotDiag.varobj(vs50,region=tu1)

Diagnostic Plots for Variograms

Description

Produces diagnostic plots for a variogram object.

Usage

PlotDiag.varobj(v, region = NULL, xyi = 0, zmv = 0)

Arguments

v

A variogram object

region

a n by 2 matrix of vertices of a polygon, which represents the region of interest.

xyi

the index of the pair of observations, which shall be marked in the plots.

zmv

the value of zmv= determines which values will be plotted as third dimension (via circles with radius corresponding to the value) in the map view. The following values are possible:

0

no third dimension,

1

values of the original observations,

2

Cook's distances,

3

reduction in lack of fit.

Details

Four plots are created on the current graphics device.

These plots are a map view, a square root cloud with the fitted model, a leave-one-out plot and a plot of decorrelated residuals. If the argument region is given, this region is plotted as a polygon in the map view. If the argument xyi is given, the corresponding pair of observations is marked as a blue and a red point in the map view and connected by a magenta line. Furthermore all the points in the square root cloud, which contain the first (second) observation in the pair are marked blue (red). The one point that contains both observations of the selected pair is marked magenta. The points in the leave-one-out plot are marked analogously.

Value

No value is returned. The function is called for its side effects, i.e. creating plots.

Author(s)

Ernst Glatzer

References

E. Glatzer, W.G. Mueller, 2004. Residual diagnostics for variogram fitting. Computers and Geosciences 30, pp 859-866.

See Also

interact.varobj

Examples

data(tulln)
PlotDiag.varobj(vs50,region=tu1)
PlotDiag.varobj(vs50,region=tu1,xyi=144)

QQ-Plot of Decorrelated Residuals

Description

Produces a qq-plot of decorrelated residuals for a variogram object.

Usage

QQDecorr.varobj(v)

Arguments

v

A variogram object

Details

A plot is created on the current graphics device with quantiles of the normal distribution on the horizontal axis and ordered values of the decorrelated residuals on the vertical axis.

A straight red line marks the expected curve of this plot. Additionally approximate confidence bounds for 10% significance are given.

Author(s)

Ernst Glatzer

References

E. Glatzer, W.G. Mueller, 2004. Residual diagnostics for variogram fitting. Computers and Geosciences 30, pp 859-866.

See Also

PlotDiag.varobj

Examples

data(tulln)
QQDecorr.varobj(vs50)

QQ-Plot of Variogram Cloud Entries

Description

Produces a qq-plot of variogram cloud entries for a variogram object.

Usage

QQVarcloud.varobj(v)

Arguments

v

A variogram object

Details

A plot is created on the current graphics device with quantiles of the chi-square distribution on the horizontal axis and ordered values of (Z(s)Z(s))2γ(ss)\frac{(Z(s)-Z(s'))^2}{\gamma(s-s')} on the vertical axis.

A straight red line marks the expected curve of this plot. Additionally approximate confidence bounds for 10% significance are given.

Author(s)

Ernst Glatzer

References

E. Glatzer, W.G. Mueller, 2004. Residual diagnostics for variogram fitting. Computers and Geosciences 30, pp 859-866.

See Also

PlotDiag.varobj

Examples

data(tulln)
QQVarcloud.varobj(vs50)

Data on Chlorid concentrations in the Suedliche Tullnerfeld

Description

The tulln dataset contains a variogram object and a matrix with the coordinates of the vertices of a polygonal region.

Usage

data(tulln)

Format

This dataset consists of a variogram object and a matrix.

Details

The variogram model used is a spherical model.

Source

Glatzer, E and Mueller, W.G. (2002).

References

E. Glatzer, W.G. Mueller, 2004. Residual diagnostics for variogram fitting. Computers and Geosciences 30, pp 859-866.


Function for variogram fitting

Description

This function fits a variogram model to spatial data and calculates some statistics.

Usage

varobj(m, iter = 50, tolerance = 2e-04, trace = 1, loo = FALSE)

Arguments

m

n by 3 matrix with spatial data

iter

this argument is put forward to the optimization routine

tolerance

this argument is put forward to the optimization routine

trace

if set to values higher than 1 some debug messages are given

loo

if set to TRUE, leave-one-out residuals are clculated

Details

Only spherical variogram models are fitted.

Value

a variogram object

Author(s)

Ernst Glatzer

References

E. Glatzer, W.G. Mueller, 2004. Residual diagnostics for variogram fitting. Computers and Geosciences 30, pp 859-866.

See Also

PlotDiag.varobj

Examples

data(tulln)