wlsfit(vario, ini.cov.pars,
cov.model = c("exponential", "matern", "gaussian",
"spherical", "circular", "cubic", "wave",
"powered.exponential", "cauchy", "gneiting",
"gneiting.matern", "pure.nugget"),
fix.nugget = FALSE, nugget = 0, kappa = NULL,
simul.number = NULL, max.dist = "all",
minimisation.function = c("optim", "nlm"), lower = 0,
weight = c("npairs", "cressie"), messages.screen = TRUE)"variogram", typically an output of the function
variog. The object is a list with information about the
empirical variogram.DETAILS below.cov.spatial. Defaults to
"exponential".fix.nugget = TRUE) or should
be estimated (fix.nugget = FALSE). Defaults to
FALSE.fix.nugget = TRUE or as a initial value for the
minimization algorithm if fix.nugget = FALSE.
Defaults to zero."matern", "powered.exponential", "gneiting"
and "gneiting.matern".vario has empirical variograms for more than one
data-set (or simulation). Indicates to which one the model will be
fitted.vario$max.dist."optim" and "nlm".
Defaults to "optim".DETAILS below.control() which controls the
behavior of the minimization algorithm. See documentation for the
selected minimization function for furthclass "variomodel" which is list with the following components:fix.nugget = FALSE or a fixed value if fix.nugget = TRUE."WLS" indicating the
estimation method.ini.cov.pars. The elements are initial values for
$\sigma^2$ and $\phi$, respectively.
This vector is concatenated with the value of the
argument nugget if fix.nugget = FALSE.
Specification of multiple initial values is also possible.
If this is the case, the function
searches for the one which minimizes the loss function and uses this as
the initial value for the minimization algorithm.
Multiple initial values are specified by providing a matrix in the
argument
ini.cov.pars and/or, if fix.nugget = FALSE,
providing a vector with length greater than one for the argument
nugget.
If ini.cov.pars is a matrix, the first column has values of
$\sigma^2$ and the second has values of $\phi$.
Weights
Two different types of weights can be used within the loss function:
[object Object],[object Object],See also Barry, Crowder and Diggle (1997) for a discussion on the
methods to estimate variogram parameters.Cressie, N.A.C (1993) Statistics for Spatial Data. New York: Wiley.
Further information about geoR can be found at:
cov.spatial for a detailed description of the
available correlation (variogram) functions, olsfit for
ordinary least squares variogram fit, likfit for maximum
and restricted maximum likelihood estimation,
lines.variomodel for graphical output of the fitted
model. For details on the minimization functions see
documentation for optim and
nlm.if(is.R()) data(s100)
vario100 <- variog(s100, max.dist=1)
ini.vals <- expand.grid(seq(0,1,l=5), seq(0,1,l=5))
wls <- wlsfit(vario100, ini=ini.vals, fix.nug=TRUE)
summary(wls)
plot(vario100)
lines(wls)Run the code above in your browser using DataLab