AR lags

Questions and discussions on Time Series Analysis
Snow
Posts: 5
Joined: Fri May 18, 2012 9:16 am

AR lags

Unread post by Snow »

Dear Tom:
I'm trying to get the best lags for my AR(p), and I'm wondering can I get that by using Varlagselect or there is some special program for AR model's lag. Thank you
Snow
Posts: 5
Joined: Fri May 18, 2012 9:16 am

Re: AR legs

Unread post by Snow »

I'm trying to forecasting my AR(p) and here is my code, qurterly GDP = qgdp, assuming the lag is 3 and I'm doing on-step forecast :

linreg qgdp
# constant qgdp{1 to 3}
uforecast(STATIC) fqgdp 2000:1 2011:4
@uforeerrors qgdp fqgdp

Am I right forecasting the gdp?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: AR legs

Unread post by TomDoan »

Snow wrote:Dear Tom:
I'm trying to get the best lags for my AR(p), and I'm wondering can I get that by using Varlagselect or there is some special program for AR model's lag. Thank you
You can, though there's also an @ARAUTOLAGS procedure that's specifically designed for autoregressions. Note, however, that @ARAUTOLAGS is designed for stationary processes, while @VARLAGSELECT allows non-stationary models.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: AR legs

Unread post by TomDoan »

Snow wrote:I'm trying to forecasting my AR(p) and here is my code, qurterly GDP = qgdp, assuming the lag is 3 and I'm doing on-step forecast :

linreg qgdp
# constant qgdp{1 to 3}
uforecast(STATIC) fqgdp 2000:1 2011:4
@uforeerrors qgdp fqgdp

Am I right forecasting the gdp?
That's correct. One-step ahead forecasts for QGDP.
Post Reply