[R] Fitting Distributions

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jan 10 18:33:47 CET 2002


On Thu, 10 Jan 2002 Tharacad.Ramanarayanan at aventis.com wrote:

> Thank you very much Robert Denhum & Prof. Ripley. The 'fitdistr' works very
> good and that is what I was looking for. I had to upgrade my R from 1.31 to
> 1.4.0 because 1.3x did not have fitdistr within the MASS package.

You could just have used update.packages() to get current versions of the
packages.

> Now, how can I extract the parameters from the output. The help file states
> that an object of class "fitdistr" with 2x2 matrix is produced. But how can
> I extract the estimated parameters from the output? shape.fitdistr or
> similar commands dose not work. Thank you very much again.

>From the last example of example(fitdistr)

> z <- fitdistr(x4, "Negative Binomial")
> z
     size         mu
  3.5522146   4.9181082
 (0.4032878) (0.1531517)
> z$estimate
    size       mu
3.552215 4.918108

Seems like the help page is out-of-date.  It is a list with two
components.

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list