Re: [R] Fit Frechet Distribution

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

 <riedwyl <at> giub.unibe.ch> 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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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