Learn R Programming

ecospat (version 4.1.1)

ecospat.CommunityEval: Community Evaluation

Description

Calculate several indices of accuracy of community predictions.

Usage

ecospat.CommunityEval (eval, pred, proba, ntir, verbose = FALSE)

Value

A list of evaluation metrics calculated for each site (+ each trial if proba is set to TRUE):

deviance.rich.pred: the deviation of the predicted species richness to the observed

overprediction: the proportion of species predicted as present but not observed among the species predicted as present

underprediction: the proportion of species predicted as absent but observed among the species observed as present

prediction.success: the proportion of species correctly predicted as present or absent

sensitivity: the proportion of species correctly predicted as present among the species observed as present

specificity : the proportion of species correctly predicted as absent among the species observed as absent

kappa: the proportion of specific agreement

TSS: sensitivity+specificity-1

similarity: the similarity of community composition between the observation and the prediction. The calculation is based on the Sorenses index.

Jaccard: this index is a widely used metric of community similarity.

Arguments

eval

A matrix of observed presence-absence (ideally independent from the dataset used to fit species distribution models) of the species with n rows for the sites and s columns for the species.

pred

A matrix of predictions for the s species in the n sites. Should have the same dimension as eval.

proba

Logical variable indicating whether the prediction matrix contains presences-absences (FALSE) or probabilities (TRUE).

ntir

Number of trials of presence-absence predictions if pred is a probability matrix.

verbose

Boolean indicating whether to print progress output during calculation. Default is FALSE.

Author

Julien Pottier julien.pottier@clermont.inra.fr

with contribution of Daniel Scherrer daniel.scherrer@unil.ch, Anne Dubuis anne.dubuis@gmail.com and Manuela D'Amen manuela.damen@unil.ch

Details

This function calculates several indices of accuracy of community predictions based on stacked predictions of species ditribution models. In case proba is set to FALSE the function returns one value per index and per site. In case proba is set to TRUE the function generates presences-absences based on the predicted probabilities and returns one value per index, per site and per trial.

References

Pottier, J., A. Dubuis, L. Pellissier, L. Maiorano, L. Rossier, C.F. Randin, P. Vittoz and A. Guisan. 2013. The accuracy of plant assemblage prediction from species distribution models varies along environmental gradients. Global Ecology and Biogeography, 22, 52-63.

Examples

Run this code
# \donttest{

data(ecospat.testData)
eval <- ecospat.testData[c(53,62,58,70,61,66,65,71,69,43,63,56,68,57,55,60,54,67,59,64)]
pred <- ecospat.testData[c(73:92)]

ecospat.CommunityEval (eval, pred, proba=TRUE, ntir=10)
# }

Run the code above in your browser using DataLab