[R] Maximum likelihood estimation in R
Liaw, Andy
andy_liaw at merck.com
Sun Feb 15 23:54:23 CET 2004
Or:
library(mle)
?mle
(which, BTW, uses optim() underneath.)
Also, for those not aware of it, fitdistr(x, "normal") just computes mean(x)
and (n-1)/n * var(x) and return them. (I can't imagine any reason to do
otherwise for normal distribution.)
Best,
Andy
> From: Spencer Graves
>
> If, however, you are more interested in general methods for
> maximizing a likelihood function, I suggest you look at "optim", work
> the examples on the help page, etc.
>
> hope this helps. spencer graves
>
> DivineSAAM at aol.com wrote:
>
> >Hello,
> >
> >Use
> >
> >
> >
> >>x=rnorm(100, mean=3, sd=1)
> >>library(MASS)
> >>fitdistr(x, "normal")
> >>
> >>
> > mean sd
> > 2.93666631 0.99673982
> > (0.09967398) (0.07048015)
> >
> >Hope this helps,
> >
> >Shrieb
> >
> >______________________________________________
> >R-help at stat.math.ethz.ch mailing list
> >https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
> >
> >
>
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments,...{{dropped}}
More information about the R-help
mailing list