Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 06 Dec 2011 03:26:42 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/06/t1323160035xtloa2wdvaoammz.htm/, Retrieved Mon, 29 Apr 2024 07:42:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=151379, Retrieved Mon, 29 Apr 2024 07:42:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact127
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
- R PD        [ARIMA Forecasting] [] [2011-12-06 08:26:42] [7dc03dd48c8acabd98b217fada4a6bc0] [Current]
Feedback Forum

Post a new message
Dataseries X:
274
291
280
258
252
251
224
225
234
233
229
208
224
226
223
205
201
202
183
188
200
206
211
201
299
244
251
241
244
252
234
246
265
277
287
275
320
338
342
322
323
343
315
334
359
362
378
345
422
430
443
431
425
432
387
396
411
421
424
410
464
486
490
459
454
446
406
412
428
429
425
396
429
439
424
379
370
353
322
322
338
348
350
312
358
378
352
312
310
292
276
269
286
292
288
255
304
299
293
275
272
264
234
231
263
264
264
245
297
317
318
315
312
310
306
313
350
354
371
357
419
425
424
399
393
378
371
364
384
377
383
352




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 1 seconds \tabularnewline
R Server & 'Gertrude Mary Cox' @ cox.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151379&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gertrude Mary Cox' @ cox.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151379&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151379&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net







Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[120])
108245-------
109297-------
110317-------
111318-------
112315-------
113312-------
114310-------
115306-------
116313-------
117350-------
118354-------
119371-------
120357-------
121419415.0036390.3672439.64010.3753111
122425427.7061395.7161459.6960.43420.703111
123424430.8238389.9257471.72180.37180.609910.9998
124399415.112365.8798464.34410.26060.361710.9897
125393417.6073359.8422475.37240.20190.73610.99980.9801
126378421.3812355.0529487.70940.09990.79920.99950.9714
127371401.0607326.0706476.05070.2160.72670.99350.8753
128364411.0991327.3692494.82910.13510.8260.98920.8973
129384435.9534343.4068528.49990.13560.93620.96560.9527
130377445.8974344.4695547.32530.09150.88420.96210.9571
131383454.4945344.1287564.86020.10210.91560.93090.9583
132352436.6277317.2844555.97110.08230.81080.90450.9045

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast \tabularnewline
time & Y[t] & F[t] & 95% LB & 95% UB & p-value(H0: Y[t] = F[t]) & P(F[t]>Y[t-1]) & P(F[t]>Y[t-s]) & P(F[t]>Y[120]) \tabularnewline
108 & 245 & - & - & - & - & - & - & - \tabularnewline
109 & 297 & - & - & - & - & - & - & - \tabularnewline
110 & 317 & - & - & - & - & - & - & - \tabularnewline
111 & 318 & - & - & - & - & - & - & - \tabularnewline
112 & 315 & - & - & - & - & - & - & - \tabularnewline
113 & 312 & - & - & - & - & - & - & - \tabularnewline
114 & 310 & - & - & - & - & - & - & - \tabularnewline
115 & 306 & - & - & - & - & - & - & - \tabularnewline
116 & 313 & - & - & - & - & - & - & - \tabularnewline
117 & 350 & - & - & - & - & - & - & - \tabularnewline
118 & 354 & - & - & - & - & - & - & - \tabularnewline
119 & 371 & - & - & - & - & - & - & - \tabularnewline
120 & 357 & - & - & - & - & - & - & - \tabularnewline
121 & 419 & 415.0036 & 390.3672 & 439.6401 & 0.3753 & 1 & 1 & 1 \tabularnewline
122 & 425 & 427.7061 & 395.7161 & 459.696 & 0.4342 & 0.7031 & 1 & 1 \tabularnewline
123 & 424 & 430.8238 & 389.9257 & 471.7218 & 0.3718 & 0.6099 & 1 & 0.9998 \tabularnewline
124 & 399 & 415.112 & 365.8798 & 464.3441 & 0.2606 & 0.3617 & 1 & 0.9897 \tabularnewline
125 & 393 & 417.6073 & 359.8422 & 475.3724 & 0.2019 & 0.7361 & 0.9998 & 0.9801 \tabularnewline
126 & 378 & 421.3812 & 355.0529 & 487.7094 & 0.0999 & 0.7992 & 0.9995 & 0.9714 \tabularnewline
127 & 371 & 401.0607 & 326.0706 & 476.0507 & 0.216 & 0.7267 & 0.9935 & 0.8753 \tabularnewline
128 & 364 & 411.0991 & 327.3692 & 494.8291 & 0.1351 & 0.826 & 0.9892 & 0.8973 \tabularnewline
129 & 384 & 435.9534 & 343.4068 & 528.4999 & 0.1356 & 0.9362 & 0.9656 & 0.9527 \tabularnewline
130 & 377 & 445.8974 & 344.4695 & 547.3253 & 0.0915 & 0.8842 & 0.9621 & 0.9571 \tabularnewline
131 & 383 & 454.4945 & 344.1287 & 564.8602 & 0.1021 & 0.9156 & 0.9309 & 0.9583 \tabularnewline
132 & 352 & 436.6277 & 317.2844 & 555.9711 & 0.0823 & 0.8108 & 0.9045 & 0.9045 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151379&T=1

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast[/C][/ROW]
[ROW][C]time[/C][C]Y[t][/C][C]F[t][/C][C]95% LB[/C][C]95% UB[/C][C]p-value(H0: Y[t] = F[t])[/C][C]P(F[t]>Y[t-1])[/C][C]P(F[t]>Y[t-s])[/C][C]P(F[t]>Y[120])[/C][/ROW]
[ROW][C]108[/C][C]245[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]297[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]317[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]318[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]315[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]312[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]310[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]306[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]313[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]350[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]354[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]371[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]357[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]121[/C][C]419[/C][C]415.0036[/C][C]390.3672[/C][C]439.6401[/C][C]0.3753[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]122[/C][C]425[/C][C]427.7061[/C][C]395.7161[/C][C]459.696[/C][C]0.4342[/C][C]0.7031[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]123[/C][C]424[/C][C]430.8238[/C][C]389.9257[/C][C]471.7218[/C][C]0.3718[/C][C]0.6099[/C][C]1[/C][C]0.9998[/C][/ROW]
[ROW][C]124[/C][C]399[/C][C]415.112[/C][C]365.8798[/C][C]464.3441[/C][C]0.2606[/C][C]0.3617[/C][C]1[/C][C]0.9897[/C][/ROW]
[ROW][C]125[/C][C]393[/C][C]417.6073[/C][C]359.8422[/C][C]475.3724[/C][C]0.2019[/C][C]0.7361[/C][C]0.9998[/C][C]0.9801[/C][/ROW]
[ROW][C]126[/C][C]378[/C][C]421.3812[/C][C]355.0529[/C][C]487.7094[/C][C]0.0999[/C][C]0.7992[/C][C]0.9995[/C][C]0.9714[/C][/ROW]
[ROW][C]127[/C][C]371[/C][C]401.0607[/C][C]326.0706[/C][C]476.0507[/C][C]0.216[/C][C]0.7267[/C][C]0.9935[/C][C]0.8753[/C][/ROW]
[ROW][C]128[/C][C]364[/C][C]411.0991[/C][C]327.3692[/C][C]494.8291[/C][C]0.1351[/C][C]0.826[/C][C]0.9892[/C][C]0.8973[/C][/ROW]
[ROW][C]129[/C][C]384[/C][C]435.9534[/C][C]343.4068[/C][C]528.4999[/C][C]0.1356[/C][C]0.9362[/C][C]0.9656[/C][C]0.9527[/C][/ROW]
[ROW][C]130[/C][C]377[/C][C]445.8974[/C][C]344.4695[/C][C]547.3253[/C][C]0.0915[/C][C]0.8842[/C][C]0.9621[/C][C]0.9571[/C][/ROW]
[ROW][C]131[/C][C]383[/C][C]454.4945[/C][C]344.1287[/C][C]564.8602[/C][C]0.1021[/C][C]0.9156[/C][C]0.9309[/C][C]0.9583[/C][/ROW]
[ROW][C]132[/C][C]352[/C][C]436.6277[/C][C]317.2844[/C][C]555.9711[/C][C]0.0823[/C][C]0.8108[/C][C]0.9045[/C][C]0.9045[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151379&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151379&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[120])
108245-------
109297-------
110317-------
111318-------
112315-------
113312-------
114310-------
115306-------
116313-------
117350-------
118354-------
119371-------
120357-------
121419415.0036390.3672439.64010.3753111
122425427.7061395.7161459.6960.43420.703111
123424430.8238389.9257471.72180.37180.609910.9998
124399415.112365.8798464.34410.26060.361710.9897
125393417.6073359.8422475.37240.20190.73610.99980.9801
126378421.3812355.0529487.70940.09990.79920.99950.9714
127371401.0607326.0706476.05070.2160.72670.99350.8753
128364411.0991327.3692494.82910.13510.8260.98920.8973
129384435.9534343.4068528.49990.13560.93620.96560.9527
130377445.8974344.4695547.32530.09150.88420.96210.9571
131383454.4945344.1287564.86020.10210.91560.93090.9583
132352436.6277317.2844555.97110.08230.81080.90450.9045







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1210.03030.0096015.970800
1220.0382-0.00630.0087.322711.64683.4127
1230.0484-0.01580.010646.563923.28584.8255
1240.0605-0.03880.0177259.596382.36359.0754
1250.0706-0.05890.0259605.5197186.994713.6746
1260.0803-0.10290.03871881.9268469.483421.6676
1270.0954-0.0750.0439903.6438531.506323.0544
1280.1039-0.11460.05282218.3291742.359127.2463
1290.1083-0.11920.06012699.1511959.780530.9803
1300.1161-0.15450.06964746.85561338.48836.5854
1310.1239-0.15730.07755111.45891681.485441.0059
1320.1395-0.19380.08727161.85112138.182546.2405

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
121 & 0.0303 & 0.0096 & 0 & 15.9708 & 0 & 0 \tabularnewline
122 & 0.0382 & -0.0063 & 0.008 & 7.3227 & 11.6468 & 3.4127 \tabularnewline
123 & 0.0484 & -0.0158 & 0.0106 & 46.5639 & 23.2858 & 4.8255 \tabularnewline
124 & 0.0605 & -0.0388 & 0.0177 & 259.5963 & 82.3635 & 9.0754 \tabularnewline
125 & 0.0706 & -0.0589 & 0.0259 & 605.5197 & 186.9947 & 13.6746 \tabularnewline
126 & 0.0803 & -0.1029 & 0.0387 & 1881.9268 & 469.4834 & 21.6676 \tabularnewline
127 & 0.0954 & -0.075 & 0.0439 & 903.6438 & 531.5063 & 23.0544 \tabularnewline
128 & 0.1039 & -0.1146 & 0.0528 & 2218.3291 & 742.3591 & 27.2463 \tabularnewline
129 & 0.1083 & -0.1192 & 0.0601 & 2699.1511 & 959.7805 & 30.9803 \tabularnewline
130 & 0.1161 & -0.1545 & 0.0696 & 4746.8556 & 1338.488 & 36.5854 \tabularnewline
131 & 0.1239 & -0.1573 & 0.0775 & 5111.4589 & 1681.4854 & 41.0059 \tabularnewline
132 & 0.1395 & -0.1938 & 0.0872 & 7161.8511 & 2138.1825 & 46.2405 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151379&T=2

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast Performance[/C][/ROW]
[ROW][C]time[/C][C]% S.E.[/C][C]PE[/C][C]MAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][/ROW]
[ROW][C]121[/C][C]0.0303[/C][C]0.0096[/C][C]0[/C][C]15.9708[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]122[/C][C]0.0382[/C][C]-0.0063[/C][C]0.008[/C][C]7.3227[/C][C]11.6468[/C][C]3.4127[/C][/ROW]
[ROW][C]123[/C][C]0.0484[/C][C]-0.0158[/C][C]0.0106[/C][C]46.5639[/C][C]23.2858[/C][C]4.8255[/C][/ROW]
[ROW][C]124[/C][C]0.0605[/C][C]-0.0388[/C][C]0.0177[/C][C]259.5963[/C][C]82.3635[/C][C]9.0754[/C][/ROW]
[ROW][C]125[/C][C]0.0706[/C][C]-0.0589[/C][C]0.0259[/C][C]605.5197[/C][C]186.9947[/C][C]13.6746[/C][/ROW]
[ROW][C]126[/C][C]0.0803[/C][C]-0.1029[/C][C]0.0387[/C][C]1881.9268[/C][C]469.4834[/C][C]21.6676[/C][/ROW]
[ROW][C]127[/C][C]0.0954[/C][C]-0.075[/C][C]0.0439[/C][C]903.6438[/C][C]531.5063[/C][C]23.0544[/C][/ROW]
[ROW][C]128[/C][C]0.1039[/C][C]-0.1146[/C][C]0.0528[/C][C]2218.3291[/C][C]742.3591[/C][C]27.2463[/C][/ROW]
[ROW][C]129[/C][C]0.1083[/C][C]-0.1192[/C][C]0.0601[/C][C]2699.1511[/C][C]959.7805[/C][C]30.9803[/C][/ROW]
[ROW][C]130[/C][C]0.1161[/C][C]-0.1545[/C][C]0.0696[/C][C]4746.8556[/C][C]1338.488[/C][C]36.5854[/C][/ROW]
[ROW][C]131[/C][C]0.1239[/C][C]-0.1573[/C][C]0.0775[/C][C]5111.4589[/C][C]1681.4854[/C][C]41.0059[/C][/ROW]
[ROW][C]132[/C][C]0.1395[/C][C]-0.1938[/C][C]0.0872[/C][C]7161.8511[/C][C]2138.1825[/C][C]46.2405[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151379&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151379&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1210.03030.0096015.970800
1220.0382-0.00630.0087.322711.64683.4127
1230.0484-0.01580.010646.563923.28584.8255
1240.0605-0.03880.0177259.596382.36359.0754
1250.0706-0.05890.0259605.5197186.994713.6746
1260.0803-0.10290.03871881.9268469.483421.6676
1270.0954-0.0750.0439903.6438531.506323.0544
1280.1039-0.11460.05282218.3291742.359127.2463
1290.1083-0.11920.06012699.1511959.780530.9803
1300.1161-0.15450.06964746.85561338.48836.5854
1310.1239-0.15730.07755111.45891681.485441.0059
1320.1395-0.19380.08727161.85112138.182546.2405



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 2 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 2 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
R code (references can be found in the software module):
par1 <- as.numeric(par1) #cut off periods
par2 <- as.numeric(par2) #lambda
par3 <- as.numeric(par3) #degree of non-seasonal differencing
par4 <- as.numeric(par4) #degree of seasonal differencing
par5 <- as.numeric(par5) #seasonal period
par6 <- as.numeric(par6) #p
par7 <- as.numeric(par7) #q
par8 <- as.numeric(par8) #P
par9 <- as.numeric(par9) #Q
if (par10 == 'TRUE') par10 <- TRUE
if (par10 == 'FALSE') par10 <- FALSE
if (par2 == 0) x <- log(x)
if (par2 != 0) x <- x^par2
lx <- length(x)
first <- lx - 2*par1
nx <- lx - par1
nx1 <- nx + 1
fx <- lx - nx
if (fx < 1) {
fx <- par5
nx1 <- lx + fx - 1
first <- lx - 2*fx
}
first <- 1
if (fx < 3) fx <- round(lx/10,0)
(arima.out <- arima(x[1:nx], order=c(par6,par3,par7), seasonal=list(order=c(par8,par4,par9), period=par5), include.mean=par10, method='ML'))
(forecast <- predict(arima.out,par1))
(lb <- forecast$pred - 1.96 * forecast$se)
(ub <- forecast$pred + 1.96 * forecast$se)
if (par2 == 0) {
x <- exp(x)
forecast$pred <- exp(forecast$pred)
lb <- exp(lb)
ub <- exp(ub)
}
if (par2 != 0) {
x <- x^(1/par2)
forecast$pred <- forecast$pred^(1/par2)
lb <- lb^(1/par2)
ub <- ub^(1/par2)
}
if (par2 < 0) {
olb <- lb
lb <- ub
ub <- olb
}
(actandfor <- c(x[1:nx], forecast$pred))
(perc.se <- (ub-forecast$pred)/1.96/forecast$pred)
bitmap(file='test1.png')
opar <- par(mar=c(4,4,2,2),las=1)
ylim <- c( min(x[first:nx],lb), max(x[first:nx],ub))
plot(x,ylim=ylim,type='n',xlim=c(first,lx))
usr <- par('usr')
rect(usr[1],usr[3],nx+1,usr[4],border=NA,col='lemonchiffon')
rect(nx1,usr[3],usr[2],usr[4],border=NA,col='lavender')
abline(h= (-3:3)*2 , col ='gray', lty =3)
polygon( c(nx1:lx,lx:nx1), c(lb,rev(ub)), col = 'orange', lty=2,border=NA)
lines(nx1:lx, lb , lty=2)
lines(nx1:lx, ub , lty=2)
lines(x, lwd=2)
lines(nx1:lx, forecast$pred , lwd=2 , col ='white')
box()
par(opar)
dev.off()
prob.dec <- array(NA, dim=fx)
prob.sdec <- array(NA, dim=fx)
prob.ldec <- array(NA, dim=fx)
prob.pval <- array(NA, dim=fx)
perf.pe <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- array(0, dim=fx)
perf.rmse <- array(0, dim=fx)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / forecast$pred[i]
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
prob.dec[i] = pnorm((x[nx+i-1] - forecast$pred[i]) / locSD)
prob.sdec[i] = pnorm((x[nx+i-par5] - forecast$pred[i]) / locSD)
prob.ldec[i] = pnorm((x[nx] - forecast$pred[i]) / locSD)
prob.pval[i] = pnorm(abs(x[nx+i] - forecast$pred[i]) / locSD)
}
perf.mape[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
bitmap(file='test2.png')
plot(forecast$pred, pch=19, type='b',main='ARIMA Extrapolation Forecast', ylab='Forecast and 95% CI', xlab='time',ylim=c(min(lb),max(ub)))
dum <- forecast$pred
dum[1:par1] <- x[(nx+1):lx]
lines(dum, lty=1)
lines(ub,lty=3)
lines(lb,lty=3)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast',9,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'Y[t]',1,header=TRUE)
a<-table.element(a,'F[t]',1,header=TRUE)
a<-table.element(a,'95% LB',1,header=TRUE)
a<-table.element(a,'95% UB',1,header=TRUE)
a<-table.element(a,'p-value
(H0: Y[t] = F[t])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-1])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-s])',1,header=TRUE)
mylab <- paste('P(F[t]>Y[',nx,sep='')
mylab <- paste(mylab,'])',sep='')
a<-table.element(a,mylab,1,header=TRUE)
a<-table.row.end(a)
for (i in (nx-par5):nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.row.end(a)
}
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(x[nx+i],4))
a<-table.element(a,round(forecast$pred[i],4))
a<-table.element(a,round(lb[i],4))
a<-table.element(a,round(ub[i],4))
a<-table.element(a,round((1-prob.pval[i]),4))
a<-table.element(a,round((1-prob.dec[i]),4))
a<-table.element(a,round((1-prob.sdec[i]),4))
a<-table.element(a,round((1-prob.ldec[i]),4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast Performance',7,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'% S.E.',1,header=TRUE)
a<-table.element(a,'PE',1,header=TRUE)
a<-table.element(a,'MAPE',1,header=TRUE)
a<-table.element(a,'Sq.E',1,header=TRUE)
a<-table.element(a,'MSE',1,header=TRUE)
a<-table.element(a,'RMSE',1,header=TRUE)
a<-table.row.end(a)
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(perc.se[i],4))
a<-table.element(a,round(perf.pe[i],4))
a<-table.element(a,round(perf.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[i],4))
a<-table.element(a,round(perf.rmse[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')