HSgraph {vandalico} | R Documentation |
Suitability values distribution graph
Description
A function to visualize the distribution of the suitability values associated to presences, absences, and all cases together.
Usage
HSgraph(mat, breaks = 10, hist.total = TRUE)
Arguments
mat |
A matrix with two columns. The first column must contain the suitability values (i.e., the classification rule); the second column must contain the presences and absences. |
breaks |
Number of cells for the total histogram. By default,
|
hist.total |
Logical. Indicates whether or not the distribution of suitability values for all the cases together is graphed. |
Details
In blue, the distribution of the suitability values associated to presences. In red, the distribution of the suitability values associated to absences. This graph helps to understand why the AUC (or Se*) is greater, equal to, or less than the uAUC (or uSe*) (see Jiménez-Valverde 2022).
Value
This function returns a multiple histogram.
References
Jiménez-Valverde, A. (2022). The uniform AUC: dealing with the representativeness effect in presence-absence models. Methods Ecol. Evol., 13, 1224-1236.
Examples
suit<-rbeta(100, 2, 2) #Generate suitability values
random<-runif(100)
sp<-ifelse(random < suit, 1 , 0) #Generate presence-absence data
HSgraph(cbind(suit, sp), breaks = 20, hist.total = TRUE)