Hi Dann,
there is probably a better way to do this, but this works anyway:
# your data
gamdat <- rgamma(10000, shape=1, rate=0.5)
# comparison to gamma:
gamsam <- rgamma(10000, shape=1, rate=0.6)
qqplot(gamsam,gamdat)
abline(0,1)
greetings
Remko
-------------------------------------------------
Remko Duursma
Post-Doctoral Fellow
Centre for Plant and Food Science
University of Western Sydney
Hawkesbury Campus
Richmond NSW 2753
Dept of Biological Science
Macquarie University
North Ryde NSW 2109
Australia
Mobile: +61 (0)422 096908
On Tue, Jan 27, 2009 at 3:38 AM, Dan31415 <d.m.mitchell at reading.ac.uk>
wrote:>
> I'm looking for goodness of fit tests for gamma distributions with
large data
> sizes. I have a matrix with around 10,000 data values in it and i have
> fitted a gamma distribution over a histogram of the data.
>
> The problem is testing how well that distribution fits. Chi-squared seems
to
> be used more for discrete distributions and kolmogorov-smirnov seems that
> large sample sizes make it had to evaluate the D statistic. Also i
haven't
> found a qq plot for gamma, although i think this might be an appropriate
> test.
>
> in summary
> -is there a gamma goodness of fit test that doesnt depend on the sample
> size?
> -is there a way of using qqplot for gamma distributions, if so how would
you
> calculate it from a matrix of data values?
>
> regards,
> Dann
> --
> View this message in context:
http://www.nabble.com/Goodness-of-fit-for-gamma-distributions-tp21668711p21668711.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>