Learn R Programming

biomod2 (version 4.2-5)

predict2.em: Functions to get predictions from biomod2_ensemble_model objects

Description

This function allows the user to predict single models from biomod2_ensemble_model on (new) explanatory variables.

Usage

# S4 method for biomod2_ensemble_model,SpatRaster
predict2(object, newdata, predfun, seedval = NULL, ...)

# S4 method for biomod2_ensemble_model,data.frame predict2(object, newdata, predfun, seedval = NULL, ...)

# S4 method for EMmean_biomod2_model,SpatRaster predict2(object, newdata, ...)

# S4 method for EMmean_biomod2_model,data.frame predict2(object, newdata, ...)

# S4 method for EMmedian_biomod2_model,SpatRaster predict2(object, newdata, ...)

# S4 method for EMmedian_biomod2_model,data.frame predict2(object, newdata, ...)

# S4 method for EMcv_biomod2_model,SpatRaster predict2(object, newdata, ...)

# S4 method for EMcv_biomod2_model,data.frame predict2(object, newdata, ...)

# S4 method for EMci_biomod2_model,SpatRaster predict2(object, newdata, ...)

# S4 method for EMci_biomod2_model,data.frame predict2(object, newdata, ...)

# S4 method for EMca_biomod2_model,SpatRaster predict2(object, newdata, data_as_formal_predictions = FALSE, ...)

# S4 method for EMca_biomod2_model,data.frame predict2(object, newdata, data_as_formal_predictions = FALSE, ...)

# S4 method for EMwmean_biomod2_model,SpatRaster predict2(object, newdata, data_as_formal_predictions = FALSE, ...)

# S4 method for EMwmean_biomod2_model,data.frame predict2(object, newdata, data_as_formal_predictions = FALSE, ...)

Arguments

object

a biomod2_ensemble_model object

newdata

a data.frame or SpatRaster object containing data for new predictions

predfun

a function, generated by the predict2 method specific to each biomod2_model subclass and used within the generic predict2.biomod2_model.SpatRaster or predict2.biomod2_model.data.frame to do the prediction

seedval

(optional, default NULL)
An integer value corresponding to the new seed value to be set

data_as_formal_predictions

(optional, default FALSE). A boolean describing whether newdata is given as raw environmental data (FALSE) or as formal predictions of the individual models used to build the ensemble model (TRUE).

...

(optional)

Author

Remi Patin

See Also

biomod2_ensemble_model

Other Toolbox functions: getters.bm, getters.out, load_stored_object(), predict.bm, predict.em, predict2.bm