diff --git a/Project.toml b/Project.toml index 22b9080..d123464 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "StateSpaceLearning" uuid = "971c4b7c-2c4e-4bac-8525-e842df3cde7b" authors = ["andreramosfc "] -version = "2.0.2" +version = "2.0.3" [deps] Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" diff --git a/src/models/structural_model.jl b/src/models/structural_model.jl index 3abb8ed..e834fab 100644 --- a/src/models/structural_model.jl +++ b/src/models/structural_model.jl @@ -1080,7 +1080,7 @@ function get_trend_decomposition( trend[1] = 0.0 end - if model.stochastic_level + if model.stochastic_level && !isempty(components["ξ"]["Coefs"]) ξ = vcat(zeros(max(2, model.stochastic_start) - 1), components["ξ"]["Coefs"], 0.0) @assert length(ξ) == T else @@ -1119,7 +1119,7 @@ function get_slope_decomposition( slope[1] = 0.0 end - if model.stochastic_slope + if model.stochastic_slope && !isempty(components["ζ"]["Coefs"]) ζ = vcat( zeros(max(2, model.stochastic_start)), components["ζ"]["Coefs"], @@ -1163,7 +1163,7 @@ function get_seasonal_decomposition( seasonal[1:s] = zeros(AbstractFloat, s) end - if model.stochastic_seasonal + if model.stochastic_seasonal && !isempty(components["ω_$(s)"]["Coefs"]) ω = vcat( zeros(s - 1 + max(0, max(2, model.stochastic_start) - s)), components["ω_$(s)"]["Coefs"],