rangebreak.linear: rangebreak.linear Conduct a linear rangebreak test as...

View source: R/rangebreak.linear.R

rangebreak.linearR Documentation

rangebreak.linear Conduct a linear rangebreak test as described in Glor and Warren 2011.

Description

rangebreak.linear Conduct a linear rangebreak test as described in Glor and Warren 2011.

Usage

rangebreak.linear(
  species.1,
  species.2,
  env,
  type,
  f = NULL,
  nreps = 99,
  nback = 1000,
  bg.source = "default",
  low.memory = FALSE,
  rep.dir = NA,
  verbose = FALSE,
  clamp = TRUE,
  ...
)

Arguments

species.1

An emtools.species object

species.2

An enmtools.species object

env

A SpatRaster object containing environmental data

type

The type of model to construct, currently accepts "glm", "mx", "bc", "gam", or "dm"

f

A function to use for model fitting. Only required for GLM models at the moment.

nreps

Number of replicates to perform

nback

Number of background points for models

bg.source

Source for drawing background points. If "points", it just uses the background points that are already in the species object. If "range", it uses the range raster. If "env", it draws points at randome from the entire study area outlined by the first environmental layer.

low.memory

When set to TRUE, replicate models are written to disc instead of being stored in the output object. Replicate models stored in the output object contain paths to the replicate models on disk instead of the rasters themselves.

rep.dir

Directory for storing replicate models when low.memory is set to TRUE. If not specified, the working directory will be used.

verbose

Controls printing of various messages progress reports. Defaults to FALSE.

clamp

Controls whether empirical and replicate models should be clamped to the environment space used for training.

...

Additional arguments to be passed to model fitting functions.

Value

results A list containing the replicates, models for the empirical data, and summary statistics and plots.

Examples


cyreni <- iberolacerta.clade$species$cyreni
aranica <- iberolacerta.clade$species$aranica
rangebreak.linear(cyreni, aranica, env = euro.worldclim, type = "glm",
f= pres ~ bio1 + bio12, nreps = 10)


ENMTools documentation built on April 11, 2023, 6:09 p.m.