I tried doing it in cftool but it won't recognize Weibull fits. I upload my array of numbers and add it and when I fit with Weibull, it gives the doesn't fit error even if I give it the a and b starting values that if ound with wblfit.
Thanks ahead of time,
Ante Lausic
Ante, the first question is, what exactly do you mean by "Weibull fit" -- are you fitting a Weibull distribution or doig regression with a Weibull curve? WBLFIT is for the former, CFTOOL the latter. Please see this demo:
When I plot my 1-D array with wblplot, it plots it on the Weibull type graph paper and fits it. Since it is appoximately linear in this type of plot, I know it follows Weibull. I can perform wblfit to get the parameters based on this 1-D array but I wish to know how well that linear line it drew through my points on the Weibull plot is based on goodness of fit statistics.
From the demo above, they have a 2 coordinate system that they can match to the Weibull curve but I don't have the second parameters. Is it necessary to have the corresponding second variable to get goodness-of-fit statistics? Also, I need to see the graph in the Weibull scale but I don't believe the cruve fitter graph can be switched to the Weibull axes.
Your original post was unclear about whether you were fitting a Weibull dist'n to a single vector of data, or fitting a nonlinear regression to two vectors of data using a Weibull curve. That demo compares those two goals. Based on your response, it sounds like you are doing the former, although I think you are fitting the distribution using a method that is superficially like a regression, as described here:
rather than by maximum likelihood, which is what WBLFIT does.
The method it sounds like you're using does fit a straight line to a bivariate set of data, but it important to remember that it is NOT at all like the kind of straight line fitting that you'd do in the usual regression model. In particular, I don't believe that goodness-of-fit statistics such as r^2 and SSE have any relevance here. The usual thing that people do for a goodness of fit test on univariate data is a Kolmogorov-Smironov test, but that has the drawback that you need to test against a fully known distributionm and not one thqt you've estimated from the same data that you are testing goodness of fit on. However, Weibull is related to Extreme Value, and you might be able to get away with using the Lilliefors test as in LILLIETEST in that Statistics Toolbox.
My suggestion is always to _look_ at the fit too, an decide if it capture the data well. You've actually already done that with your "graphical fit". You might also want to look at the empirical CDF against the fitted Weibull CDF, and DFITTOOL will make that easy.
Hope this helps.
Take a look at a recent paper I published about a new method to
calculate goodness-of-fit:
Mohamed Al-Dabbagh