predict: Spatial model predictions

predictR Documentation

Spatial model predictions

Description

Make predictions with models defined in the predicts package

Usage

## S4 method for signature 'MaxEnt_model'
predict(object, x, ext=NULL, args="", filename="", ...)

## S4 method for signature 'envelope_model'
predict(object, x, tails=NULL, ext=NULL, filename="", ...)

## S4 method for signature 'hull_model'
predict(object, x, ext=NULL, mask=FALSE, filename="", ...)

Arguments

object

model defined in this package (e.g. "envelope_model" and "maxent_model")

x

data to predict to. Either a data.frame or a SpatRaster

tails

character. You can use this to ignore the left or right tail of the percentile distribution for a variable. If supplied, tails should be a character vector with a length equal to the number of variables used in the model. Valid values are "both" (the default), "low" and "high". For example, if you have a variable x with an observed distribution between 10 and 20 and you are predicting the bioclim value for a value of 25, the default result would be zero (outside of all observed values); but if you use tail='low', the high (right) tail is ignored and the value returned will be 1.

args

Pass *prediction* arguments (options) to the maxent software. See maxent

ext

NULL or a SpatExtent to limit the prediction to a sub-region of x

mask

logical. If TRUE areas that are NA in x are set to NA in the output

filename

character. Output filename

...

additional arguments for writing files as in writeRaster

Value

SpatRaster or vector (if x is a data.frame).

See Also

predict function in the "terra" package for spatial predictions with glm, randomForest, etc.


predicts documentation built on Oct. 7, 2024, 9:06 a.m.