# NOT RUN {
scale <- 2
shape <- 1
threshold <- 1
s <- rtailw(1000, threshold = threshold , scale = scale, shape = shape)
fits <- fittail(s, dist = "TailW")
x_seq <- seq(threshold, max(s), length.out = 500)
theo_density <- dtailw(x_seq, threshold = threshold, scale = fits$scale, shape = fits$shape)
hist(s, probability = TRUE, breaks = "FD")
lines(x = x_seq, y = theo_density, col = "red")
# }
Run the code above in your browser using DataLab