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