- #1

- 325

- 51

- TL;DR Summary
- I want to fit a normal-Weibull grafted distribution to a set of data.

I have a set of data (representing the strength distribution of samples), and I would like to fit a normal-Weibull grafted distribution. To the left of a specified graft point, the distribution is Weibull, and to the right it's normal. At the graft point, the value and the first derivative are equal on the two sides.

I'm currently using MATLAB to fit the data. Parameter ##a## and ##b## for the Weibull distribution are selected, and the values for ##\mu## and ##\sigma## for the normal distribution are solved for using the two constraints. The square error between the data and the distribution is computed. ##a## and ##b## are adjusted to minimize the error.

This approach for the first several iterations is effective. However, at some values for ##a## and ##b##, solving for ##\mu## and ##\sigma## returns no value, causing the iterations to end in an error (I tried avoiding this by ignoring the empty result, but it fails to converge when I do this).

Is there a way of adjusting parameters which would guarantee a grafted distribution regardless the values the parameters take? Is there an alternative approach?

Thank you!

I'm currently using MATLAB to fit the data. Parameter ##a## and ##b## for the Weibull distribution are selected, and the values for ##\mu## and ##\sigma## for the normal distribution are solved for using the two constraints. The square error between the data and the distribution is computed. ##a## and ##b## are adjusted to minimize the error.

This approach for the first several iterations is effective. However, at some values for ##a## and ##b##, solving for ##\mu## and ##\sigma## returns no value, causing the iterations to end in an error (I tried avoiding this by ignoring the empty result, but it fails to converge when I do this).

Is there a way of adjusting parameters which would guarantee a grafted distribution regardless the values the parameters take? Is there an alternative approach?

Thank you!