rangebreak.ribbon: rangebreak.ribbon Conduct a ribbon rangebreak test as...

Description Usage Arguments Value Examples

View source: R/rangebreak.ribbon.R

Description

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

Usage

1
2
rangebreak.ribbon(species.1, species.2, ribbon, env, type, f = NULL,
  width = 1, nreps = 99, nback = 1000, bg.source = "default", ...)

Arguments

species.1

An emtools.species object

species.2

An enmtools.species object

ribbon

An enmtools.species object representing the region of marginal habtiat in the overlap between the species' ranges

env

A RasterLayer or RasterStack object containing environmental data

type

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

f

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

width

Width of the ribbon, in the same units as the occurrence points (e.g, decimal degrees)

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.

...

Additional arguments to be passed to model fitting functions.

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
data(iberolacerta.clade)
data(euro.worldclim)
cyreni <- iberolacerta.clade$species$cyreni
aranica <- iberolacerta.clade$species$aranica

# We're just going to fudge together occurrence data from a ribbon here
# from random points between the two species' ranges
p <- data.frame(Longitude = runif(50, -4, -2), Latitude = runif(50, 40, 43))
bg <- background.points.buffer(p, 100000, 100, euro.worldclim[[1]])
ribbon <- enmtools.species(species.name = "ribbon", presence.points = p, background.points = bg)

rangebreak.ribbon(cyreni, aranica, ribbon = ribbon, env = euro.worldclim,
type = "glm", f= pres ~ bio1 + bio12, nreps = 10)

## End(Not run)

danlwarren/ENMTools documentation built on Sept. 9, 2018, 4:23 p.m.