Learn R Programming

sgeostat (version 1.0-27)

fit.variogram: Variogram Model Fit

Description

Fit variogram models (exponential, spherical, gaussian, linear) to empirical variogram estimates.

An object of class variogram.model represents a fitted variogram model generated by fitting a function to a variogram object. A variogram.model object is composed of a list consisting of a vector of parameters, parameters, and a semi-variogram model function, model.

Usage

fit.variogram(model="exponential", v.object, nugget, sill, range, slope, ...) fit.exponential(v.object, c0, ce, ae, type='c', iterations=10, tolerance=1e-06, echo=FALSE, plot.it=FALSE, weighted=TRUE) fit.gaussian(v.object, c0, cg, ag, type='c', iterations=10, tolerance=1e-06, echo=FALSE, plot.it=FALSE, weighted=TRUE) fit.spherical(v.object, c0, cs, as, type='c', iterations=10, tolerance=1e-06, echo=FALSE, plot.it=FALSE, weighted=TRUE, delta=0.1, verbose=TRUE) fit.wave(v.object, c0, cw, aw, type='c', iterations=10, tolerance=1e-06, echo=FALSE, plot.it=FALSE, weighted=TRUE) fit.linear(v.object, type='c', plot.it=FALSE,iterations=1, c0=0, cl=1)

Arguments

model
only available for fit.variogram, switches what kind of model should be fitted ("exponential", "wave", "gaussian", "spherical", "linear").
v.object
a variogram object generated by est.variogram()
nugget, sill, range, slope
only available for fit.variogram, initial estimates for specified variogram model (slope only for fit.linear)
c0
initial estimate for nugget effect, valid for all variogram types, partial sill (cX) and (asymptotical) range (aX) as follows:
ce, ae
initial estimates for the exponential variogram model
cg, ag
initial estimates for the gaussian variogram model
cs, as
initial estimates for the sperical variogram model
cw, aw
initial estimates for the periodical variogram model
cl
initial estimates for the linear variogram model (slope)
type
one of 'c' (classic), 'r' (robust), 'm' (median). Indicates to which type of empirical variogram estimate the model is to be fit.
iterations
the number of iterations of the fitting procedure to execute.
tolerance
the tolerance used to determine if model convergence has been achieved.
delta
initial stepsize (relative) for pseudo Newton approximation, applies only to fit.spherical
echo
if TRUE, be verbose.
verbose
if TRUE, be verbose (show iteration for spherical model fit).
plot.it
if TRUE, the variogram estimate will be plotted each iteration.
weighted
if TRUE, the fit will be done using weighted least squares, where the weightes are given in Cressie (1991, p. 99)
...
only fit.variogram: additional parameters to hand through to specific model fit functions

Value

parameters
vector of fitted model parameters
model
function implementing a valid variogram model

References

http://www.gis.iastate.edu/SGeoStat/homepage.html

See Also

est.variogram

Examples

Run this code

#
# automatic fit:
#
maas.vmod<-fit.gaussian(maas.v,c0=60000,cg=110000,ag=800,plot.it=TRUE,
                        iterations=30)
#
# iterations=0, means no fit, intended for "subjective" fit
#
maas.vmod.fixed<-fit.variogram("gaussian",maas.v,nugget=60000,sill=110000,
                               range=800,plot.it=TRUE,iterations=0)

Run the code above in your browser using DataLab