The function creates the auxiliary data structure
mesa.data.model
which is used in model fitting and
prediction, see fit.mesa.model
,
cond.expectation
, and run.MCMC
. The resulting structure holds information regarding which geographic
and spatio-temporal covariates to use for model fitting, as well as a
number of precomputed fields that speed up log-likelihood evaluations.
For any observations that occur at times (dates) not in
mesa.data$trend$date
the smooth temporal trends are
interpolated to these times using spline
.
When selecting geographic covariates the code allows for different
covariates for different temporal trends. LUR = NA
gives all
covariates are used for all the temporal trends. If a vector of
integers or characters (names) is used to specify covariates then
these covariates will be used for all the temporal trends
(e.g. LUR = c(1,2,3)
). If LUR
instead is given as a list
of vectors this allows for different covariates for each temporal
trend. In this case the list needs to contain one vector for each of
the temporal trends, starting with coefficients for the intercept,
e.g.
LUR = list(c(1,2,3),c(1,2),c(2))
.
LUR = NULL
gives only an intercept, no covariates.
The option in strip
, strip.loc
, and strip.time
to
drop locations and times without observations can be used to reduce
the dataset, thereby (drastically) speeding up the optimisation.
To obtain predictions and simulations at the unobserved locations the
original mesa.data
structure can be passed to
cond.expectation
and simulateMesaData
.