predictMaxNet: Predictions from a MaxNet model

View source: R/predictMaxNet.r

predictMaxNetR Documentation

Predictions from a MaxNet model

Description

This function is the same as the predict function in the maxnet package, except that:

  • If the input is a data frame, the output is a vector as output (not a single-column matrix);

  • If the input is a SpatRaster or Raster*, the output is of the same type;

  • The default output is on the cloglog scale

  • The function can be explicitly called (versus doing, say, maxnet:::predict.maxnet, which does not work even when that would be really useful...).

Usage

predictMaxNet(model, newdata, clamp = TRUE, type = "cloglog", ...)

Arguments

model

Object of class maxnet.

newdata

Object of class data.frame, SpatRaster (terra package), or any of Raster, RasterBrick, or RasterStack (raster package).

clamp

If TRUE (default), predict outside the range of training data by 'clamping' values to the last value.

type

One of:

  • cloglog (default): Predictions are on a complementary log-log scale.

  • logistic: Predictions are on a logistic scale (and thus technically the same to several decimal places as predictions from MaxEnt <=3.3.3k, except for differences in default features).

  • link: Predictions are on the scale of the predictors.

  • exponential: Predictions are on an exponential ('raw') scale.

...

Other arguments (unused).

Value

Numeric vector.

See Also

predict from the raster package, predict from the terra package, and maxnet (see the predict function therein)


adamlilith/enmSdm documentation built on Jan. 6, 2023, 11 a.m.