where is the pvalue of the model stored in fitlm or fitglm?
조회 수: 38 (최근 30일)
이전 댓글 표시
I'm looking for the model pvalue in comparison to the constant interception, not the variable pvalues. Thanks
댓글 수: 0
채택된 답변
Dameng Yin
2018년 11월 15일
편집: Dameng Yin
2018년 11월 15일
I had the same question. While looking for the answer online, I found the answer to this from here: StackOverflow.
This would work for fitlm as well:
p = coefTest(mdl);
I'm using Matlab 2018a. Not sure if the function is available in previous versions.
Best.
댓글 수: 1
추가 답변 (3개)
yanarof foranay
2018년 9월 28일
This answer may come a bit late, but at least it can help people that google the same problem (like me):
The p-value of the F-statistic vs. constant model (for the fitglm) can be retrieved like this:
pVal = RL_Model.devianceTest.pValue;
Duijnhouwer
2016년 3월 25일
This works (Matlab 2015b):
load hald
M=fitlm(ingredients,heat)
T=anova(M,'summary')
F=table2array(T(2,4))
pValue=table2array(T(2,5))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Analysis of Variance and Covariance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!