How to estimate the parameters of Frechet distribution in R? I am new in using R.
I have a data set 
36.5, 305.9, 255.4, 109.2, 107.7, 85.4, 49.1, 119.1, 281.3, 209.8, 214, 
93.8, 134.7, 98.2, 75.6, 120.8, 106, 666.2, 94.4, 78.4, 139.4, 105.2, 145.4, 
154.2, 128, 192.8, 220, 99.7, 228.7, 150.2, 140.4, 152.8, 92.4, 94.5, 139.9, 
151.6, 184.7, 140, 124, 210, 116.4, 155.6, 186.8, 154.4, 113.8, 43.2, 186.4

for which I want to estimate the parameters of Frechet distribution. How do I do it?
Thanks in advance
 A: There's the "direct" approach of using likelihood maximization via the pdf (such as via the package fitdistrplus (e.g. using fitdist or fitdistrplus) or MASS::fitdistr (which comes with R) on functions for the Frechet distribution that you can find through the Distributions task view). 
However, one point that I think makes this more clearly on topic for our site is that one could consider the possibility of transformation.
Maximum likelihood has a property of invariance to transformations -- actually, it has a couple of kinds of invariance described there, we're using the second one (transforming the random variable, not the parameters), though if we write the Weibull in the usual form, we would have to apply both.
For example, with a random variable from the two-parameter Frechet, the distribution of its inverse is two-parameter Weibull. One can directly convert between parameter estimates (assuming each are parameterized as Wikipedia does) as indicated at the link, after inverting the data and fitting he Weibull.
Many stats packages offer convenient ways to fit the Weibull, so even if you couldn't fit the Frechet directly, it may still be relatively easy to achieve.
One can fit the Weibull in several ways in R -- there's a JStatSoft paper on fitdistrplus ("fitdistrplus:  An
R Package for Fitting Distributions", Journal of Statistical Software, February 2015, Volume 64, Issue 4.) that describes how to fit the Weibull, but one could also use the survreg function in the survival package (which comes with R), or MASS::fitdistr with the Weibull function (also comes with R and the help describes how to do it for the Weibull), and so on. These approaches are all pretty convenient.
A: I thought of the following method as a kind of first estimation. On Wikipedia you may find that the mean, mu, and standard deviation, sigma, of the Fréchet distribution are as follows (Maple notation):
mu = s*GAMMA(1-(1/alpha)) for 1 < alpha
and
sigma = sqrt((s**2*(GAMMA(1-(2/alpha))-(GAMMA(1-(1/alpha)))**2))) for 2 < alpha
The ratio sigma/mu is as follows:
ratio = sigma/mu = sqrt(GAMMA(1-2/alpha)-GAMMA(1-1/alpha)^2)/GAMMA(1-1/alpha)
Notice that the parameter s does not occur in the ratio.
An approximation of the ratio, ratio(approx), is as follows:
ratio = 1/(a*alpha**b-2)
with a = 1.410 and b = 0.814.
By solving this equation for alpha, one can estimate alpha as follows:
alpha(estim) = ((1+2*ratio)/(a*ratio))^(1/b)
For ratio one can take the observed mean and observed standard deviation.
The parameter s can be estimated by rewriting the formula for mu as follows:
s = mu/GAMMA((alpha-1)/alpha)
and replacing mu by the observed mean and alpha by the estimated value of alpha.
I did some simulations and the method worked satisfactorily.
A: Another method for the method proposed by Ad van der Ven is one which makes use of the formula for the skewness. On Wikipedia you may find that the skewness of the Fréchet distribution is as follows (Maple notation):
Skewness = (GAMMA(1-(3/alpha))-3*GAMMA(1-(2/alpha))GAMMA(1-(1/alpha))+2(GAMMA(1-(1/alpha)))**3)/sqrt(((GAMMA(1-(2/alpha))-(GAMMA(1-(1/alpha))**2))**3))
Notice, that 
Limit(Skewness,alpha=infinity) = 12*sqrt(6)*Zeta(3)/Pi**3 = 1.1395471
where Zeta(x) is the well-known Zeta function. An approximation of the skewness, skewness(approx), is as follows:
skewness(approx) = 12*sqrt(6)*Zeta(3)/Pi**3 + 1/(a*(alpha-3)**b)
with a = 0.224 and b = 0.903. 
By solving this equation for alpha, one can estimate alpha as follows:
alpha(estm) = (-1/(a*(c-skewness(approx))))**(1/b) + 3
with c = 12*sqrt(6)*Zeta(3)/Pi**3 = 1.1395471.
The parameter s can be estimated by rewriting the formula for mu and replacing mu by the observed mean and alpha by the estimated value of alpha or by rewriting the formula for sigma and replacing sigma by the observed standard deviation and alpha by the estimated value.
