Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "StateSpaceLearning"
uuid = "971c4b7c-2c4e-4bac-8525-e842df3cde7b"
authors = ["andreramosfc <[email protected]>"]
version = "2.0.9"
version = "2.0.10"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
10 changes: 5 additions & 5 deletions src/models/structural_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ mutable struct StructuralModel <: StateSpaceLearningModel

@assert !has_intercept(exog) "Exogenous matrix must not have an intercept column"
@assert 1 <= stochastic_start < length(y) "stochastic_start must be greater than or equal to 1 and smaller than the length of the time series"
@assert level in ["deterministic", "stochastic", "none"] "level must be either deterministic, stochastic or no"
@assert slope in ["deterministic", "stochastic", "none"] "slope must be either deterministic, stochastic or no"
@assert seasonal in ["deterministic", "stochastic", "none"] "seasonal must be either deterministic, stochastic or no"
@assert cycle in ["deterministic", "stochastic", "none"] "cycle must be either deterministic, stochastic or no"
@assert level in ["deterministic", "stochastic", "none"] "level must be either deterministic, stochastic or none"
@assert slope in ["deterministic", "stochastic", "none"] "slope must be either deterministic, stochastic or none"
@assert seasonal in ["deterministic", "stochastic", "none"] "seasonal must be either deterministic, stochastic or none"
@assert cycle in ["deterministic", "stochastic", "none"] "cycle must be either deterministic, stochastic or none"
@assert seasonal != "none" ? length(y) > minimum(freq_seasonal) : true "Time series must be longer than the seasonal period if seasonal is added"

if typeof(freq_seasonal) <: Vector
Expand Down Expand Up @@ -1591,7 +1591,7 @@ function simulate_states(
)
end

model.slope ? slope = ones(T, N_scenarios) .* slope : nothing
slope = ones(T, N_scenarios) .* slope
model.level ? trend = ones(T, N_scenarios) .* trend : nothing
model.seasonal ? seasonals = [ones(T, N_scenarios) .* s for s in seasonals] : nothing
for t in (T + 1):(T + steps_ahead)
Expand Down
Loading