[R] Can I calculcate the percentage of a gamma function area below a cutoff value?
Roland Rau
roland.rproject at gmail.com
Wed Aug 15 00:31:29 CEST 2007
Hi
Jake Verschuyl wrote:
> Hi there,
>
>
>
> I have some bird flight height data that follows a gamma distribution. The
> data (x) goes from 0 to 700 meters (n=1055). The calculated parameters
> calculated from the fitdistr(x) are (shape = 5.1379, rate = 0.017541), and
> therefore the scale (1/rate) = 57.00929. I would like to calculate the
> percentage of the function area that occurs below 50 meters (0-50m).
>
I guess
?pgamma
will help you?
and in your case:
pgamma(q=50, shape = 5.1379, rate = 0.017541)
> pgamma(q=50, shape = 5.1379, rate = 0.017541)
[1] 0.001620588
> pgamma(700, shape = 5.1379, rate = 0.017541)
[1] 0.9927367
Was this what you were looking for?
>
> P Please consider the environment before printing this email.
>
>
Don't worry, I will not print it. And in return:
Please consider reading the posting guide...
where it is stated:
=> Read at least the relevant section in "An Introduction to R"
There is a section (Section 8) which answers (almost) all questions on
probability distributions and R.
Best,
Roland
More information about the R-help
mailing list