Skip to content

Commit e098c19

Browse files
committed
Update forecast method to use new state space filter
1 parent 7d768fb commit e098c19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interface.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ Forecast `periods` ahead using the dynamic factor model `model`.
413413
"""
414414
function forecast(model::DynamicFactorModel, periods::Integer)
415415
# filter
416-
(a, _, v, _, K) = filter(model)
416+
(a, _, _, _) = filter(model, predict = true)
417417
a_hat = similar(a[end])
418418
forecasts = similar(data(model), size(model)[1], periods)
419419

@@ -423,7 +423,7 @@ function forecast(model::DynamicFactorModel, periods::Integer)
423423
# forecast
424424
for h in 1:periods
425425
if h == 1
426-
a_hat .= dynamics(model) * a[end] + K[end] * v[end]
426+
a_hat .= a[end]
427427
else
428428
a_hat .= dynamics(model) * a_hat
429429
end

0 commit comments

Comments
 (0)