How can I get F and p-value after regression?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Panos Ale
am 13 Jun. 2017
Kommentiert: Star Strider
am 14 Jun. 2017
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?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 13 Jun. 2017
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Model Building and Assessment finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!