where is the pvalue of the model stored in fitlm or fitglm?
38 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Theo
el 26 de Oct. de 2014
Comentada: Guillermo Quintas
el 9 de Feb. de 2023
I'm looking for the model pvalue in comparison to the constant interception, not the variable pvalues. Thanks
0 comentarios
Respuesta aceptada
Dameng Yin
el 15 de Nov. de 2018
Editada: Dameng Yin
el 15 de Nov. de 2018
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 comentario
Adam Danz
el 15 de Mayo de 2019
And to get the f-statistic too,
[p,f] = coefTest(mdl);
Más respuestas (3)
yanarof foranay
el 28 de Sept. de 2018
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;
Tom Lane
el 27 de Oct. de 2014
Try this:
load hald
lm = fitlm(ingredients,heat)
lm.Coefficients.pValue(1)
Duijnhouwer
el 25 de Mzo. de 2016
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 comentarios
Ver también
Categorías
Más información sobre Analysis of Variance and Covariance en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!