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
BasicStructuralExplanatory works only for s=12 (seasonality). (on StateSpaceModels v0.6.1)
julia>BasicStructuralExplanatory(rand(100), 12, rand(100, 2))
BasicStructuralExplanatory
julia>BasicStructuralExplanatory(rand(100), 10, rand(100, 2))
ERROR: ArgumentError: number of rows of each array must match (got (8, 8, 8, 10))
So, I fixed following code to work for other seasonality.
functionBasicStructuralExplanatory(y::Vector{Fl}, s::Int, X::Matrix{Fl}) where Fl
...
Z = [vcat([1; 0; 1; zeros(Fl, s -2)], X[t, :]) for t in1:num_observations]
T = [[
11zeros(Fl, 1, s -1) zeros(Fl, 1, num_exogenous)
01zeros(Fl, 1, s -1) zeros(Fl, 1, num_exogenous)
00-ones(Fl, 1, s -1) zeros(Fl, 1, num_exogenous)
zeros(Fl, s -2, 2) Matrix{Fl}(I, s -2, s -2) zeros(Fl, s -2) zeros(Fl, s -2, num_exogenous) # last was zeros(Fl, 10, num_exogenous)zeros(Fl, num_exogenous, s +1) Matrix{Fl}(I, num_exogenous, num_exogenous) # first was zeros(Fl, num_exogenous, 13)
] for _ in1:num_observations]
...
If this fix is right, I hope the code will be fixed.
The text was updated successfully, but these errors were encountered:
BasicStructuralExplanatory
works only for s=12 (seasonality). (on StateSpaceModels v0.6.1)So, I fixed following code to work for other seasonality.
If this fix is right, I hope the code will be fixed.
The text was updated successfully, but these errors were encountered: