statsmodels.tsa.arima.model.ARIMAResults.t_test_pairwise¶
-
ARIMAResults.t_test_pairwise(term_name, method=
'hs', alpha=0.05, factor_labels=None)¶ 执行成对t检验,并使用多重检验校正p值。
这使用了公式 design_info 编码对比矩阵,并且应该适用于所有主效应的编码。
- Parameters:¶
- Returns:¶
MultiCompResult结果存储为属性,主要属性如下两个。其他属性为调试目的或作为背景信息添加。
result_frame : 包含t检验结果和多重检验校正p值的pandas DataFrame。
contrasts : 零假设在 t_test 中的约束矩阵。
注释
状态:实验性。目前仅检查了有无指定参考水平的处理编码。
目前没有可用的多重检验校正置信区间。
示例
>>> res = ols("np.log(Days+1) ~ C(Weight) + C(Duration)", data).fit() >>> pw = res.t_test_pairwise("C(Weight)") >>> pw.result_frame coef std err t P>|t| Conf. Int. Low 2-1 0.632315 0.230003 2.749157 8.028083e-03 0.171563 3-1 1.302555 0.230003 5.663201 5.331513e-07 0.841803 3-2 0.670240 0.230003 2.914044 5.119126e-03 0.209488 Conf. Int. Upp. pvalue-hs reject-hs 2-1 1.093067 0.010212 True 3-1 1.763307 0.000002 True 3-2 1.130992 0.010212 True
Last update:
Oct 16, 2024