ESMOOTH multi-step-ahead forecasts recursively
ESMOOTH multi-step-ahead forecasts recursively
Hi Tom,
How do I generate multi-step-ahead forecasts recursively using ESMOOTH, saving e.g. the 4th quarter forecasts, similar to using the SKIPSAVE option with FORECAST as in https://estima.com/ratshelp/index.html? ... ction.html ?
thanks,
Amarjit
How do I generate multi-step-ahead forecasts recursively using ESMOOTH, saving e.g. the 4th quarter forecasts, similar to using the SKIPSAVE option with FORECAST as in https://estima.com/ratshelp/index.html? ... ction.html ?
thanks,
Amarjit
Re: ESMOOTH multi-step-ahead forecasts recursively
SKIPSAVE is a shortcut for the manual placing of forecasts in the User's Guide.. You would use something like the first example on that page, but use ESMOOTH in place of the LINREG + UFORECAST combination.
Re: ESMOOTH multi-step-ahead forecasts recursively
Thanks for the reply.
If I run the following to save only the fifth forecast step from each recursive ESMOOTH
I get the following error:
## REG1. Cannot Execute Unless Preceded by a Completed Regression.
I do get estimates for ESMOOTH, the error occurs when I include uforecast and compute.
If I run the following to save only the fifth forecast step from each recursive ESMOOTH
Code: Select all
compute regstart = istart+1
clear yhat_ESMOOTH_y yhat_ESMOOTH_5_y
do regend = ibegin, iend
esmooth(estimate,print) y regstart regend
uforecast yhat_ESMOOTH_y regend+1 regend+5
compute yhat_ESMOOTH_5_y(regend+5) = yhat_ESMOOTH_y(regend+5)
end do regend
*
prin / y yhat_ESMOOTH_y yhat_ESMOOTH_5_y
## REG1. Cannot Execute Unless Preceded by a Completed Regression.
I do get estimates for ESMOOTH, the error occurs when I include uforecast and compute.
Re: ESMOOTH multi-step-ahead forecasts recursively
ESMOOTH in place of LINREG and UFORECAST.
Re: ESMOOTH multi-step-ahead forecasts recursively
I get forecasts with the following
However, if I try to get forecasts beyond the data period, e.g.
then I get an error
## MAT13. Store into out-of-range YHAT_ESMOOTH_5_Y(iend+1)
How do i get forecasts to iend+5?
Code: Select all
compute regstart = istart+1
clear yhat_ESMOOTH_y yhat_ESMOOTH_5_y
do regend = ibegin, iend-5
esmooth(estimate,noprint,forecast=yhat_ESMOOTH_y,steps=5) y regstart regend
compute yhat_ESMOOTH_5_y(regend+5) = yhat_ESMOOTH_y(regend+5)
end do regend
*
prin / y yhat_ESMOOTH_y yhat_ESMOOTH_5_y
Code: Select all
do regend = ibegin, iend
## MAT13. Store into out-of-range YHAT_ESMOOTH_5_Y(iend+1)
How do i get forecasts to iend+5?
Re: ESMOOTH multi-step-ahead forecasts recursively
Add the option LENGTH=IEND+5 to the CLEAR instruction.
clear(length=iend+5) yhat_ESMOOTH_y yhat_ESMOOTH_5_y
clear(length=iend+5) yhat_ESMOOTH_y yhat_ESMOOTH_5_y
Re: ESMOOTH multi-step-ahead forecasts recursively
Thanks - I now have forecasts to iend+5. It appears with ESMOOTH the multi-5-step ahead forecasts are not dynamic but static i.e. they are the 1-step ahead forecasts moved forward 5-periods, unlike dynamic forecasts in e.g. an AR(1) process. Correct?
Furthermore, as with clear(length=iend+h) using BOXJENK and/or LINREG I have daily seasonals (intercepts across the days of the week): mon, tue, wed, thu, fri, however I cannot generate forecasts beyond iend, which makes sense with irregular data but not with e.g. daily(5) as RATS ought to know the days of the week ahead. The use clear(length=iend+h) trick doesn't work, how do I generate forecasts beyond iend? Although, LINREG with just a constant I can generate forecasts beyond iend.
Furthermore, as with clear(length=iend+h) using BOXJENK and/or LINREG I have daily seasonals (intercepts across the days of the week): mon, tue, wed, thu, fri, however I cannot generate forecasts beyond iend, which makes sense with irregular data but not with e.g. daily(5) as RATS ought to know the days of the week ahead. The use clear(length=iend+h) trick doesn't work, how do I generate forecasts beyond iend? Although, LINREG with just a constant I can generate forecasts beyond iend.
Re: ESMOOTH multi-step-ahead forecasts recursively
If you do a SET instruction, by default it ends with the end of the data. If you need it to be defined longer than that (for a deterministic that you are using to forecast out of sample), you need the range on the SET to go to the end of the forecast range.
Re: ESMOOTH multi-step-ahead forecasts recursively
Hi Tom,
How do I calculate PI's using ESMOOTH - there is no STDERRS option?
thanks,
Amarjit
How do I calculate PI's using ESMOOTH - there is no STDERRS option?
thanks,
Amarjit
Re: ESMOOTH multi-step-ahead forecasts recursively
The ESMOOTH models which are strictly linear (no exponential trend, no multiplicative seasonal) are just special cases of ARIMA models and the standard errors of forecast can be computed using those. (They also can be written in state space form and the state-space calculations can be used). Models that have a non-linear form have no closed form for the standard errors of forecast.
Thomas Fomby has a hand out which has the standard errors for the most common (linear) models:
https://s2.smu.edu/tfomby/eco5375/data/ ... ELS_V6.pdf
These aren't commonly discussed because
(a) not all models have a closed form for this
(b) exponential smoothing models are not intended to be descriptions of the process but just simple models which capture the main features of the data. Standard error calculations are computed assuming the model is correct.
Thomas Fomby has a hand out which has the standard errors for the most common (linear) models:
https://s2.smu.edu/tfomby/eco5375/data/ ... ELS_V6.pdf
These aren't commonly discussed because
(a) not all models have a closed form for this
(b) exponential smoothing models are not intended to be descriptions of the process but just simple models which capture the main features of the data. Standard error calculations are computed assuming the model is correct.
Re: ESMOOTH multi-step-ahead forecasts recursively
Understood traditionally ESMOOTH are aimed for point forecasts.
As per RATS 10 UG Section 16.9, p.540, I could bootstrap ESMOOTH forecast sample paths, and then compute the PI's as in viewtopic.php?f=33&t=3581 i.e. fractile method - which would be assuming the distribution of forecasts is not normal. Right?
As per RATS 10 UG Section 16.9, p.540, I could bootstrap ESMOOTH forecast sample paths, and then compute the PI's as in viewtopic.php?f=33&t=3581 i.e. fractile method - which would be assuming the distribution of forecasts is not normal. Right?