Re: [R] Fit Frechet Distribution

From: Ben Bolker <>
Date: Sun 04 Dec 2005 - 09:59:06 EST

 <riedwyl <at>> writes:

> hello everybody
> i want to use the maximum likelihood method to estimate FRECHET parameters of
> my sample data.
> Should it work with fitdistr in the package MASS?
> I only find how to do it for GEV, Gumbel, and almost all other distributions,
> but FRECHET?
> I would be very happy if somebody can tell me how to do fit the FRECHET
> distribution!
> Thanks
> Nadja Riedwyl

the evd package from CRAN has d/r/p/qfrechet functions.

you can set up a negative log-likelihood function

likfun <- function(loc,shape,scale) {
  -sum(dfrechet(x,loc=loc,shape=shape,scale=scale,log=TRUE)) }

[totally untested]

and use mle, from the stats4 package (or just plain old optim()) to find the parameters.
The hardest part may be to find good starting parameters.

  Ben Bolker mailing list PLEASE do read the posting guide! Received on Sun Dec 04 10:13:19 2005

This archive was generated by hypermail 2.1.8 : Sun 04 Dec 2005 - 14:29:26 EST