Python tfcausalimpact:如何访问 p 值?

问题描述 投票:0回答:1

我正在使用 tfcausalimpact (https://github.com/WillianFuks/tfcausalimpact)。

当我运行分析时,我知道我可以通过实例化模型来访问 p 值

ci = CausalImpact(data,pre_period,post_period)

ci.summary()

但这给出了一个完整的文本摘要,我想将 P 值保存为变量。我该怎么做?

python p-value attribution
1个回答
0
投票

我在文档中找不到答案。然而,在源代码的这一行上,

CausalImpact.summary
方法将
self.p_value
传递给另一个函数。因此,在您的代码中,您应该能够使用
ci.p_value
以编程方式访问它。

© www.soinside.com 2019 - 2024. All rights reserved.