[英]How to extract the F statistic and the P value from results.f_test in statsmodels python
我运行OLS.fit()并使用拟合的模型来获取特定类别的f值,例如在ANCOVA中。
res = OLS.fit()
R = [[0,1,0], [0,0,1]]
res.f_test(R)
结果的形式为
<F test: F=array([[ 2.21065884]]), p=[[ 0.10971892]], df_denom=5918, df_num=2>
如何从这种格式中获取F数组和p值? 甚至有可能吗?
分配结果以存储它,然后检查属性。
fres = res.f_test(R)
dir(fres)
fres.fvalue
fres.pvalue
或类似,因为我正在使用statsmodels master
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.