# Fitting a Grafted Distribution

3 Ansichten (letzte 30 Tage)
Ephraim Bryski am 16 Jun. 2021
Kommentiert: Ephraim Bryski am 18 Jun. 2021
Hi. I would like to fit data to a grafted normal-weibull distribution.
The red line is a normal distribution and the blue line is a weibull distribution.
The grafting point between the normal and weibulll distribution must share the same value and slope on both sides. This gives two equations. There are four parameters (a and b for the weibull distribution, and alpha and sigma for the normal distribution).
My current approach is to use fminunc to find values of mu and sigma which minizime the square error. The values of a and b are solved for with vpasolve using the two constraints, and the error is computed.
This works fairly well (it was how I created the figure); however it often hits an error when vpasolve is unable to find values for a and b.
Is there a better approach?
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Antworten (1)

Sulaymon Eshkabilov am 16 Jun. 2021
Maybe chop off the long tails on both sides and then perform the calcs even if that influences on the accuracy a bit.
##### 1 Kommentar-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden
Ephraim Bryski am 18 Jun. 2021
What would it mean to chop off the tails? The only points on the distribution which are used are at the x values of the data to compute the square error.

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Weibull Distribution finden Sie in Help Center und File Exchange

R2020a

### Community Treasure Hunt

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

Start Hunting!

Translated by