Skip to content
Back to formatted view

Raw Message

Message-ID: <FAD300E7-37DE-48E4-9E6A-6BCC0E22AD3B@comcast.net>
Date: 2013-06-12T00:42:46Z
From: David Winsemius
Subject: how to extract coefficient from a gamma distribution?
In-Reply-To: <9879AF1F439EF943BDEE22D3AAA5C3F683FBEAA7@sdsu-ex01.jacks.local>

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