Usage
gstat(g, id, formula, locations, data, model = NULL, beta, nmax = Inf,
nmin = 0, maxdist = Inf, dummy = FALSE, set, fill.all = FALSE,
fill.cross = TRUE, variance = "identity", weights = NULL, merge,
degree = 0)
print.gstat(x, ...)
Arguments
g
gstat object to append to; if missing, a new gstat object
is created
id
identifier of new variable; if missing, varn
is used with
n
the number for this variable. If a cross variogram is entered,
id
should be a vector with the two id
values , e.g.
c("zn", "
formula
formula that defines the dependent variable as a linear
model of independent variables; suppose the dependent variable has name
z
, for ordinary and simple kriging use the formula z~1
;
for simple kriging also define be
locations
formula with only independent variables that define the
spatial data locations (coordinates), e.g. ~x+y
; if data
is of class spatial.data.frame
, this argument may be ignored, as
it can be derived from the data
data
data frame; contains the dependent variable, independent
variables, and locations.
model
variogram model for this id
; defined by a call to
vgm; see argument id
to see how cross variograms are entered beta
only for simple kriging (and simulation based on simple
kriging); vector with the trend coefficients (including intercept);
if no independent variables are defined the model only contains an
intercept and this should be the simple kriging mean
nmax
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
nmin
for local kriging: if the number of nearest observations
within distance maxdist
is less than nmin
, a missing
value will be generated; see maxdist
maxdist
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
dummy
logical; if TRUE, consider this data as a dummy variable
(only necessary for unconditional simulation)
set
named list with optional parameters to be passed to
gstat (only set
commands of gstat are allowed, and not all of
them may be relevant; see the manual for gstat stand-alone, URL below )
fill.all
logical; if TRUE, fill all of the direct variogram and,
depending on the value of fill.cross
also all cross
variogram model slots in g
with the given variogram model
fill.cross
logical; if TRUE, fill all of the cross variograms, if
FALSE fill only all direct variogram model slots in g
with the
given variogram model (only if fill.all
is used)
variance
character; variance function to transform to non-stationary
covariances; "identity" does not transform, other options are "mu" (Poisson)
and "mu(1-mu)" (binomial)
weights
numeric vector; if present, covariates are present,
and variograms are missing weights are passed to OLS prediction routines;
if variograms are given, weights should be 1/variance, where variance
specifies location-specific measurement error as in
merge
either character vector of length 2, indicating two ids
that share a common mean; the more general gstat merging of any two
coefficients across variables is obtained when a list is passed, with
each element a character vector of length 4, in the fo
degree
order of trend surface in the location, between 0 and 3
...
arguments that are passed to the printing of variogram
models only