I'm trying to follow this post, which fits a Frechet distribution to some wind measurements as follows:
require('SPREDA')
require(e1071)
require(extRemes)
require(survival)
#The R functions for performing the extreme value analysis (for maxima)
#can be downloaded from:
source("http://www.datall-analyse.nl/R/eva_max.R")
#data from Castillo et al., Table 1.1, p. 9-10
#yearly maximum wind speed (in miles/hour)
evobs <- scan("http://www.datall-analyse.nl/blog_data/extremes_Table1-1.txt")
#explore data visually
options(repr.plot.width=7, repr.plot.height=7)
hist(evobs)
#Fréchet
frechetmod <- Lifedata.MLE(Surv(evobs) ~ 1, dist="frechet")
frechetmod
At some point, the author uses the output or the function Lifedata.MLE()
to calculate the following return level:
#note: for the wind data, a return period of 20 means that once every #20 years the wind speed is (on average) expected to be larger than #muG+qlev(1-1/20)*sigmaG=49.4 mph (in case of a Gumbel distribution), #or exp(muF+qlev(1-1/20)*sigmaF)=51.4 mph (in case of a Fréchet distribution) #(this expected wind speed is also called the return level)
which I suppose requires the xi shape parameter to calculate the 51.4 mph, using the quantile formula:
$$X_T=\mu +\frac{\sigma\left( 1 - \left( -\log\left(1-1/T \right)\right)^\xi\right)}{\xi}$$
where $T$ is the return period ($1/(1-F)$, where $F$ is the distribution function).
However, this parameter is not included in the output of frechetmod
:
Call:
model.frame(formula = Surv(evobs) ~ 1)
Coefficients:
(Intercept) logsigma
3.3579367 0.1957559
Loglikelihod:
-173.4035 (df=2)
How can I get this shape parameter estimate?
The $51.4$ value in the quoted paragraph is obtained in the post as:
frechetmod <- Lifedata.MLE(Surv(evobs) ~ 1, dist="frechet")
frechetmod
muF <- coef(frechetmod)[1]
sigmaF <- coef(frechetmod)[2]
exp(muF+qlev(1-1/20)*sigmaF)
using the Package ‘SPREDA’
and the qlev()
call, which gives the quantile of the Standard Largest Extreme Value Distribution, but I don't know how to reconcile with the closed equation above.