Page 1 of 1

exponential Smoothing prevision sample fit reestimation

Posted: Sun Dec 11, 2016 12:59 pm
by c912
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.

Re: exponential Smoothing prevision sample fit reestimation

Posted: Sun Dec 11, 2016 2:26 pm
by TomDoan
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

Posted: Sun Dec 11, 2016 3:17 pm
by c912
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

Posted: Sun Dec 11, 2016 4:27 pm
by TomDoan
Use the FORECAST option on ESMOOTH.

Re: exponential Smoothing prevision sample fit reestimation

Posted: Mon Dec 12, 2016 3:12 am
by c912
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

Posted: Mon Dec 12, 2016 8:25 am
by TomDoan
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