[R] mle in the gamma model

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Nov 24 11:51:56 CET 2003


library(MASS)
?fitdistr

You can also use survreg (survival) and glm (with some help from functions 
in MASS for the shape).

On Mon, 24 Nov 2003, Dominique Couturier wrote:

> I'm looking for a classic equivalent of the wle.gamma function (library 
> wle) that estimate robustly the shape and the scale parameters of gamma 
> data.
> I have a vector of iid gamma rv :
>  >data=rgamma(100,shape=10,scale=3)
> and a vector of their weights:
>  >weights=c(rep(.5/70,70),rep(.25/20,20),rep(.25/10,10))
> and want to estimate the scale and shape of the gamma distribution.
> Does such a function exists?

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list