Version: | 0.2-1 |
Date: | 2015-07-07 |
Title: | Variogram Diagnostics |
Author: | Ernst Glatzer <ernst.glatzer@wu-wien.ac.at> |
Maintainer: | Edzer Pebesma <edzer.pebesma@uni-muenster.de> |
Depends: | R (≥ 2.0) |
Imports: | graphics, grDevices, stats |
Description: | Interactive variogram diagnostics. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
URL: | https://github.com/edzer/vardiag/ |
NeedsCompilation: | no |
Packaged: | 2015-07-08 11:57:09 UTC; edzer |
Repository: | CRAN |
Date/Publication: | 2015-07-08 14:46:28 |
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
Examples
data(tulln)
CookRLF.varobj(vs50)
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
|
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
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
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 \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
Examples
data(tulln)
QQVarcloud.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:
|
pchi |
the significance level of the confidence bounds, if option
|
zmv |
the value of
|
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
Examples
data(tulln)
PlotDiag.varobj(vs50,region=tu1)
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.
Internal vardiag functions
Description
Internal functions for package vardiag.
Usage
estvar(h0, y, iter = 50, tolerance = 2e-04, trace = 1, th0 = rbind(0, 1, 1))
ficorr(r)
ftc(th, y, h1, w1)
ftg(th, y, h1, cv1)
fth(th, y, h1, w1 = 1)
fts(th, y, h1, cv1)
gamsph(h, th = rbind(1, 1, 1))
gamsph1(h, th = rbind(1, 1, 1))
gamsph2(h, th = rbind(1, 1, 1))
gamsph3(h, th = rbind(1, 1, 1))
hyperg(r)
## S3 method for class 'varobj'
print(x, ...)
Arguments
... |
|
cv1 |
|
h |
|
h0 |
|
h1 |
|
iter |
|
r |
|
th |
|
th0 |
|
tolerance |
|
trace |
|
w1 |
|
x |
|
y |
Details
These functions are not intended to be called by the user.
Author(s)
Ernst Glatzer
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
Examples
data(tulln)