exponential Smoothing prevision sample fit reestimation
exponential Smoothing prevision sample fit reestimation
Hello,
I try to make a prevision with an exponential smoothing but I have a probleme with the sample fit with reestimation prevision.
For the prevision I do:
do time = prevstart,prevend-stepsahead
esmooth(trend=exponential,estimate, resids=resexo2,fitted=forecast1) ev 1960:1 *
forecast(model= ?????,from=time+1,to=time+stepsahead,stderrs=stderrs11,noprint, results=fore18)
compute rhat1(time+stepsahead)=fore18(1)(time+stepsahead)
end do
set prevmod2 1969:01 2014:01 = rhat1
But I don't know how to make a define in my exponnetial smoothing, so I can't call a model in my forecast.
I try to make a prevision with an exponential smoothing but I have a probleme with the sample fit with reestimation prevision.
For the prevision I do:
do time = prevstart,prevend-stepsahead
esmooth(trend=exponential,estimate, resids=resexo2,fitted=forecast1) ev 1960:1 *
forecast(model= ?????,from=time+1,to=time+stepsahead,stderrs=stderrs11,noprint, results=fore18)
compute rhat1(time+stepsahead)=fore18(1)(time+stepsahead)
end do
set prevmod2 1969:01 2014:01 = rhat1
But I don't know how to make a define in my exponnetial smoothing, so I can't call a model in my forecast.
Re: exponential Smoothing prevision sample fit reestimation
That's not how ESMOOTH works. The forecasts are done on a single command along with the estimation. See the examples.
Re: exponential Smoothing prevision sample fit reestimation
But I can't use fitted beacause I want to put diferent step for the in sample and not the out of sample
Re: exponential Smoothing prevision sample fit reestimation
Use the FORECAST option on ESMOOTH.
Re: exponential Smoothing prevision sample fit reestimation
Sorry, I think I'm not clear. For the prevision out of sample I use Forecasts and steps, and for the prevision in sample I use FItted. But with fitted I can't use steps, so I can't define how step I want for my in sample prevision.
Re: exponential Smoothing prevision sample fit reestimation
You use the FORECAST option to get the forecasts then pull the information out, as in:
Code: Select all
do time = prevstart,prevend-stepsahead
esmooth(trend=exponential,estimate, resids=resexo2,fitted=forecast1,forecast=fore18,steps=stepsahead) ev 1960:1 *
compute rhat1(time+stepsahead)=fore18(time+stepsahead)
end do