I'm trying to plot a generalized pareto distribution with fixed initial values "scale" and "shape" to a random sequence of numbers. When I produce the plot with scale=1 and shape=1, I get the density on the y-axis with limits (0,1). If I produce the plot with different parameters (like the ones below), on the y-axis I get density values between (0,2), which obviously don't make sense.
x <- seq(from = 0, to = 5, by = 0.01)
plot(dgpd(x, scale=0.639, shape=-0.255), type="l",xaxt="n", las=1, ylab="Density", xlab="Exceedances")
axis(1, at=seq(0, 500, by=100), labels = seq(0, 5, by=1))
(the third line was my way to rename the x-axis, it shouldn't matter for my question.)
Could someone replicate this and tell me whether they also get the weird limits? You know how I can fix this? Thanks!
PS: Sorry for the inconvenience, I only thought that there was a problem with MY specifications since for some parameters I had the interval [0,1] and for others [0,2]. Erroneously enough, I was asking what was wrong with my parameters rather than with the density plot and values. But I get it, it's a question that has been asked before, so it's been flagged as duplicate. Moreover, this being my first experience with stackexchange, I can only learn from it. Good day to you all, lads!
dgpd
comes from. 2. Nothing is wrong there! Only requirement on density is between points $\endgroup$