- formula
a symbolic description of the regression model to be fit.
Variables in parenthesis are assigned spatially-temporally varying
coefficients. See examples.
- data
an optional data frame containing the variables in the model.
If not found in data
, the variables are taken from
environment(formula)
, typically the environment from which
stvcGLMstack
is called.
- family
Specifies the distribution of the response as a member of the
exponential family. Supported options are 'poisson'
, 'binomial'
and
'binary'
.
- sp_coords
an \(n \times 2\) matrix of the observation
spatial coordinates in \(\mathbb{R}^2\) (e.g., easting and northing).
- time_coords
an \(n \times 1\) matrix of the observation
temporal coordinates in \(\mathcal{T} \subseteq [0, \infty)\).
- cor.fn
a quoted keyword that specifies the correlation function used
to model the spatial-temporal dependence structure among the observations.
Supported covariance model key words are: 'gneiting-decay'
(Gneiting
and Guttorp 2010). See below for details.
- process.type
a quoted keyword specifying the model for the
spatial-temporal process. Supported keywords are 'independent'
which
indicates independent processes for each varying coefficients characterized
by different process parameters, independent.shared
implies independent
processes for the varying coefficients that shares common process parameters,
and multivariate
implies correlated processes for the varying coefficients
modeled by a multivariate Gaussian process with an inverse-Wishart prior on
the correlation matrix. The input for sptParams
and priors
must be given
accordingly.
- priors
(optional) a list with each tag corresponding to a
hyperparameter name and containing hyperprior details. Valid tags include
V.beta
, nu.beta
, nu.z
, sigmaSq.xi
and IW.scale
. Values of nu.beta
and nu.z
must be at least 2.1. If not supplied, uses defaults.
- candidate.models
an object of class candidateModels
containing a
list of candidate models for stacking. See candidateModels()
for details.
- n.samples
number of samples to be drawn from the posterior
distribution.
- loopd.controls
a list with details on how leave-one-out predictive
densities (LOO-PD) are to be calculated. Valid tags include method
, CV.K
and nMC
. The tag method
can be either 'exact'
or 'CV'
. If sample size
is more than 100, then the default is 'CV'
with CV.K
equal to its default
value 10 (Gelman et al. 2024). The tag nMC
decides how many Monte Carlo
samples will be used to evaluate the leave-one-out predictive densities,
which must be at least 500 (default).
- parallel
logical. If parallel=FALSE
, the parallelization plan,
if set up by the user, is ignored. If parallel=TRUE
, the function
inherits the parallelization plan that is set by the user via the function
future::plan()
only. Depending on the parallel backend available, users
may choose their own plan. More details are available at
https://cran.R-project.org/package=future.
- solver
(optional) Specifies the name of the solver that will be used
to obtain optimal stacking weights for each candidate model. Default is
'ECOS'
. Users can use other solvers supported by the
CVXR-package package.
- verbose
logical. If TRUE
, prints model-specific optimal
stacking weights.
- ...
currently no additional argument.