variogramModel {rtop} | R Documentation |
create or update variogram model
Description
This gives an easier interface to the parameters of the variogram model
Usage
rtopVariogramModel(model = "Ex1", sill = NULL, range = NULL,
exp = NULL, nugget = NULL, exp0 = NULL,
observations = NULL, formulaString = obs~1)
## S3 method for class 'rtop'
updateRtopVariogram(object, ...)
## S3 method for class 'rtopVariogramModel'
updateRtopVariogram(object, action = "mult", ...,
checkVario = FALSE,
sampleVariogram = NULL, observations = NULL)
Arguments
model |
variogram model, currently "Ex1" is the only implemented, see Skoien et al (2006) |
sill |
sill of variogram |
range |
range of variogram |
exp |
the exponent of the fractal part of the variogram, see Skoien et al (2006) |
exp0 |
gives the angle of the first part of the variogram in a log-log plot (weibull type), should be between 0 and 2. See Skoien et al (2006) |
nugget |
nugget of point variogram |
formulaString |
formula that defines the dependent variable as a linear model
of independent variables, see e.g. |
object |
either: object of class |
action |
character variable defining whether the new parameters should
be |
checkVario |
logical, will issue a call to |
sampleVariogram |
a sample variogram of the data |
observations |
a set of observations |
... |
parameters to lower level functions |
Value
The function helps creating and updating the parameters of the variogram, by using common names and simple update methods. This is mainly for manual fitting of the variogram. The automatic call to checkVario makes it easier to visualize the effect of the changes to the variogram
Author(s)
Jon Olav Skoien
See Also
Examples
## Not run:
library(sf)
rpath = system.file("extdata",package="rtop")
observations = st_read(rpath,"observations")
# Create a column with the specific runoff:
observations$obs = observations$QSUMMER_OB/observations$AREASQKM
predictionLocations = st_read(rpath,"predictionLocations")
rtopObj = createRtopObject(observations,predictionLocations)
# Fit a variogram (function also creates it)
rtopObj = rtopFitVariogram(rtopObj)
rtopObj = updateRtopVariogram(rtopObj, exp = 1.5, action = "mult",
checkVario = TRUE)
## End(Not run)