Description Usage Arguments Value
Define an optimal set of univariate covariate transformations of
a set of model covariates by fitting a generalised additive model with
univariate smoothers to data, and then using the smoothers to
spline-transform the covariates. This makes use of thetype = 'terms'
argument in predict.gam
. This function also makes use of
1 2 3 4 |
coords |
a two-column matrix of coordinates of records |
response |
an object acting as thge response object in the GAM model (e.g. a vector of counts, or a matrix for binomial data) |
covs |
a |
family |
the distribution family for the gam |
condition |
an optional vector of 1s and 0s of the same length as the
number of records in |
condition_covs |
an optional |
extra_terms |
an optional formula object (of the form |
extra_data |
an optional dataframe giving the covariates referred to in
|
bam |
whether to fit the model using |
s_args |
a named list of additional arguments to pass to the smoother on
each covariate. For example, this may include the smoother type ( |
extract_args |
a named list of additional arguments to pass to
|
predict |
whether to transform the rasters after fitting the model. If
set to |
... |
other arguments to be passed to |
a three-element named list containing:
modelthe
fitted bam
or gam
model object
transif predict
= TRUE
a Raster*
object of the same extent, resolution and number
of layers as covs
, but with the values of each layer having been
optimally spline-transformed. Otherwise NULL
trans_condif
predict = TRUE
and condition
is not NULL
a
Raster*
object of the same extent, resolution and number of layers
as condition_covs
, but with the values of each layer having been
optimally spline-transformed. Otherwise NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.