Today, I continue to looking for the best functions for fitting T2 distribution.
Summary:
T2distribution(:,1)=[];
T2distri=T2distribution;
T2row1=T2distri(1,:);
T2row2=T2distri(2,:);
T2row3=T2distri(3,:);
T2row4=T2distri(4,:);
subplot(2,2,1)
area(T2row1)
subplot(2,2,2)
area(T2row2)
subplot(2,2,3)
area(T2row3)
subplot(2,2,4)
area(T2row4)
[phat1,pci1]=mle(T2row1,'distribution','gam')
[phat2,pci2]=mle(T2row2,'distribution','gam')
[phat3,pci3]=mle(T2row3,'distribution','gam')
[phat4,pci4]=mle(T2row4,'distribution','gam')
%% same as above
[phat1,pci1]=gamfit(T2row1)
[phat2,pci2]=gamfit(T2row2)
[phat3,pci3]=gamfit(T2row3)
[phat4,pci4]=gamfit(T2row4)
phat11=phat1(:,1);
phat12=phat1(:,2);
y1=gampdf(T2row1,phat11,phat12);
plot(y1)
[phat5,pci5]=mle(T2row1,'distribution','norm')
[phat6,pci6]=mle(T2row2,'distribution','norm')
[phat7,pci7]=mle(T2row3,'distribution','norm')
[phat8,pci8]=mle(T2row4,'distribution','norm')
phat51=phat5(:,1);
phat52=phat5(:,2);
y5=normpdf(T2row1,phat51,phat52);
plot(y5)
%% example
x = gaminv((0.005:0.01:0.995),100,10);
y = gampdf(x,100,10);
y1 = normpdf(x,1000,100);
figure;
plot(x,y,'-',x,y1,'-.')
After fitting, the results are not good. They are not even on the same order of magnitudes. I will try to solve the problem tomorrow.
No comments:
Post a Comment