HSgraph {vandalico} | R Documentation |
A function to visualize the distribution of the suitability values associated to presences, absences, and all cases together.
HSgraph(mat, breaks = 10, hist.total = TRUE)
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. |
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).
This function returns a multiple histogram.
Jiménez-Valverde, A. (2022). The uniform AUC: dealing with the representativeness effect in presence-absence models. Methods Ecol. Evol., 13, 1224-1236.
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)