1

I am trying to find the shape and scale parameters for the gamma distribution of some data, but I was not able to find a method to work this out.

How do you commonly do it? I am analyzing response times and they look like this:

RT (ms)
647.6187042
598.4195305
503.0288826
551.2494272
519.6577653
487.8137089
951.4768826
615.0730516
[many more similar data deleted]

Should I use MatLab for this instead?

David Jones
  • 4,766
  • 3
  • 32
  • 45
CatM
  • 284
  • 2
  • 12
  • Possible duplicate of [Fitting a gamma distribution with (python) Scipy](https://stackoverflow.com/questions/2896179/fitting-a-gamma-distribution-with-python-scipy) – sashimi Apr 08 '19 at 15:30
  • I looked at the post mentioned but I am trying to find a similar way to the one done in MatLab where you use the function GamFit. Is there a corresponding function for Python? – CatM Apr 08 '19 at 17:56
  • @CatM Sure, right in the reference - you great object of the type `gamma` and call `fit()` method – Severin Pappadeux Apr 08 '19 at 18:16
  • I tried that method before asking the question and it failed to produce valid results, the mean was too low (a little more than one hundred milliseconds). – CatM Apr 09 '19 at 14:28
  • Well, there is momentum method as well - compute mean, variance and solve equations for alpha and beta – Severin Pappadeux Apr 10 '19 at 13:09
  • Could you provide more data, so fit could be tested? – Severin Pappadeux Apr 10 '19 at 17:22
  • I used that method before and the values were considerably different from the ones I obtained in MatLab. – CatM Apr 13 '19 at 17:03

0 Answers0