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

 채택된 답변

Star Strider
Star Strider 2020년 9월 8일

0 개 추천

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

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 2020년 9월 8일
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 2020년 9월 15일
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 2020년 9월 15일
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 2020년 9월 15일
Indeed. Thanks for the help.
Star Strider
Star Strider 2020년 9월 15일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품

릴리스

R2020a

질문:

2020년 9월 8일

댓글:

2020년 9월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by