[R] how to extract coefficient from a gamma distribution?
David Winsemius
dwinsemius at comcast.net
Wed Jun 12 02:42:46 CEST 2013
On Jun 11, 2013, at 5:25 PM, Kaptue Tchuente, Armel wrote:
> I'm trying to fit the gamma probability distribution to time series datasets suing the following command gam<-fitdistr(x=hist2fit,"gamma") where hist2fit is the bar histogram of a sample distribution.
>
> The problem is that for some points, it is not possible to fit the gamma distribution for instance with an histogram having identical value.
>
> I would like to know how to test whether the command gam<-fitdistr(x=hist2fit,"gamma") properly ended such that I can decide to save the gamma-parameters (for instance as NaN in this case).
>
?try
?tryCatch
> Without this test, the program stops when I try to store the scale and the shape parameters.
>
> Any thoughts for a code will be very much appreciated.
>
>
>
--
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list