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.2"
version = "2.0.3"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
6 changes: 3 additions & 3 deletions src/models/structural_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"],
Expand Down Expand Up @@ -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"],
Expand Down
Loading