DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Fitting a three-parameter Weibull - finding an optimal value of the location parameter

Hello,

 

I want to fit a three-parameter Weibull distribution to a set of data points. using the least squares method.  I plotted ln(-ln(1-p) against ln (x-c), where p is the cumulative probability and c the locaiton parameter of the Weibull, and used the regression funciton to fit a straight line. I now want to search for a value of c, say between0.5*min(x) and 0.75*min(x), that gives the highest coefficient of determinaiton. Is there a funciton which can do this or do I have to use some kind of loop?

 

Regards,

Josef

 

 

0 Kudos
Message 1 of 4
(4,260 Views)

Hi Josef,

 

I tried to recreate data like you described, but subtracting different c values from the x channel and plotting vs. ln(x-c) just shifted the curve horizontally.  It doesn't change the shape of the curve, so it can't change the validity of the least squares fit.

 

What am I missing?

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 4
(4,221 Views)

Hi Brad,

 

Thank you for your reply. This Matlab example explains exactly what I want to acheive (http://uk.mathworks.com/help/stats/examples/fitting-a-univariate-distribution-using-cumulative-proba... please  read the section A Threshold Parameter Example. I mangaed to write all the steps in DIADEM except for 

cHat = fminbnd(threshObj,.75*min(x), .9999*min(x));

The function fminbnd finds the minimum of the function threshObj  between .75*min(x) and .9999*min(x). 

 

Regards,

Josef

0 Kudos
Message 3 of 4
(4,219 Views)

Hi Josef,

 

I took another look at the curves I tried to create based on your description and noticed that though the general form of the curve doesn't change with the value of the "c" variable, the resulting slope of the linear fit does.

 

I think you're stuck with a loop,

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 4
(4,218 Views)