[R] median of gamma distribution
Matthias Kohl
Matthias.Kohl at stamats.de
Mon Jul 3 08:06:37 CEST 2006
Hi,
to compute the median (or expectation, var, sd, IQR, mad, ...) you can also use package "distrEx".
library(distrEx)
(G <- Gammad())
median(G)
Matthias
----- original Nachricht --------
Betreff: Re: [R] median of gamma distribution
Gesendet: Fri, 30. Jun 2006
Von: Ted.Harding at nessie.mcc.ac.uk
> On 30-Jun-06 Philip He wrote:
> > Doese anyone know a R function to find the median of a gamma
> > distribution?
>
> qgamma will do it. Test:
>
> > -log(0.5)
> [1] 0.6931472
> > qgamma(0.5,1)
> [1] 0.6931472
>
> Ted.
>
>
> --------------------------------------------------------------------
> E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
> Fax-to-email: +44 (0)870 094 0861
> Date: 30-Jun-06 Time: 16:53:16
> ------------------------------ XFMail ------------------------------
>
> ______________________________________________
> R-help at 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
>
--- original Nachricht Ende ----
--
Dr. rer. nat. Matthias Kohl
Matthias.Kohl at stamats.de
www.stamats.de
More information about the R-help
mailing list