use of signtest function

조회 수: 17 (최근 30일)
Liping Ai
Liping Ai 2019년 11월 12일
답변: Liping Ai 2019년 11월 15일
In the two examples for the signtest function of non-parametric estimation in matlab shown in https://www.mathworks.com/help/stats/signtest.html#bti4471-7, the p-values do not affect the hypothesis tesing outcome. Is this correct? Please help with a clarification if you used it often, it is very much appreciated. AUSER

채택된 답변

Star Strider
Star Strider 2019년 11월 12일
From the documentation:
[p,h] = signtest(___) also returns a logical value indicating the test decision. The value h = 1 indicates a rejection of the null hypothesis, and h = 0 indicates a failure to reject the null hypothesis at the 5% significance level.
Also see the documentation for h.
  댓글 수: 5
Walter Roberson
Walter Roberson 2019년 11월 13일
You can examine the code
edit signtest
Near the end you will see
h = (p<=alpha);
Star Strider
Star Strider 2019년 11월 13일
@Walter — Thank you!

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

추가 답변 (2개)

Liping Ai
Liping Ai 2019년 11월 13일
The error is with the example not the code then, could be a typo with the documentation. Thank you!

Liping Ai
Liping Ai 2019년 11월 15일
The code in the last answer pinpoints the error location and nature.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by