brt_sdm: SDM fit with BRT

Description Usage Arguments Value Examples

View source: R/brt_sdm.R

Description

Build a boosted regression tree species distribution model from the output from a operating model using the dismo package. Models fit to both the presence (pres column) and log(abundance) are returned.

Usage

1
2
3
4
5
6
7
brt_sdm(
  x,
  covariates = NULL,
  start.forecast.year = 2021,
  control = list(tree.complexity = 3, learning.rate = 0.01, bag.fraction = 0.6),
  silent = TRUE
)

Arguments

x

(required) An operating model as output from one of the operating model functions (such as sim <- SimulateWorld() OR list with meta$abund_enviro and grid from the operating model (sim$grid).

covariates

Covariates to use in the SDM. Must be in the operating model output (in the columns of x$grid). If left off, all covariates in x (in x$meta$covariates) are used.

start.forecast.year

The years less will be used for fitting and the years greater than are the forecasted years.

control

Parameters for the 'dismo::gbm.step' call.

silent

Whether to output info from 'dismo::gbm.step' during fitting.

Value

A SDM object, which is a list with the presence and abundance fits and the meta data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sim <- SimulateWorld(start.year=2015, n.year=20)
# abundance fit
fit <- brt_sdm(sim, "temp")$abundance
dev_eval(fit)
plot(fit)

# modify the grid and fit
bad.sim <- sim
bad.sim$grid$abundance <- bad.sim$grid$abundance + rnorm(nrow(bad.sim$grid),0,0.05)
fit <- brt_sdm(bad.sim, "temp")$abundance

stephbrodie1/WRAP documentation built on Feb. 13, 2021, 12:55 a.m.