[R] Fitting distributions
Jim Lindsey
james.lindsey at luc.ac.be
Mon Sep 10 08:53:48 CEST 2001
>
> On Fri, 7 Sep 2001, kjetil halvorsen wrote:
>
> > Hola!
> >
> > I think the original posters problem was to fit a weibull. this could be
> > done with:
> >
> > library(gnlm)
> > > x <- rweibull(100, 2, 3)
> > > y <- rep(1,100)
> >
> > > fit.dist(x,y,"Weibull")
> >
> > Weibull distribution, n = 100
> >
> > mean variance alpha.hat mu.hat
> > 2.438586 1.840581 1.890002 6.782797
> >
> > -log likelihood AIC
> > -296.4451 -294.4451
> >
> > yi ni pi.hat pi.tilde like.comp resid
> > 1 1.8744688 1 0.01 0.300583890 -3.403142 -5.300156
>
> >From the help page again:
>
> breaks: If TRUE, `y' contains breaks between categories instead of
> mid-points.
>
> so according the help page it is assuming grouped observations
> specified by midpoints. That is not the same problem, as I did say.
Brian is correct.
>
> Who knows if the help page is right?
Yes it is.
>
>
> > Kjetil Halvorsen
> >
> >
> > Prof Brian Ripley wrote:
> > >
> > > On Thu, 6 Sep 2001, kjetil halvorsen wrote:
> > >
> > > > Hola!
> > > >
> > > > I think some of this is avaliable as fit.dist in Jim Lindsays
> > > > package gnlm.
Actually, it is rather gnlr in the same library that will do much of
the proposed fitdist.
Jim
> > >
> > > Not according to his help page:
> > >
> > > \name{fit.dist}
> > > \title{Fit Probability Distributions to Frequency Data}
> > >
> > > Not the same problem.
> > >
> > > --
> > > 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
> > > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> >
>
> --
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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