Forecasting using a LSTAR model

Discussion of models with structural breaks or endogenous switching.

Forecasting using a LSTAR model

Postby sousoubo085 » Wed Oct 21, 2009 4:18 pm

Hello,

I am wondering if it possible to use the forecast or step function in RATS to make one-step forecasts on a serie. The LSTAR model coefficients were estimated using this code :

com c3 = ip(155)
com gama = 1
frml g = (1+exp(-gama*(ip{1}-c3)))**-1

nonlin a0 a1 a2 b1 b2
com a0=0, a1=0, a2=0, b1=0, b2=0
frml set ip = a0+g*(a1*ip(t-1)+a2*IP(t-2))+(1-g)*(b1*ip(t-1)+b2*IP(t-2))

nlls(print,frml=set) ip nbeg nend80 r_lstar

Now, my intuition would be to use:

forecast (model=set, result=forecast_lstar) * 1 nend80+1

This, however does not work. Anyone has an idea?

I appreciate all insights! Thanks in advance
sousoubo085
 
Posts: 1
Joined: Tue Oct 20, 2009 8:13 pm

Re: Forecasting using a LSTAR model

Postby TomDoan » Mon Oct 26, 2009 1:24 pm

The first question is whether you even have to do anything other than

Code: Select all
set onestep = set(t)


Your formula gives the one-step forecasts directly.

If you're trying to do dynamic forecasts, you need to define a model with GROUP, even if that has just the one formula:

Code: Select all
group lstarmodel set
forecast(model=lstartmodel,...)


Don't include the "G" formula in the model. It's just a convenient way to do organize the calculation of the LSTAR model.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to Structural Breaks and Switching Models

Who is online

Users browsing this forum: No registered users and 1 guest