0

Do you take the leftmost tail data at a certain point rather than the whole distribution data to get the correct distribution.

Gumbel_density <- exp(-ts_rSPY)
plot(ts_rSPY,Gumbel_density, col='green')

the plot does not show a gumbel density any help will be greatly appreciated.

Con Fluentsy
  • 153
  • 6

1 Answers1

0

I understand you want to plot a Gumble distribution:

set.seed(4545)
size = 1e6 # desired size for result array
mu = 1 # location parameter
beta = 2.5 # scale parameter
result = mu - beta*log(-log(runif(size)))
plot(density(result), main = '', type = 'l',
    xlab = 'X', ylab = '', col = 'green')
Colibri
  • 682
  • 6
  • 8
  • Thanks, I was after a plot using ggplot2 thanks. For extreme value distributions, they are available built-in for most Evt packages with the default plot library, whereas few if any use ggplot2. – Con Fluentsy Jul 22 '21 at 12:10
  • Checking the parameters yours will work so it is a matter of converting to GGplot2. However you would have to run fitdist on real data, will just stick with default plots in extreme value packages, too much trouble. – Con Fluentsy Jul 22 '21 at 14:59