@@ -1104,22 +1104,22 @@ class TimeSeasonality(Component):
1104
1104
In this model, the state vector is defined as:
1105
1105
1106
1106
.. math::
1107
- \alpha_t :=(\gamma_t, \ldots, \gamma_{t-d(s-1)+1}), \quad t \ge 1 .
1107
+ \alpha_t :=(\gamma_t, \ldots, \gamma_{t-d(s-1)+1}), \quad t \ge 0 .
1108
1108
1109
1109
This vector has length :math:`d(s-1)`, where:
1110
1110
1111
1111
- :math:`s` is the ``seasonal_length`` parameter, and
1112
1112
- :math:`d` is the ``duration`` parameter.
1113
1113
1114
- The components of the initial vector :math:`\alpha_{1 }` are given by
1114
+ The components of the initial vector :math:`\alpha_{0 }` are given by
1115
1115
1116
1116
.. math::
1117
- \gamma_{1 -l} := \tilde{\gamma}_{1+ k_l}, \quad \text{where} \quad k_l := \left\lfloor \frac{l}{d} \right\rfloor \bmod s \quad \text{and} \quad l=0,\ldots, d(s-1)-1.
1117
+ \gamma_{-l} := \tilde{\gamma}_{k_l}, \quad \text{where} \quad k_l := \left\lfloor \frac{l}{d} \right\rfloor \bmod s \quad \text{and} \quad l=0,\ldots, d(s-1)-1.
1118
1118
1119
1119
Here, the values
1120
1120
1121
1121
.. math::
1122
- \tilde{\gamma}_{1 }, \ldots, \tilde{\gamma}_{s-1 },
1122
+ \tilde{\gamma}_{0 }, \ldots, \tilde{\gamma}_{s-2 },
1123
1123
1124
1124
represent the initial seasonal states. The transition matrix of this model is the :math:`d(s-1) \times d(s-1)` matrix
1125
1125
@@ -1139,17 +1139,17 @@ class TimeSeasonality(Component):
1139
1139
In contrast, the state vector in the second model is defined as:
1140
1140
1141
1141
.. math::
1142
- \alpha_t=(\gamma_t, \ldots, \gamma_{t-ds+1}), \quad t \ge 1 .
1142
+ \alpha_t=(\gamma_t, \ldots, \gamma_{t-ds+1}), \quad t \ge 0 .
1143
1143
1144
- This vector has length :math:`ds`. The components of the initial state vector :math:`\alpha_{1 }` are defined similarly:
1144
+ This vector has length :math:`ds`. The components of the initial state vector :math:`\alpha_{0 }` are defined similarly:
1145
1145
1146
1146
.. math::
1147
- \gamma_{1 -l} := \tilde{\gamma}_{1+ k_l}, \quad \text{where} \quad k_l := \left\lfloor \frac{l}{d} \right\rfloor \bmod s \quad \text{and} \quad l=0,\ldots, ds-1.
1147
+ \gamma_{-l} := \tilde{\gamma}_{k_l}, \quad \text{where} \quad k_l := \left\lfloor \frac{l}{d} \right\rfloor \bmod s \quad \text{and} \quad l=0,\ldots, ds-1.
1148
1148
1149
- In this case, the initial seasonal states are required to satisfy the following condition:
1149
+ In this case, the initial seasonal states :math:`\tilde{\gamma}_{0}, \ldots, \tilde{\gamma}_{s-1}` are required to satisfy the following condition:
1150
1150
1151
1151
.. math::
1152
- \sum_{i=1 }^{s} \tilde{\gamma}_{i} = 0.
1152
+ \sum_{i=0 }^{s-1 } \tilde{\gamma}_{i} = 0.
1153
1153
1154
1154
The transition matrix of this model is the following :math:`ds \times ds` circulant matrix:
1155
1155
@@ -1163,8 +1163,9 @@ class TimeSeasonality(Component):
1163
1163
\end{bmatrix}
1164
1164
1165
1165
To give interpretation to the :math:`\gamma` terms, it is helpful to work through the algebra for a simple
1166
- example. Let :math:`s=4`, :math:`d=1`, and omit the shock term. Define initial conditions :math:`\tilde{\gamma}_0, \tilde{\gamma}_{1},
1167
- \tilde{\gamma}_{2}`. The value of the seasonal component for the first 5 timesteps will be:
1166
+ example. Let :math:`s=4`, :math:`d=1`, ``remove_first_state=True``, and omit the shock term. Then, we have
1167
+ :math:`\gamma_{-i} = \tilde{\gamma}_{-i}`, for :math:`i=-2,\ldots, 0` and the value of the seasonal component
1168
+ for the first 5 timesteps will be:
1168
1169
1169
1170
.. math::
1170
1171
\begin{align}
0 commit comments