suit<-rbeta(100, 2, 2) #Generate suitability values
random<-runif(100)
sp<-ifelse(random < suit, 1, 0) #Generate presence-absence data
result<-AUCuniform_trap(cbind(suit, sp), plot = TRUE, plot.compare = TRUE)
result$AUC #Get the AUC
result$uAUC #Get the uAUC. Note how it is closer to the reference value of
#0.83 since the suitability values are simulated to be
#well-calibrated (see Jimenez-Valverde 2022).
Run the code above in your browser using DataLab