Python中的StructureBreak测试(Zivot和Andrews)

2024-10-01 10:21:44 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个叫做Y_t的时间序列,我想对它应用Zivot-Andrews结构断裂单位根测试。在中,在statsmodels模块(statsmodels.tsa.stattools.zivot_andrews)中找到了用于该模块的命令;然而,我不知道如何使用它。我在statsmodels page中搜索了示例和文档,但仍然找不到如何实现此测试

到目前为止我有

import numpy as np
import pandas as pd 
import statsmodels.api as sm
import statsmodels.formula.api as smf
    
# Random time serie
periods = 7 * 24 * 60
tidx = pd.date_range('2016-07-01', periods=periods, freq='T')
data = np.random.randn(periods)
ts = pd.Series(data=data, index=tidx, name='HelloTimeSeries')

# The command for the test, which I don't know how to use    
sm.tsa.stattools.zivot_andrews 



  [1]: https://www.statsmodels.org/stable/generated/statsmodels.tsa.stattools.zivot_andrews.html
  [2]: https://www.statsmodels.org/

Tags: 模块importapidataasnppdsm