Hello everyone,



I'm trying to fit the PDF of time series datasets with the gamma distribution.

Nonetheless, this isn't possible for several datasets since the gamma distribution can only been used to fit continuous distribution. For instance, gam<-fitdrib(hist<-c(24,7,4,1,2,1,0,0,0,1,0,0),"gamma") will yield an error message.

To solve this issue, I decided to fit the cumulative distributive function i.e. gam<-fitdistr(hist_cum<-c(24,31,35,36,38,39,39,39,40,40,40)).

Now I don't know how to obtain the corresponding CDF of the gamma distribution which will fit the empirical CDF.

I have already tried some instructions like pgamma(seq(4,4*12,4), scale=1/gam$estimate[2],shape=gam$estimate[1]) without success as you can see on this picture https://docs.google.com/file/d/0BwjZP-sfazLMaDM2bHBDYnFOSWs/edit?usp=sharing where the curve in blue was supposed to be the fitted gamma CDF.

I said "was supposed" because I was obliged to use the instruction par(new=T) in order to super-impose the fitted gamma CDF



Cheers



Armel


	[[alternative HTML version deleted]]

