Re: fit F distribution



I tried with my own data though and tried many different starting values
but the following error kept coming up:

?? Error using ==> mlecustom>llf_pdfcdf at 431
The PDF function returned NaN or infinite values.

Leo, your variable has mean 3.1338 and variance 4.5367. There's no F
distribution with those values. To get a mean of about 3 you'd need your
second parameter to be 3, and the variance is infinite in that case. This
doesn't prove there's no maximum likelihood estimate, but I can imagine the
mle function might run into trouble trying parameter values that approach
the boundary of the parameter space or for some other reason cause trouble.

I also tried Peter's idea, but didn't wind up with an F distribution.

Is there a theoretical or other reason you need an F distribution? For no
good reason I picked the value 3 and was able to fit x/3 by an F
distribution reasonably well:

ecdf(x)
p = mle(x/3,'pdf',@fpdf,'start',1:2)
p =
9.7097 18.9723
xx = linspace(0,14); line(xx,fcdf(xx/3,p(1),p(2)),'color','r')

I can even estimate the scale parameter:

q = mle(x,'pdf',@(x,v1,v2,s) (1./s) .* fpdf(x/s,v1,v2),'start',[10 10 3])
q =
47.4769 7.9663 2.3680
line(xx,fcdf(xx/q(3),q(1),q(2)),'color','m')

-- Tom


.



Relevant Pages

  • Re: Gaussian distribution
    ... average of things, no matter what its distribution, will become normally ... apply to the average of samples from a Cauchy distribution. ... variance of such an average is infinite for any number of samples. ...
    (sci.stat.math)
  • Re: Q about Correlation Coefficient of Two Time Series
    ... Ray: Thank you very much for the answer. ... The reason I asked the ... from a distribution with mean 0 and variance v. ...
    (sci.stat.math)
  • Re: infinite variance
    ... > Can a distribution have finite support and its variance remain infinite? ... If the support is on the variance is maximised by placing point ...
    (sci.stat.math)
  • Re: Sean PItman and nested hierarchy
    ... > processes cannot make a nested hierarchical pattern without the use of ... the distribution for common descent is ... concept of a "flat probability distribution" across all possible ... there are infinite outcomes, there is zero chance of each. ...
    (talk.origins)
  • Re: compare 2 samples
    ... I.e. mean .005 seconds with std dev .02 ... For some reason I was kind of envisioning a normal ... and that the distribution is not normal. ... two Poisson means. ...
    (sci.stat.math)