predict_model {disaggregation}R Documentation

Function to predict mean from the model result

Description

predict_model function takes a disag_model object created by disaggregation::disag_model and predicts mean maps.

Usage

predict_model(model_output, newdata = NULL, predict_iid = FALSE)

Arguments

model_output

disag_model object returned by disag_model function

newdata

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.

predict_iid

If TRUE, any polygon iid effect from the model will be used in the prediction. Default FALSE.

Details

Function returns rasters of the mean predictions as well as the covariate and field contributions to the linear predictor.

To predict over a different spatial extent to that used in the model, a SpatRaster 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.

Value

The mean prediction, which is a list of:

Examples

## Not run: 
predict_model(result)

## End(Not run)


[Package disaggregation version 0.3.0 Index]