Skip to contents

Not always is there enough data or sufficient information to robustly infer the suitable habitat or niche of a species. As many SDM algorithms are essentially regression models, similar assumptions about model convergence, homogeneity of residuals and inferrence usually apply (although often ignored). This function simply checks the respective input object for common issues or mistakes.

Usage

check(obj, stoponwarning = FALSE)

# S4 method for ANY
check(obj, stoponwarning = FALSE)

Arguments

obj

A BiodiversityDistribution, DistributionModel or BiodiversityScenario object.

stoponwarning

logical Should check return a stop if warning is raised? (Default: FALSE).

Value

Message outputs

Details

Different checks are implemented depending on the supplied object

  • Checks if there are less than 200 observations

  • TODO: Add rm_insufficient_covs link

  • Check model convergence

  • Check if model is found

  • Check if coefficients exist

  • Check if there are unusal outliers in prediction (using 10median absolute deviation)

  • Check if threshold is larger than layer

Note

This function will likely be expanded with additional checks in the future. If you have ideas, please let them know per issue.

Examples

if (FALSE) {
 # Where mod is an estimated DistributionModel
 check(mod)
}