Prev: cumsum functio without loops
Next: How can I plot two different y-axis (right and left) with a reverse-logarithmic x-axis?
From: Rosanne Gatt on 29 Apr 2010 05:58 I am using the dfittool command to fit certain distributions to my data. However, I have only 5 distribution type options in the 'new fit' tab: normal, extreme value, logistic, non-parametric and t-location scale. How can i fit the exponential, lognormal and the gamma distributions with DFITTOOL please? Thanks in advance.
From: Wayne King on 29 Apr 2010 06:23
"Rosanne Gatt" <rosannegatt(a)gmail.com> wrote in message <hrbl7c$q0l$1(a)fred.mathworks.com>... > I am using the dfittool command to fit certain distributions to my data. However, I have only 5 distribution type options in the 'new fit' tab: normal, extreme value, logistic, non-parametric and t-location scale. How can i fit the exponential, lognormal and the gamma distributions with DFITTOOL please? Thanks in advance. Hi Rosanne, dfittool actually looks at your data and determines valid distribution choices for your data. Only those distributions appear in the menu. From what you describe above, I suspect that perhaps you have negative values in your data? If you have negative values, you cannot fit an exponential PDF because an exponential random variable is nonnegative by definition. Gamma and lognormal random variables have to be positive. One thing you can do is to define a new random variable by adding a constant to your data: Y=X+c so that the support of the random variable is such that you can fit one of those distributions. Hope that helps, Wayne |