Skip to contents

For a specific animal (taxon) group, predict the number of species (richness) at each point location (rows in newdata) based on the landscape predictors (columns in newdata) summarised at these locations. Comparison with the actual data from animal surveys are used to calculate the accuracy (error rate) of the models provided.

Usage

validate_newdata(models, recipe_data, newdata, response_var = "sprich")

Arguments

models

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

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).

newdata

New data collected at point locations for the specific taxon group. Used to validate the accuracy of the models. Should contain the columns for landscape predictors found in the models.

response_var

Column name of the response variable specified in newdata. Defaults to sprich (species richness).

Value

A dataframe containing the predictions (column mod.avg.pred) and other accuracy metrics when compared to the actual data (column name as defined by the response_var argument).