# NOT RUN {
library(evd)
# Unimodal distribution
x <- rgev(1000, loc = 23, scale = 1.5, shape = 0)
## True mode
gevMode(loc = 23, scale = 1.5, shape = 0)
## Estimate of the mode
venter(x, bw = 1/3)
M <- mlv(x, method = "venter", bw = 1/3)
print(M)
plot(M, xlim = c(20, 30))
# }
Run the code above in your browser using DataLab