Skip to contents

Similar to the ensemble() function, this function creates an ensemble of partial responses of provided distribution models fitted with the ibis.iSDM-package. Through the layer parameter it can be specified which part of the partial prediction should be averaged in an ensemble (if given). This can be for instance the mean prediction and/or the standard deviation sd. Ensemble partial is also being called if more than one input DistributionModel object is provided to partial.

By default the ensemble of partial responses is created as average across all models with the uncertainty being the standard deviation of responses.


# S4 method for ANY,character,character,character,ANY,logical



Provided DistributionModel objects from which partial responses can be called. In the future provided data.frames might be supported as well.


A character of the variable from which an ensemble is to be created.


Approach on how the ensemble is to be created. See details for options (Default: 'mean').


A character of the layer to be taken from each prediction (Default: 'mean'). If set to NULL ignore any of the layer names in ensembles of SpatRaster objects.


A optional data.frame or SpatRaster object supplied to the model (DefaultL NULL). Note: This object needs to have identical names as the original predictors.


logical on whether the inputs of the ensemble should be normalized to a scale of 0-1 (Default: TRUE).


A data.frame with the combined partial effects of the supplied models.


Possible options for creating an ensemble includes:

  • 'mean' - Calculates the mean of several predictions.

  • 'median' - Calculates the median of several predictions.


If a list is supplied, then it is assumed that each entry in the list is a fitted DistributionModel object. Take care not to create an ensemble of models constructed with different link functions, e.g. logistic vs log. By default the response functions of each model are normalized.


if (FALSE) {
 # Assumes previously computed models
 ex <- ensemble_partial(mod1, mod2, mod3, method = "mean")