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, 07 Dec 2010 22:26:44 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/07/t12917606868ri2izlyyseb95d.htm/, Retrieved Fri, 03 May 2024 16:54:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106788, Retrieved Fri, 03 May 2024 16:54:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact136
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [WS9 fout] [2010-12-03 12:26:23] [1fd136673b2a4fecb5c545b9b4a05d64]
- R P   [ARIMA Forecasting] [] [2010-12-03 14:12:57] [b98453cac15ba1066b407e146608df68]
-   PD    [ARIMA Forecasting] [Arima forecast 1] [2010-12-07 16:30:17] [b8e188bcc949964bed729335b3416734]
-   P         [ARIMA Forecasting] [Forecast ARIMA 1] [2010-12-07 22:26:44] [278a0539dc236556c5f30b5bc56ff9eb] [Current]
-   PD          [ARIMA Forecasting] [ARIMA voorspellen...] [2010-12-20 00:03:32] [b8e188bcc949964bed729335b3416734]
Feedback Forum

Post a new message
Dataseries X:
300
302
400
392
373
379
303
324
353
392
327
376
329
359
413
338
422
390
370
367
406
418
346
350
330
318
382
337
372
422
428
426
396
458
315
337
386
352
383
439
397
453
363
365
474
373
403
384
364
361
419
352
363
410
361
383
342
369
361
317
386
318
407
393
404
498
438




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 7 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106788&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]7 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106788&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106788&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 time7 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[55])
43363-------
44365-------
45474-------
46373-------
47403-------
48384-------
49364-------
50361-------
51419-------
52352-------
53363-------
54410-------
55361-------
56383384.901314.0574469.81620.48250.70940.6770.7094
57342379.6165300.6206476.82720.22410.47280.02850.6463
58369385.6978296.2203498.80570.38620.77550.58710.6657
59361351.1773256.7026475.86850.43860.38970.20770.4386
60317352.0383253.1487484.43080.3020.44720.3180.4472
61386366.3924253.2767523.1030.40310.73160.51190.5269
62318352.0115239.0193510.99210.33750.33760.45590.4559
63407373.7693246.8424556.68410.36090.72490.3140.5544
64393373.6542242.1796566.20450.42190.36710.58720.5512
65404366.9432232.2801568.19950.35910.39980.51530.5231
66498387.717241.1888609.99790.16540.44290.42210.5931
67438356.5137216.6999572.84590.23020.09990.48380.4838

\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[55]) \tabularnewline
43 & 363 & - & - & - & - & - & - & - \tabularnewline
44 & 365 & - & - & - & - & - & - & - \tabularnewline
45 & 474 & - & - & - & - & - & - & - \tabularnewline
46 & 373 & - & - & - & - & - & - & - \tabularnewline
47 & 403 & - & - & - & - & - & - & - \tabularnewline
48 & 384 & - & - & - & - & - & - & - \tabularnewline
49 & 364 & - & - & - & - & - & - & - \tabularnewline
50 & 361 & - & - & - & - & - & - & - \tabularnewline
51 & 419 & - & - & - & - & - & - & - \tabularnewline
52 & 352 & - & - & - & - & - & - & - \tabularnewline
53 & 363 & - & - & - & - & - & - & - \tabularnewline
54 & 410 & - & - & - & - & - & - & - \tabularnewline
55 & 361 & - & - & - & - & - & - & - \tabularnewline
56 & 383 & 384.901 & 314.0574 & 469.8162 & 0.4825 & 0.7094 & 0.677 & 0.7094 \tabularnewline
57 & 342 & 379.6165 & 300.6206 & 476.8272 & 0.2241 & 0.4728 & 0.0285 & 0.6463 \tabularnewline
58 & 369 & 385.6978 & 296.2203 & 498.8057 & 0.3862 & 0.7755 & 0.5871 & 0.6657 \tabularnewline
59 & 361 & 351.1773 & 256.7026 & 475.8685 & 0.4386 & 0.3897 & 0.2077 & 0.4386 \tabularnewline
60 & 317 & 352.0383 & 253.1487 & 484.4308 & 0.302 & 0.4472 & 0.318 & 0.4472 \tabularnewline
61 & 386 & 366.3924 & 253.2767 & 523.103 & 0.4031 & 0.7316 & 0.5119 & 0.5269 \tabularnewline
62 & 318 & 352.0115 & 239.0193 & 510.9921 & 0.3375 & 0.3376 & 0.4559 & 0.4559 \tabularnewline
63 & 407 & 373.7693 & 246.8424 & 556.6841 & 0.3609 & 0.7249 & 0.314 & 0.5544 \tabularnewline
64 & 393 & 373.6542 & 242.1796 & 566.2045 & 0.4219 & 0.3671 & 0.5872 & 0.5512 \tabularnewline
65 & 404 & 366.9432 & 232.2801 & 568.1995 & 0.3591 & 0.3998 & 0.5153 & 0.5231 \tabularnewline
66 & 498 & 387.717 & 241.1888 & 609.9979 & 0.1654 & 0.4429 & 0.4221 & 0.5931 \tabularnewline
67 & 438 & 356.5137 & 216.6999 & 572.8459 & 0.2302 & 0.0999 & 0.4838 & 0.4838 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106788&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[55])[/C][/ROW]
[ROW][C]43[/C][C]363[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]365[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]474[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]373[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]403[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]384[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]364[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]361[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]419[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]352[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]363[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]410[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]361[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]383[/C][C]384.901[/C][C]314.0574[/C][C]469.8162[/C][C]0.4825[/C][C]0.7094[/C][C]0.677[/C][C]0.7094[/C][/ROW]
[ROW][C]57[/C][C]342[/C][C]379.6165[/C][C]300.6206[/C][C]476.8272[/C][C]0.2241[/C][C]0.4728[/C][C]0.0285[/C][C]0.6463[/C][/ROW]
[ROW][C]58[/C][C]369[/C][C]385.6978[/C][C]296.2203[/C][C]498.8057[/C][C]0.3862[/C][C]0.7755[/C][C]0.5871[/C][C]0.6657[/C][/ROW]
[ROW][C]59[/C][C]361[/C][C]351.1773[/C][C]256.7026[/C][C]475.8685[/C][C]0.4386[/C][C]0.3897[/C][C]0.2077[/C][C]0.4386[/C][/ROW]
[ROW][C]60[/C][C]317[/C][C]352.0383[/C][C]253.1487[/C][C]484.4308[/C][C]0.302[/C][C]0.4472[/C][C]0.318[/C][C]0.4472[/C][/ROW]
[ROW][C]61[/C][C]386[/C][C]366.3924[/C][C]253.2767[/C][C]523.103[/C][C]0.4031[/C][C]0.7316[/C][C]0.5119[/C][C]0.5269[/C][/ROW]
[ROW][C]62[/C][C]318[/C][C]352.0115[/C][C]239.0193[/C][C]510.9921[/C][C]0.3375[/C][C]0.3376[/C][C]0.4559[/C][C]0.4559[/C][/ROW]
[ROW][C]63[/C][C]407[/C][C]373.7693[/C][C]246.8424[/C][C]556.6841[/C][C]0.3609[/C][C]0.7249[/C][C]0.314[/C][C]0.5544[/C][/ROW]
[ROW][C]64[/C][C]393[/C][C]373.6542[/C][C]242.1796[/C][C]566.2045[/C][C]0.4219[/C][C]0.3671[/C][C]0.5872[/C][C]0.5512[/C][/ROW]
[ROW][C]65[/C][C]404[/C][C]366.9432[/C][C]232.2801[/C][C]568.1995[/C][C]0.3591[/C][C]0.3998[/C][C]0.5153[/C][C]0.5231[/C][/ROW]
[ROW][C]66[/C][C]498[/C][C]387.717[/C][C]241.1888[/C][C]609.9979[/C][C]0.1654[/C][C]0.4429[/C][C]0.4221[/C][C]0.5931[/C][/ROW]
[ROW][C]67[/C][C]438[/C][C]356.5137[/C][C]216.6999[/C][C]572.8459[/C][C]0.2302[/C][C]0.0999[/C][C]0.4838[/C][C]0.4838[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106788&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106788&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[55])
43363-------
44365-------
45474-------
46373-------
47403-------
48384-------
49364-------
50361-------
51419-------
52352-------
53363-------
54410-------
55361-------
56383384.901314.0574469.81620.48250.70940.6770.7094
57342379.6165300.6206476.82720.22410.47280.02850.6463
58369385.6978296.2203498.80570.38620.77550.58710.6657
59361351.1773256.7026475.86850.43860.38970.20770.4386
60317352.0383253.1487484.43080.3020.44720.3180.4472
61386366.3924253.2767523.1030.40310.73160.51190.5269
62318352.0115239.0193510.99210.33750.33760.45590.4559
63407373.7693246.8424556.68410.36090.72490.3140.5544
64393373.6542242.1796566.20450.42190.36710.58720.5512
65404366.9432232.2801568.19950.35910.39980.51530.5231
66498387.717241.1888609.99790.16540.44290.42210.5931
67438356.5137216.6999572.84590.23020.09990.48380.4838







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
560.1126-0.004903.61400
570.1307-0.09910.0521414.9974709.305726.6328
580.1496-0.04330.0491278.8166565.809323.7867
590.18120.0280.043896.486448.478521.1773
600.1919-0.09950.0551227.679604.318624.5829
610.21820.05350.0547384.4596567.675423.8259
620.2304-0.09660.06071156.783651.833625.531
630.24970.08890.06421104.2763708.38926.6156
640.26290.05180.0628374.2618671.263725.9088
650.27980.1010.06671373.2054741.457927.2297
660.29250.28440.086512162.33541779.719542.1867
670.30960.22860.09836640.01342184.74446.7412

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
56 & 0.1126 & -0.0049 & 0 & 3.614 & 0 & 0 \tabularnewline
57 & 0.1307 & -0.0991 & 0.052 & 1414.9974 & 709.3057 & 26.6328 \tabularnewline
58 & 0.1496 & -0.0433 & 0.0491 & 278.8166 & 565.8093 & 23.7867 \tabularnewline
59 & 0.1812 & 0.028 & 0.0438 & 96.486 & 448.4785 & 21.1773 \tabularnewline
60 & 0.1919 & -0.0995 & 0.055 & 1227.679 & 604.3186 & 24.5829 \tabularnewline
61 & 0.2182 & 0.0535 & 0.0547 & 384.4596 & 567.6754 & 23.8259 \tabularnewline
62 & 0.2304 & -0.0966 & 0.0607 & 1156.783 & 651.8336 & 25.531 \tabularnewline
63 & 0.2497 & 0.0889 & 0.0642 & 1104.2763 & 708.389 & 26.6156 \tabularnewline
64 & 0.2629 & 0.0518 & 0.0628 & 374.2618 & 671.2637 & 25.9088 \tabularnewline
65 & 0.2798 & 0.101 & 0.0667 & 1373.2054 & 741.4579 & 27.2297 \tabularnewline
66 & 0.2925 & 0.2844 & 0.0865 & 12162.3354 & 1779.7195 & 42.1867 \tabularnewline
67 & 0.3096 & 0.2286 & 0.0983 & 6640.0134 & 2184.744 & 46.7412 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106788&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]56[/C][C]0.1126[/C][C]-0.0049[/C][C]0[/C][C]3.614[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]57[/C][C]0.1307[/C][C]-0.0991[/C][C]0.052[/C][C]1414.9974[/C][C]709.3057[/C][C]26.6328[/C][/ROW]
[ROW][C]58[/C][C]0.1496[/C][C]-0.0433[/C][C]0.0491[/C][C]278.8166[/C][C]565.8093[/C][C]23.7867[/C][/ROW]
[ROW][C]59[/C][C]0.1812[/C][C]0.028[/C][C]0.0438[/C][C]96.486[/C][C]448.4785[/C][C]21.1773[/C][/ROW]
[ROW][C]60[/C][C]0.1919[/C][C]-0.0995[/C][C]0.055[/C][C]1227.679[/C][C]604.3186[/C][C]24.5829[/C][/ROW]
[ROW][C]61[/C][C]0.2182[/C][C]0.0535[/C][C]0.0547[/C][C]384.4596[/C][C]567.6754[/C][C]23.8259[/C][/ROW]
[ROW][C]62[/C][C]0.2304[/C][C]-0.0966[/C][C]0.0607[/C][C]1156.783[/C][C]651.8336[/C][C]25.531[/C][/ROW]
[ROW][C]63[/C][C]0.2497[/C][C]0.0889[/C][C]0.0642[/C][C]1104.2763[/C][C]708.389[/C][C]26.6156[/C][/ROW]
[ROW][C]64[/C][C]0.2629[/C][C]0.0518[/C][C]0.0628[/C][C]374.2618[/C][C]671.2637[/C][C]25.9088[/C][/ROW]
[ROW][C]65[/C][C]0.2798[/C][C]0.101[/C][C]0.0667[/C][C]1373.2054[/C][C]741.4579[/C][C]27.2297[/C][/ROW]
[ROW][C]66[/C][C]0.2925[/C][C]0.2844[/C][C]0.0865[/C][C]12162.3354[/C][C]1779.7195[/C][C]42.1867[/C][/ROW]
[ROW][C]67[/C][C]0.3096[/C][C]0.2286[/C][C]0.0983[/C][C]6640.0134[/C][C]2184.744[/C][C]46.7412[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106788&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106788&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
560.1126-0.004903.61400
570.1307-0.09910.0521414.9974709.305726.6328
580.1496-0.04330.0491278.8166565.809323.7867
590.18120.0280.043896.486448.478521.1773
600.1919-0.09950.0551227.679604.318624.5829
610.21820.05350.0547384.4596567.675423.8259
620.2304-0.09660.06071156.783651.833625.531
630.24970.08890.06421104.2763708.38926.6156
640.26290.05180.0628374.2618671.263725.9088
650.27980.1010.06671373.2054741.457927.2297
660.29250.28440.086512162.33541779.719542.1867
670.30960.22860.09836640.01342184.74446.7412



Parameters (Session):
par1 = 12 ; par2 = 0.1 ; par3 = 0 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 0.1 ; par3 = 0 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 0 ; 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')