checkVario | R Documentation |
The function will create diagnostic plots for analysis of the variograms fitted to sample variograms of data with support
## S3 method for class 'rtop'
checkVario(object, acor = 1, log = "xy", cloud = FALSE,
gDist = TRUE, acomp = NULL, curveSmooth = FALSE, params = list(), ...)
## S3 method for class 'rtopVariogramModel'
checkVario(object,
sampleVariogram = NULL, observations = NULL,
areas = NULL, dists = NULL, acomp = NULL,
params = list(), compVars = list(), acor = 1,
log = "xy", legx = NULL, legy = NULL,
plotNugg = TRUE, curveSmooth = FALSE, ...)
object |
either: object of class |
acor |
unit correction factor in the key, e.g. to see numbers more easily interpretable for large areas. As an example, ucor = 0.000001 when area is given in square meters and should rather be shown as square kilometers. Note that this parameter also changes the value of the nugget to the new unit. |
log |
text variable for log-plots, default to log-log |
cloud |
logical; whether to look at the cloud variogram instead of the binned variogram |
gDist |
logical; whether to use ghosh-distance for semivariogram regularization instead of full integration of the semivariogram |
sampleVariogram |
a sample variogram of the data |
observations |
a set of observations |
areas |
either an array of areas that should be used as examples, or
the number of areas per order of magnitude (similar to the parameter |
dists |
either an array of distances that should be used as examples, or
the number of distances per order of magnitude(similar to the parameter |
acomp |
either a matrix with the area bins that should be visualized, or a number
giving the number of pairs to show. If a sample variogram is given, the |
curveSmooth |
logical or numerical; describing whether the curves in the last plot should be smoothed or not. If numeric,
it gives the degrees of freedom (df) for the splines used for smoothing. See also |
params |
list of parameters to modify the default parameters of rtopObj or
the default parameters found from |
compVars |
a list of variograms of |
legx |
x-coordinate of the legend for fine-tuning of position, see x-argument of |
legy |
y-coordinate of the legend for fine-tuning of position, see y-argument of |
plotNugg |
logical; whether the nugget effect should be added to the plot or not |
... |
arguments to lower level functions |
The function gives diagnostic plots for the fitted variograms, where the regularized variograms are shown together with the sample variograms and possibly also user defined variograms. In addition, if an rtopObject is submitted, the function will also give plots of the relationship between variance and area size and a scatter plot of the fit of the observed and regularized variogram values. The sizes of the dots are relative to the number of pairs in each group.
Jon Olav Skoien
Skoien J. O., R. Merz, and G. Bloschl. Top-kriging - geostatistics on stream networks. Hydrology and Earth System Sciences, 10:277-287, 2006.
Skoien, J. O., Bloschl, G., Laaha, G., Pebesma, E., Parajka, J., Viglione, A., 2014. Rtop: An R package for interpolation of data with a variable spatial support, with an example from river networks. Computers & Geosciences, 67.
library(gstat)
rpath = system.file("extdata",package="rtop")
library(sf)
observations = st_read(rpath, "observations")
predictionLocations = st_read(rpath,"predictionLocations")
# Create a column with the specific runoff:
observations$obs = observations$QSUMMER_OB/observations$AREASQKM
params = list(cloud = TRUE, gDist = TRUE)
rtopObj = createRtopObject(observations, predictionLocations,
params = params)
# Fit a variogram (function also creates it)
rtopObj = rtopFitVariogram(rtopObj, maxn = 2000)
checkVario(rtopObj,
compVars = list(first = vgm(5e-6, "Sph", 30000,5e-8),
second = vgm(2e-6, "Sph", 30000,5e-8)))
rtopObj = checkVario(rtopObj, acor = 0.000001,
acomp = data.frame(acl1 = c(2,2,2,2,3,3,3,4,4),
acl2 = c(2,3,4,5,3,4,5,4,5)))
rtopObj = checkVario(rtopObj, cloud = TRUE, identify = TRUE,
acor = 0.000001)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.