How can I get F and p-value after regression?

조회 수: 1 (최근 30일)
Panos Ale
Panos Ale 2017년 6월 13일
댓글: Star Strider 2017년 6월 14일
After using the command lsline I got the the regression line that I wanted! But How can I see the statistics of the regression?How do I get the F and P-values?

채택된 답변

Star Strider
Star Strider 2017년 6월 13일
The lsline function does not give you any information on the fit.
It even takes a bit of effort to get the slope and intercept:
figure(1)
scatter(1:10, rand(1, 10))
hl = lsline;
B = [ones(size(hl.XData(:))), hl.XData(:)]\hl.YData(:);
Slope = B(2)
Intercept = B(1)
You need to use the Statistics and Machine Learning Toolbox regress function to get the information you want.
  댓글 수: 5
Panos Ale
Panos Ale 2017년 6월 14일
Anyway Thanks!
Star Strider
Star Strider 2017년 6월 14일
Our pleasure!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Model Building and Assessment에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by