Fit an INLA model based on a constructed data stack and formula
fit_inla_model(
formula,
data_stack,
spde,
samplesize_vec = 1,
precision_vec = 1,
family = "binomial",
link = "logit",
fixed_effects_pc_prior = list(threshold = 3, prob_above = 0.05),
verbose = TRUE
)
A fitted INLA model object created by INLA::inla()
(character) INLA formula to fit. Generated in
prepare_inla_data_stack()
, then interpreted using stats::as.formula()
within the
call to INLA::inla()
.
Stacked data, covariates, and spatial index. Generated in
prepare_inla_data_stack()
.
SPDE object generated by prepare_inla_data_stack()
.
(integer(N)
, default 1) Sample sizes for each data observation.
Only used for binomial data models.
(numeric(N)
, default 1) Precision for each data observation.
Only used for gaussian data models.
(character, default 'binomial') GLM family to use. For more information,
see stats::family()
.
(character, default 'logit') Link function to use, typically related to the
GLM family
.
A named list specifying the penalized complexity prior for all fixed effects except for the intercept. The two named items are "threshold", the test threshold for the size of each fixed effect, and "prob_above", the prior probability that the beta for each covariate will EXCEED that threshold.
(logical(1)
, default TRUE) Log progress for INLA model fitting?
Using INLA::inla()
with reasonable defaults and settings tuned to predict
across a grid.
MbgModelRunner