【问题标题】:Differencing terms not showing in statsmodels SARIMAX summarystatsmodels SARIMAX 摘要中未显示差异术语
【发布时间】:2021-03-26 01:29:17
【问题描述】:

Statsmodels 包含用于季节性时间序列分析的 SARIMAX。在尝试实施该方法时,我对摘要中缺少差异/积分术语感到困惑。例如,这在documentation itself 的示例中可见。我在哪里可以找到与d 参数对应的系数?我只能看到 AR 系数和 MA 系数。

下面是我的意思的一个例子。我期待添加???

                                       SARIMAX Results                                       
=============================================================================================
Dep. Variable:                                 Value   No. Observations:                 1680
Model:             SARIMAX(2, 2, 2)x(1, 1, [1], 168)   Log Likelihood                3705.949
Date:                               Tue, 15 Dec 2020   AIC                          -7397.898
Time:                                       17:08:28   BIC                          -7361.500
Sample:                                            0   HQIC                         -7384.261
                                              - 1680                                         
Covariance Type:                                 opg                                         
==============================================================================
                 coef    std err          z      P>|z|      [0.025      0.975]
------------------------------------------------------------------------------
ar.L1         -0.6993      0.609     -1.149      0.251      -1.893       0.494
ar.L2          0.0913      0.058      1.570      0.116      -0.023       0.205
in.L1 = ???
in.L2 = ???
ma.L1         -0.1994      0.685     -0.291      0.771      -1.542       1.144
ma.L2         -0.8003      0.654     -1.224      0.221      -2.081       0.481
ar.S.L168     -0.1656      0.029     -5.779      0.000      -0.222      -0.109
in.S.L168 = ???
ma.S.L168     -0.6969      0.031    -22.498      0.000      -0.758      -0.636
sigma2         0.0002   6.32e-05      3.298      0.001    8.45e-05       0.000
===================================================================================
Ljung-Box (L1) (Q):                   0.05   Jarque-Bera (JB):                23.49
Prob(Q):                              0.82   Prob(JB):                         0.00
Heteroskedasticity (H):               0.87   Skew:                             0.09
Prob(H) (two-sided):                  0.13   Kurtosis:                         3.63
===================================================================================

Warnings:
[1] Covariance matrix calculated using the outer product of gradients (complex-step).
Backend GTK3Agg is interactive backend. Turning interactive mode on.

【问题讨论】:

    标签: python python-3.x time-series statsmodels


    【解决方案1】:

    这些是模型的一部分,可以使用res.model 访问,然后使用orderseasonal_order

    import statsmodels.tsa.api as tsa
    import numpy as np
    
    gen = np.random.default_rng()
    
    mod = tsa.SARIMAX(gen.standard_normal(1000),order=(2,1,1),seasonal_order=(1,1,1,12))
    res = mod.fit()
    
    print(res.model.order)
    print(res.model.seasonal_order)
    
    print(f"The differencing order (d) is {res.model.order[1]}")
    print(f"The seasonal differencing order (D) is {res.model.seasonal_order[1]}")
    print(f"The seasonal period {res.model.seasonal_order[-1]}")
    

    哪个输出

    The differencing order (d) is 1
    The seasonal differencing order (D) is 1
    The seasonal period 12
    

    【讨论】:

    • 感谢您的回答。然而,我正在寻找的是分配给差分项的系数。为了清楚起见,我编辑了我的问题。
    • 我认为问题的核心可能是我对 SARIMA 模型的错误解释。感谢您的努力
    • 我认为你是对的。 d 和 D 是类似于 AR 订单和 MA 订单的参数,并且不是估计的。它们没有估计的系数。当您将 d 或 D 设置为高于零时,您实际上是在添加具有固定参数 1 的附加 AR 项(如 (1-L) 中的非季节性差异)。
    猜你喜欢
    • 2018-09-03
    • 2021-09-20
    • 1970-01-01
    • 2023-01-29
    • 1970-01-01
    • 2017-07-24
    • 1970-01-01
    • 1970-01-01
    • 2012-12-24
    相关资源
    最近更新 更多