Fitting a gamma distribition to x,y data

1 回表示 (過去 30 日間)
Moritz
Moritz 2014 年 3 月 3 日
編集済み: Moritz 2014 年 3 月 3 日
Dear all,
i do have data from size distribution measurements. The data is like: number of counts in specific size class ( e.g 1 - 1000 µm).
I can use nlinfit like:
p = nlinfit(sizeclass,NormalisedCounts,@gammafun_3param,[1 10 1500])
with
function y = gammafun_3param(abc,x)
a = abc(1); b = abc(2); c = abc(3);
y = c * x.^(a-1) .* exp(-x/b) / (b^a * gamma(a));
end
This works pretty well. The reason why i do not understand this issue is probably due to my lack of statistic knowledge.
1) Why does the usual gammafunction with c=1 not fit (the scaling is wrong)
2) How can i use gamfit if i cannot pass the information of the sizeclass to it ?
Do i have to normalize the data somehow different ? I normalized the counts by dividing by their sum.
Kind regards
Moritz

回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by