Re: [R] Fitting Gamma distribution

From: Joris Meys <jorismeys_at_gmail.com>
Date: Fri, 18 Jun 2010 16:14:40 +0200

You can use rgamma to get a gamma distribution for use in qqplot, eg :

x <-rchisq(100,2)
y<- fitdistr(x,"gamma")

qqplot(rgamma(100,y$estimate[1],y$estimate[2], x)

Cheers
Joris

On Wed, Jun 16, 2010 at 9:40 AM, Marcosco01 <marco.scortichini_at_bancamarche.it> wrote:
>
> I'm looking for goodness of fit tests for gamma distributions with large data
> sizes and for different data.
> I have a matrix with around 4.000 data values in it and i have fitted a
> gamma distribution with "fitdistr".
>
> You can see the example:
>
>> fitdistr(corpo,"gamma",lower=0.001)
>
>  Errore in optim(x = c(5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000,
> 5000,  :
>  non-finite finite-difference value [2]
>
> The problem is the optimization for the test with different data and for the
> size larger than 516 data.
>
> 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?
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Fitting-Gamma-distribution-tp2257014p2257014.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.
>

-- 
Joris Meys
Statistical consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

tel : +32 9 264 59 87
Joris.Meys_at_Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

______________________________________________
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.
Received on Fri 18 Jun 2010 - 14:17:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 18 Jun 2010 - 14:30:33 GMT.

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

list of date sections of archive