# Re: [R] Fitting usual distributions.

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon 15 May 2006 - 21:18:48 EST

> Hello,
>
> I am currently writing a program whose goal is to fit usual
> distributions (estimating parameters and confidence intervals for a
> given distribution).
>
> After some research in R, R-help and google I have found most of what I
> was looking for (especially thanks to MASS - fitdistr() ), however there
> are still a few distributions I could not find R code for: Multinormal,
> Truncated normal, Triangular, Uniform, Binomial, Multinomial.
>
> If there are any packages to fit these, a pointer in the right direction
> would be most appreciated.

You don't need R code for most of these.

Binomial, Multinomial: the MLEs are the sample proportions, and the se's are textbook formulae. Can also be done in fitdistr.

Triangular, Uniform: non-standard estimation problems, but the MLEs of the support are the sample maximum and minimum. For a CI, you will need a profile likelihood interval, or some such.

Truncated normal: pretty easy to do in fitdistr, provided the truncation point is known (is it?).

Multinormal: the MLEs are the sample mean and the sample covariance (divisor n).

```--
Brian D. Ripley,                  ripley@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

______________________________________________
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 Mon May 15 21:22:06 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 17 May 2006 - 18:10:10 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.