# NOT RUN {
#========================================================================================
# Plot AFROC curve
#========================================================================================
tt <- seq(0, 1, length.out = 111)
ttt <- stats::runif(1000,0.001,100)
t <- c(tt,ttt)
a <- AFROC(t,x.coordinate.also=TRUE)
plot(a$x,a$y)
# We note that the x-coordinates of AFROC curve is not t but x = 1 - exp(-t).
# To emphasize that x-coordinates is not t, we prepare the another example
#========================================================================================
# Plot AFROC curve
#========================================================================================
tt <- seq(0, 1, length.out = 1111) #plot(1:length(tt),tt)
ttt <- stats::runif(1000,0.001,100)
t <- c(tt,ttt)
t <- c(0,tt,ttt,1)
t<-sort(t, method = "shell", index.return = FALSE)
y <- AFROC(t,x.coordinate.also=FALSE)
plot(1-exp(-t),y,type="l")
Close_all_graphic_devices() # 2020 August; Revised 2022 Jan 6
# }
Run the code above in your browser using DataLab