This function computes predictions over a spatial grid using a fitted model
obtained from the glgpm function. It provides point predictions and uncertainty
estimates for the specified locations for each component of the model separately: the spatial random effects;
the unstructured random effects (if included); and the covariates effects.
pred_over_grid(
object,
grid_pred = NULL,
predictors = NULL,
re_predictors = NULL,
pred_cov_offset = NULL,
control_sim = set_control_sim(),
type = "marginal",
messages = TRUE
)An object of class 'RiskMap.pred.re' containing predicted values, uncertainty estimates, and additional information.
A RiskMap object obtained from the `glgpm` function.
An object of class 'sfc', representing the spatial grid over which predictions are to be made. Must be in the same coordinate reference system (CRS) as the object passed to 'object'.
Optional. A data frame containing predictor variables used for prediction.
Optional. A data frame containing predictors for unstructured random effects, if applicable.
Optional. A numeric vector specifying covariate offsets at prediction locations.
Control parameters for MCMC sampling. Must be an object of class "mcmc.RiskMap" as returned by set_control_sim.
Type of prediction. "marginal" for marginal predictions, "joint" for joint predictions.
Logical. If TRUE, display progress messages. Default is TRUE.
Emanuele Giorgi e.giorgi@lancaster.ac.uk
Claudio Fronterre c.fronterr@lancaster.ac.uk