leo nidas
10-21-2008, 03:08 PM
Hi there,
I want to fit an F distribution to a vector of data using MATLAB.
MATLAB has ready functions if ones wants to fit a distribution such as exprnd for exponential wblrnd for weibull etc. Nothing for the F though..
One could use the mle function instead, a simple example follows:
x= frnd(2,20,1000,1); %produce 1000 numbers from F with 2,20 d.f.
mle(x,'pdf',@fpdf,'start',1:2)
answer=
2.0437 23.6131
but I think that the above is very sensitive concerning the initial values. That is,
mle(frnd(1,5,1000,1),'pdf',@fpdf,'start',[10 10])
yields an error.
specifically I have a vector of data and want to fit an F distribution but I have no idea about the d.f. Is there a quick way to get good starting values in order to run the above and have the desirable fitted F?
I want to fit an F distribution to a vector of data using MATLAB.
MATLAB has ready functions if ones wants to fit a distribution such as exprnd for exponential wblrnd for weibull etc. Nothing for the F though..
One could use the mle function instead, a simple example follows:
x= frnd(2,20,1000,1); %produce 1000 numbers from F with 2,20 d.f.
mle(x,'pdf',@fpdf,'start',1:2)
answer=
2.0437 23.6131
but I think that the above is very sensitive concerning the initial values. That is,
mle(frnd(1,5,1000,1),'pdf',@fpdf,'start',[10 10])
yields an error.
specifically I have a vector of data and want to fit an F distribution but I have no idea about the d.f. Is there a quick way to get good starting values in order to run the above and have the desirable fitted F?