Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java: fit data to a Gamma distribution (scale, shape needed)

Is there a Java library which I can use to fit a given data vector to a Gamma distribution, in order to find out its shape and scale. Something like fitdistr(data,'gamma') in R?

I can only find librarys which calculate a sample distribution from given shape and scale parameters.

like image 284
dabuki Avatar asked Dec 11 '25 05:12

dabuki


1 Answers

I don't think there is a closed form solution for Gamma MLE, but you can easily implement the procedure described here (p.2). Apache commons has the needed digamma function.

like image 132
Feng Mai Avatar answered Dec 12 '25 17:12

Feng Mai



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!