The implicity model assumes that there is an underlying process
with mean \(\mu(x)\), where \(x = (x_1, x_2)\) denotes the coordinates
of a spatial location.
The argument trend
defines the form of the mean and the
following options are allowed:
"cte"
the mean is assumed to be constant over the region,
in which case \(\mu(x)= \mu\). This is the default
option.
"1st"
the mean is assumed to be a first order polynomial
on the coordinates:
$$\mu(x)= \beta_0 + \beta_1 x_1 + \beta_2 x_2$$
"2nd"
the mean is assumed to be a second order polynomial
on the coordinates:
$$\mu(x)= \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 (x_1)^2 +
\beta_4 (x_2)^2 + \beta_5 x_1 * x_2$$
~ model
a model specification. See
formula
for further details on how to specify
a model in R using formulas. Notice that the model term before
the ~
is not necessary.
Typically used to include covariates
(external trend) in the model.
Denote by \(x_1\) and \(x_2\) the spatial coordinates.
The following specifications are equivalent:
Search path for covariates
Typically, functions in the package geoR which calls
trend.spatial
will have the arguments geodata
,
coords
and data
.
When the trend is specifed as trend = ~ model
the terms included in the model will be searched for in the following
path sequence (modified in version 1.7-6, no longer attach objects):
in the object geodata
(coerced to data-frame)
in the users/session Global environment
in the session search path
The argument add.to.trend
adds terms to what is specified in
the argument trend
. This seems redundant but allow
specifications of the type: trend="2nd", add.trend=~other.covariates
.