0001 function F=Fcritical(p,ndf,ddf) 0002 0003 r=0.001; 0004 if(ddf>250) 0005 ddf=250; 0006 end 0007 0008 fmax=sqrt(ndf)*p^-0.5; 0009 f=[0:r:fmax]; 0010 g=betainc((ddf./(ddf+ndf.*f)),ddf/2,ndf/2); 0011 h=abs(g-p); 0012 t=find(h==min(h)); 0013 F=f(t); 0014