ParmHat not returning shape parameter

Hello,
I'm new to MATLAB and statistics, but have been trying to estimate my parameters for a weibull distribution of a set of value. When I run the command parmHat=wblfit(x), it should technically return both scale and shape parameter, but its returning only the former. Why is it so?
My x data= [221447,277196,464274,565756,463453,564535,653655,564354,576124,567234,896453] fro example.
Regards

 Respuesta aceptada

Star Strider
Star Strider el 8 de Sept. de 2020
It returns both parameters for me (in R2020a, Update 5):
data= [221447,277196,464274,565756,463453,564535,653655,564354,576124,567234,896453];
parmHat = wblfit(data);
Shape = parmHat(1)
Scale = parmHat(2)
producing:
Shape =
588194.482822158
Scale =
3.35979418647355
.

6 comentarios

Chaman Srivastava
Chaman Srivastava el 8 de Sept. de 2020
Hello,
Thank you very much for the swift response.
I'm updating mine to R2020a, Update 5 now. But the command runs on the older version as well.
I still don't understand that why the function parmHat=wblfit(data) doesn't return both scale and shape parameter which is contrary to what is mentioned in Matlab manual https://se.mathworks.com/help/stats/wblfit.html? Any insights on this?
Star Strider
Star Strider el 8 de Sept. de 2020
My pleasure!
The wblfit function returns both, as my code demonstrates. (See the documentation for details.) They are both returned as elements of the same output vector, ‘parmHat’ in my code. They are not returned as separate outputs, as is true for normfit, for example.
Chaman Srivastava
Chaman Srivastava el 15 de Sept. de 2020
Thanks again! Just a small comment for people reading this answer:
output 1 is scale parameter and output 2 is shape! :)
Star Strider
Star Strider el 15 de Sept. de 2020
The documentationi is a bit confusing in that regard:
  • parmHat = wblfit(x) returns the estimates of Weibull distribution parameters (shape and scale), given the sample data in x.
I assumed that they were in that order, although in Output Arguments, parmHat states:
  • Estimate of the parameters a (scale) and b (shape) of the Weibull distribution, returned as a row vector.
Reading further in the documentation is always beneficial!
Chaman Srivastava
Chaman Srivastava el 15 de Sept. de 2020
Indeed. Thanks for the help.
Star Strider
Star Strider el 15 de Sept. de 2020
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Versión

R2020a

Preguntada:

el 8 de Sept. de 2020

Comentada:

el 15 de Sept. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by