Skip to contents

Generate continuous raster of spatial predictions

Usage

predict_heatmap(models, recipe_data, points_topredict, pixelsize_m)

Arguments

models

Model objects for a specific animal (taxon) group to be used for predictions (output of MuMIn::get.models()).

recipe_data

recipe_data recipe object (recipes::recipe()) containing information on how to transform the new data to the appropriate format, prior to making predictions (e.g. scale and center variables).

points_topredict

sf dataframe with geometry (sfc) column of type POINT, as well as column names that correspond to landscape predictors within models.

pixelsize_m

numeric value for output grid cell size (in metres). Must be the same pixel resolution of the regular grid of spatial points points_topredict.

Value

A terra::rast() raster object with continuous values representing the spatial predictions made across a regular grid (e.g. number of animal species).