Usage
gstat(g, id, formula, locations, data, model = NULL, beta,
nmax = Inf, nmin = 0, omax = 0, maxdist = Inf, force = FALSE,
dummy = FALSE, set, fill.all = FALSE,
fill.cross = TRUE, variance = "identity", weights = NULL, merge,
degree = 0, vdist = FALSE, lambda = 1.0)
"print"(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", "cd")
, further only supplying arguments g
and model
. It is advisable not to use expressions, such
as log(zinc)
, as identifiers, as this may lead to complications
later on.
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 beta
(see below); for universal
kriging, suppose z
is linearly dependent on x
and y
,
use the formula z~x+y
locations
formula with only independent variables that define the
spatial data locations (coordinates), e.g. ~x+y
; if data
has a coordinates
method to extract its coordinates this argument
can be ignored (see package sp for classes for point or grid 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
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 expected value; for cross
variogram computations: mean parameters to be used instead of the
OLS estimates
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, unless force==TRUE
; see maxdist
omax
maximum number of observations to select per octant (3D) or
quadrant (2D); only relevant if maxdist
has been defined as well
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
force
for local kriging, force neighbourhood selection: in case
nmin
is given, search beyond maxdist
until nmin
neighbours are found. A missing value is returned if this is not possible.
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
resulting in WLS; if variograms are given, weights should be 1/variance,
where variance specifies location-specific measurement error; see references
section below
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 form
c("id1", 1,"id2", 2)
. This merges the first parameter
for variable id1
to the second of variable id2
.
degree
order of trend surface in the location, between 0 and 3
vdist
logical; if TRUE, instead of Euclidian distance
variogram distance is used for selecting the nmax nearest neighbours,
after observations within distance maxdist (Euclidian/geographic) have been
pre-selected
lambda
test feature; doesn't do anything (yet)
...
arguments that are passed to the printing of variogram
models only