predict_uncertainty function takes a disag_model object created by disaggregation::disag_model and predicts upper and lower credible interval maps.
predict_uncertainty(
model_output,
newdata = NULL,
predict_iid = FALSE,
N = 100,
CI = 0.95
)
The uncertainty prediction, which is a list of:
realisations RasterStack of realisations of predictions. Number of realisations defined by argument N.
predictions_ci RasterStack of the upper and lower credible intervals. Defined by argument CI.
disag_model object returned by disag_model function.
If NULL, predictions are made using the data in model_output. If this is a raster stack or brick, predictions will be made over this data. Default NULL.
If TRUE, any polygon iid effect from the model will be used in the prediction. Default FALSE.
number of realisations. Default: 100.
confidence interval. Default: 0.95.
Function returns a RasterStack of the realisations as well as the upper and lower credible interval rasters.
To predict over a different spatial extent to that used in the model, a RasterStack covering the region to make predictions over is passed to the argument newdata. If this is not given predictions are made over the data used in the fit.
The predict_iid logical flag should be set to TRUE if the results of the iid effect from the model are to be used in the prediction.
The number of the realisations and the size of the confidence interval to be calculated. are given by the arguments N and CI respectively.
if (FALSE) {
predict_uncertainty(result)
}
Run the code above in your browser using DataLab