where is the pvalue of the model stored in fitlm or fitglm?
39 次查看(过去 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!