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
Copy file name to clipboardExpand all lines: README.md
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ model_input = output.model_input # Model inputs that were utilized to bu
21
21
Create_X = output.Create_X # The function utilized to build the regression matrix.
22
22
X = output.X # High Dimension Regression utilized in the estimation.
23
23
coefs = output.coefs # High Dimension Regression coefficients estimated in the estimation.
24
-
ϵ= output.ϵ# Residuals of the model.
24
+
ε= output.ε# Residuals of the model.
25
25
fitted = output.fitted # Fit in Sample of the model.
26
26
components = output.components # Dictionary containing information about each component of the model, each component has the keys: "Values" (The value of the component in each timestamp) , "Coefs" (The coefficients estimated for each element of the component) and "Indexes" (The indexes of the elements of the component in the high dimension regression "X").
27
27
residuals_variances = output.residuals_variances # Dictionary containing the estimated variances for the innovations components (that is the information that can be utilized to initialize the state space model).
@@ -52,7 +52,7 @@ Current features include:
52
52
53
53
## Quick Examples
54
54
55
-
### Fittingand forecasting
55
+
### Fitting, forecasting and simulating
56
56
Quick example of fit and forecast for the air passengers time-series.
prediction_log = StateSpaceLearning.forecast(output, steps_ahead)# arguments are the output of the fitted model and number of steps ahead the user wants to forecast
69
69
prediction =exp.(prediction_log)
70
70
71
71
plot(airp.passengers, w=2 , color ="Black", lab ="Historical", legend =:outerbottom)
72
-
plot!(vcat(ones(output.T).*NaN, prediction), lab ="Forcast", w=2, color ="blue")
72
+
plot!(vcat(ones(length(log_air_passengers)).*NaN, prediction), lab ="Forecast", w=2, color ="blue")
73
+
74
+
N_scenarios =1000
75
+
simulation = StateSpaceLearning.simulate(output, 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
76
+
77
+
plot(airp.passengers, w=2 , color ="Black", lab ="Historical", legend =:outerbottom)
78
+
for s in1:N_scenarios-1
79
+
plot!(vcat(ones(length(log_air_passengers)).*NaN, exp.(simulation[:, s])), lab ="", α =0.1 , color ="red")
Copy file name to clipboardExpand all lines: docs/src/manual.md
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ model_input = output.model_input # Model inputs that were utilized to bu
21
21
Create_X = output.Create_X # The function utilized to build the regression matrix.
22
22
X = output.X # High Dimension Regression utilized in the estimation.
23
23
coefs = output.coefs # High Dimension Regression coefficients estimated in the estimation.
24
-
ϵ= output.ϵ# Residuals of the model.
24
+
ε= output.ε# Residuals of the model.
25
25
fitted = output.fitted # Fit in Sample of the model.
26
26
components = output.components # Dictionary containing information about each component of the model, each component has the keys: "Values" (The value of the component in each timestamp) , "Coefs" (The coefficients estimated for each element of the component) and "Indexes" (The indexes of the elements of the component in the high dimension regression "X").
27
27
residuals_variances = output.residuals_variances # Dictionary containing the estimated variances for the innovations components (that is the information that can be utilized to initialize the state space model).
@@ -52,7 +52,7 @@ Current features include:
52
52
53
53
## Quick Examples
54
54
55
-
### Fittingand forecasting
55
+
### Fitting, forecasting and simulating
56
56
Quick example of fit and forecast for the air passengers time-series.
prediction_log = StateSpaceLearning.forecast(output, steps_ahead)# arguments are the output of the fitted model and number of steps ahead the user wants to forecast
69
69
prediction =exp.(prediction_log)
70
70
71
71
plot(airp.passengers, w=2 , color ="Black", lab ="Historical", legend =:outerbottom)
72
-
plot!(vcat(ones(output.T).*NaN, prediction), lab ="Forcast", w=2, color ="blue")
72
+
plot!(vcat(ones(length(log_air_passengers)).*NaN, prediction), lab ="Forecast", w=2, color ="blue")
73
+
74
+
N_scenarios =1000
75
+
simulation = StateSpaceLearning.simulate(output, 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
76
+
77
+
plot(airp.passengers, w=2 , color ="Black", lab ="Historical", legend =:outerbottom)
78
+
for s in1:N_scenarios-1
79
+
plot!(vcat(ones(length(log_air_passengers)).*NaN, exp.(simulation[:, s])), lab ="", α =0.1 , color ="red")
0 commit comments