This function sets a range of the parameters for the intamap package,
to be included in the object described in rtop-package
getRtopParams(params,newPar, observations, formulaString, ...)
A list of the parameters with class rtopParams
to be included in the
object
described in rtop-package
An existing set of parameters for the interpolation process,
of class
intamapParams
or a list of parameters for modification
of the default parameters
A list
of parameters for updating params
or for
modification of the default parameters.
Possible parameters with their defaults are given below
SpatialPolygonsDataFrame
with observations,
used for setting some of the default parameters
formula that defines the dependent variable as a linear model
of independent variables, see e.g. createRtopObject
for more details.
Individual parameters for updating params
or for
modification of the default parameters.
Possible parameters with their defaults are given below
- variogram model type. Currently the following models are implemented:
- Exponential model
- Multiplication of a modified exponential and fractal model, the same model as used in Skoien et al(2006).
- Gaussian model
- Multiplication of gaussian and fractal model
- Spherical model
- Multiplication of spherical and fractal model
- Fractal model
- the initial parameters and the limits of the variogram model to be fitted, given as a matrix with three columns, where the first column is the lower limit, the second column is the upper limit and the third column are starting values.
- logical; if TRUE, nugget effect should be estimated
- logical; if TRUE the variance of observations are in column unc
- minimum number of discretization points in each area
- number of discretization points in one direction for elements in binned variograms
- logical; if TRUE use the cloud variogram for variogram fitting
- defines the number of areal bins within one order of magnitude. Numbers between 1 and 3
are possible, as this parameter refers to the axp
parameter of
axTicks
.
- defines the number of distance bins within one order of magnitude. Numbers between 1 and 3
are possible, as this parameter refers to the axp
parameter of
axTicks
.
- defines the type of Least Square method for fitting of variogram.
The methods 1-7 correspond to the similar methods in fit.variogram
of gstat
.
- weighted least squares with number of pairs per bin:
err = n * (yobs-ymod)^2
- weighted least squares difference according to Cressie (1985):
err2 = abs(yobs/ymod-1)
- ordinary least squares difference: err = (yobs-ymod)^2
- similar to default of gstat, where higher weights are given to shorter distances err = n/h^2 * (yobs-mod)^2
- Opposite of weighted least squares difference according to Cressie (1985): err3=abs(ymod/yobs-1)
- neutral WLS-method - err = min(err2,err3)
- use geostatistical distance when fitting variograms
- use geostatistical distance for semivariogram matrices
- parameter to set jointly gDistEst = gDistPred = gDist
for local kriging: the number of nearest observations that should be used for a kriging prediction or simulation, where nearest is defined in terms of the space of the spatial locations. By default, 10 observations are used.
- for local kriging: only observations within a distance
of maxdist
from the prediction location are used for prediction
or simulation; if combined with nmax, both criteria apply
- sampling type for binned variograms
- sampling type for the elements, see also rtopDisc
- number of CPUs to use if parallel processing is wanted; nclus = 1 means no parallelization
- limit whether parallel processing should be applied; the minimum number
of areas in varMat
, and also controlling when to use parallel
processing in
rtopDisc
, when
nAreas*params$rresol/100 > cnAreas
- the cluster type to be started for parallel processing; uses the default type of the system when clusType = NULL
file where output can be printed during parallel execution
logical; if TRUE it will remove highly correlated areas from the covariance matrix during simulation
- an upper limit for the norm of the weights in kriging, see rtopKrige
which method to use for reducing the norm of the weights if necessary. Either "all", which modifies all weights equally or "neg" which reduces negative weights and large weights more than the smallest weights
- logical; When TRUE, the kriging function will attempt to solve singular kriging matrices by removing catchments that have the same correlations. This will usually happen when two catchments are almost overlapping, and they are discretized with the same points. See also rtopKrige
.
- logical; for cross-validation of observations
- used in some functions for giving additional output. See individual functions for more information.
whether to work with partially overlapping areas
smallest overlapping area to be used for partial overlap, relative to the smallest of the areas
option to use parallel processing, nclus > 1 defines the number of workers to be started
which cluster type to start if nclus > 1; the default is used if nclusType = NA
The minimum number of observations or observations plus predictions allowing parallelization in the creation of the covariance matrix
The minimum number of discretization points for allowing parallelization in the discretization process
- used for initial values of parameters if supplied
- used for initial values of parameters if supplied
Jon Olav Skoien
Cressie, N. 1985. Fitting variogram models by weighted least squares. Mathematical Geology, 17 (5), 563-586
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.
createRtopObject
and rtop-package
# Create a new set of intamapParameters, with default parameters:
params = getRtopParams()
# Make modifications to the default list of parameters
params = getRtopParams(newPar = list(gDist = TRUE, nugget = FALSE))
# Make modifications to an existing list of parameters
params = getRtopParams(params = params, newPar = list(gDist = TRUE,
nugget = FALSE))
Run the code above in your browser using DataLab