enmtools.gam: Takes an emtools.species object with presence and background...

Description Usage Arguments Examples

View source: R/enmtools.gam.R

Description

Takes an emtools.species object with presence and background points, and builds a gam

Usage

1
2
3
enmtools.gam(species, env, f = NULL, test.prop = 0, k = 4, nback = 1000,
  report = NULL, overwrite = FALSE, rts.reps = 0, weights = "equal",
  gam.method = "REML", gam.select = TRUE, bg.source = "default", ...)

Arguments

species

An enmtools.species object

env

A raster or raster stack of environmental data.

f

Standard gam formula

test.prop

Proportion of data to withhold randomly for model evaluation, or "block" for spatially structured evaluation.

k

Dimension of the basis used to represent the smooth term. See documentation for s() for details.

nback

Number of background points to draw from range or env, if background points aren't provided

report

Optional name of an html file for generating reports

overwrite

TRUE/FALSE whether to overwrite a report file if it already exists

rts.reps

The number of replicates to do for a Raes and ter Steege-style test of significance

weights

If this is set to "equal", presences and background data will be assigned weights so that the sum of all presence points weights equals the sum of all background point weights. Otherwise, weights are not provided to the model.

gam.method

Defaults to restricted maximum likelihood to facilitate predictor selection, but if you want to use another method you can pass anything here that gam's "method" argument understands.

gam.select

Controls whether gam algorithm attempts to optimize smoothness and reduce model complexity. See help("gam.selection") for details.

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.

...

Arguments to be passed to gam()

Examples

1
2
3
data(euro.worldclim)
data(iberolacerta.clade)
enmtools.gam(iberolacerta.clade$species$monticola, env = euro.worldclim, f = pres ~ bio1 + bio9)

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