You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prediction_log =StateSpaceLearning.forecast(model, steps_ahead) # arguments are the output of the fitted model and number of steps ahead the user wants to forecast
76
+
prediction_log =forecast(model, steps_ahead) # arguments are the output of the fitted model and number of steps ahead the user wants to forecast
simulation =StateSpaceLearning.simulate(model, steps_ahead, N_scenarios) # arguments are the output of the fitted model, number of steps ahead the user wants to forecast and number of scenario paths
85
+
simulation =simulate(model, steps_ahead, N_scenarios) # arguments are the output of the fitted model, number of steps ahead the user wants to forecast and number of scenario paths
Note that the model was able to capture both seasonalities in this case.
117
+
Note that the model was able to capture both seasonalities in this case.
118
+
119
+
## Dynamic Exogenous Coefficients
120
+
121
+
Dynamic exogenous coefficients allow the effect of exogenous variables to vary over time with specific patterns (e.g., level, slope, seasonal or cyclical). This is configured through the `dynamic_exog_coefs` parameter in the StructuralModel constructor.
122
+
123
+
The `dynamic_exog_coefs` parameter accepts a vector of tuples, where each tuple contains:
124
+
- First element: A vector of an exogenous variable
125
+
- Second element: The name of the component that the exogenous variable will be associated with
126
+
- Third element (optional): For the seasonal component, the freq_seasonal parameter and for cycle component, the cycle_period parameter.
127
+
128
+
For example:
129
+
```julia
130
+
# Make X1's effect vary annually and X2's effect vary semi-annually
The package currently supports the implementation of the StructuralModel. If you have suggestions for additional models to include, we encourage you to contribute by opening an issue or submitting a pull request.
26
+
The package currently supports the implementation of the StructuralModel, which includes capabilities for handling dynamic exogenous coefficients. If you have suggestions for additional models to include, we encourage you to contribute by opening an issue or submitting a pull request.
27
+
28
+
```
29
+
30
+
When using dynamic coefficients:
31
+
- The model will create time-varying coefficients for each specified exogenous variable
32
+
- Each coefficient will follow the specified cyclical pattern
33
+
- When forecasting, you must provide future values for exogenous variables using the `Exogenous_Forecast` parameter
27
34
28
35
```@docs
29
36
StateSpaceLearning.StructuralModel
@@ -39,7 +46,11 @@ StateSpaceLearning.fit!
39
46
40
47
## Forecasting and Simulating
41
48
42
-
The package has functions to make point forecasts multiple steps ahead and to simulate scenarios based on those forecasts. These functions are implemented both for the univariate and to the multivariate cases.
49
+
The package has functions to make point forecasts multiple steps ahead and to simulate scenarios based on those forecasts. These functions are implemented for both univariate and multivariate cases, with support for exogenous variables and dynamic coefficients.
50
+
51
+
When using models with exogenous variables:
52
+
- For standard exogenous variables, provide future values using the `Exogenous_Forecast` parameter
53
+
- For dynamic coefficients, use the same `Exogenous_Forecast` parameter with values for each exogenous variable
0 commit comments