exponential Smoothing prevision sample fit reestimation

Questions and discussions on Time Series Analysis
c912
Posts: 13
Joined: Sat Dec 03, 2016 3:41 am

exponential Smoothing prevision sample fit reestimation

Unread post 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.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: exponential Smoothing prevision sample fit reestimation

Unread post by TomDoan »

That's not how ESMOOTH works. The forecasts are done on a single command along with the estimation. See the examples.
c912
Posts: 13
Joined: Sat Dec 03, 2016 3:41 am

Re: exponential Smoothing prevision sample fit reestimation

Unread post 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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: exponential Smoothing prevision sample fit reestimation

Unread post by TomDoan »

Use the FORECAST option on ESMOOTH.
c912
Posts: 13
Joined: Sat Dec 03, 2016 3:41 am

Re: exponential Smoothing prevision sample fit reestimation

Unread post 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.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: exponential Smoothing prevision sample fit reestimation

Unread post 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
Post Reply