range_bag: Fit and project range bag model

View source: R/range_bag.R

range_bagR Documentation

Fit and project range bag model

Description

Fit and project range bag model.

Usage

range_bag(
  occurrence_data,
  bioclim_dir,
  n_dims = 2,
  n_models = 100,
  p = 0.5,
  exclude_vars = NULL,
  outfile
)

Arguments

occurrence_data

sf object, data.frame or character path to a csv file containing occurrence coordinates (must contain columns named "Latitude" and "Longitude").

bioclim_dir

Path. Path to directory containing WorldClim raster data.

n_dims

Integer. The number of dimensions ranges to bag.

n_models

Integer. The number of bootstrapped model ensembles to run.

p

Numeric between 0 and 1. The proportion of occurrence records to include in bootstrapping .

exclude_vars

Character vector. A vector of bioclim variables to exclude from analysis. Default is NULL.

outfile

Character. Output raster file path. Parent directory will be created recursively if required. If NULL, the RasterLayer will be returned in R.

Value

A RasterLayer of model predictions is written to outfile if provided, and returned to R otherwise. The raster's extent, resolution and CRS are taken from the raster data in bioclim_dir. Cell values give the fraction of bootstrapped models for which the cell's environment fell within the species' modelled climate envelope.

References

This function is a modified version of the rb function provided in Drake, J.M. & Richards, R.L. (2019) Data from: Estimating environmental suitability. Dryad, Dataset, doi:10.5061/dryad.g5p7d1c.

See also: Drake, J.M. (2015) Range bagging: a new method for ecological niche modelling from presence-only data. Journal of the Royal Society Interface, 12(107), 20150086. doi:https://doi.org/10.1098/rsif.2015.0086.


jscamac/edmaps documentation built on June 11, 2022, 1:26 a.m.