WBLFIT with Zeros

4 views (last 30 days)
Amy
Amy on 11 Feb 2012
I'm trying to fit a weibull distribution to wind output data in which there are are substantial number of zeros. I get an error when I use WBLFIT that states data must be positive. I presume this is because the ln function is used to calculate the alpha and beta perameters. I wondered if anyone has any suggestions on how to get around this error, other than shifting the entire distrubtion.

Answers (1)

Tom Lane
Tom Lane on 12 Feb 2012
Suppose you record times to 0.01. Would it be reasonable to replace the zeros by 0.005 or some other number that would round to zero under your recording scheme? You could try experimenting with other replacement values and see how this affects your results.
A more elaborate method would be to maximize a likelihood that consists of
wblpdf(x) for x>0, or
wblcdf(t) for x=0,
where t is some threshold value such that x<t gets recorded as zero.
Unfortunately, mle is difficult with exact zeros since the pdf can be Inf or 0 there, depending on the parameter values.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!