Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: ARIMA postestimation/ Dynamic forecasting with AR(12) model


From   "Michael Crain" <[email protected]>
To   [email protected]
Subject   st: ARIMA postestimation/ Dynamic forecasting with AR(12) model
Date   Wed, 30 May 2007 19:09:42 -0400

I am having trouble with the syntax with the postestimation of an AR(12) model (using monthly data).

My various data sets (balanced and unbalanced) look like this:

Sales_amt Yr_mo
$xxxxx 2002m1
$xxxxx 2002m2
$xxxxx 2002m3
.... ...
$xxxx 2005m10

My AR(12) model runs through 2004m8 (not 2005m10). I want to predict what Sales_amt would have been starting 2004m9 using Dynamic forecasting. Accordingly, I have done the following:


-- arima sales if tin( , 2004m8), ar(12) --

(output ommitted)

I am having trouble with the syntax for the Dynamic forecasting. I want the dynamic forecasting to begin with the forecast for 2004m9. I tried the following syntax but it did not work as the results were nonsensical:

-- predict saleshatdy, dynamic(m(2004m8)) y --

The nonsynsical results were:

sales yr_mo saleshatdy
8335.21 2002m1 812.2243
11773.63 2002m2 812.2243
13615.85 2002m3 812.2243
6669.48 2002m4 812.2243
7144.34 2002m5 812.2243
6052.71 2002m6 812.2243
5556.54 2002m7 812.2243
6330.65 2002m8 812.2243
3391.77 2002m9 812.2243
4546.76 2002m10 812.2243
5290.41 2002m11 812.2243
5745.89 2002m12 812.2243
6149.88 2003m1 1063.088
11435.43 2003m2 361.4133
10813.48 2003m3 401.9798
8201.24 2003m4 966.1082
6670.49 2003m5 993.3638
6884.43 2003m6 917.3016
3662.71 2003m7 881.8058
9301.96 2003m8 940.1202
4651.49 2003m9 684.044
8462.30 2003m10 798.1374
8384.00 2003m11 864.058
8367.59 2003m12 895.7506
9300.54 2004m1 926.8094
11379.53 2004m2 349.3701
11794.66 2004m3 332.2561
10372.96 2004m4 1058.651
6026.79 2004m5 966.7421
5919.31 2004m6 978.1514
7074.07 2004m7 709.3981
4652.76 2004m8 1103.654
1253.90 2004m9 803.2082
6906.79 2004m10 1069.426
4061.47 2004m11 1065.623
7766.54 2004m12 1064.355
8382.98 2005m1 1103.02
12928.70 2005m2 346.8347
10155.60 2005m3 362.681
8504.59 2005m4 320.2129
8116.69 2005m5 914.1323
3983.16 2005m6 905.8923
4829.42 2005m7 991.4623
3219.39 2005m8 996.9477
4668.28 2005m9 806.5094
5054.59 2005m10 975.2522

(The 812.2243 for the first 12 observations is the constant in the model. The other saleshat amounts are nonsensical.)

Again the above example is for an AR(12) model. In addition to dynamic forecasting for an AR(12) model, I am also using dynamic forecasting for the following models:
AR(1)
AR(1) with differencing
AR(12) with differencing

I would appreciate help on the dynamic forecasting syntax as discussed above.

Thanks in advance.

_________________________________________________________________
PC Magazine�s 2007 editors� choice for best Web mail�award-winning Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_pcmag_0507

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index