Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 24 Dec 2008 05:19:13 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Dec/24/t1230121179xuupo9otqzb1j0a.htm/, Retrieved Sat, 18 May 2024 11:32:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36517, Retrieved Sat, 18 May 2024 11:32:15 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact175
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Paper22] [2008-12-23 11:45:04] [8ac58ef7b35dc5a117bc162cf16850e9]
-         [ARIMA Forecasting] [Paper 22] [2008-12-24 12:19:13] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
528,00
478,00
469,00
490,00
493,00
508,00
517,00
514,00
510,00
527,00
542,00
565,00
555,00
499,00
511,00
526,00
532,00
549,00
561,00
557,00
566,00
588,00
620,00
626,00
620,00
573,00
573,00
574,00
580,00
590,00
593,00
597,00
595,00
612,00
628,00
629,00
621,00
569,00
567,00
573,00
584,00
589,00
591,00
595,00
594,00
611,00
613,00
611,00
594,00
543,00
537,00
544,00
555,00
561,00
562,00
555,00
547,00
565,00
578,00
580,00
569,00
507,00
501,00
509,00
510,00
517,00
519,00
512,00
509,00




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36517&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 time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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[57])
45594-------
46611-------
47613-------
48611-------
49594-------
50543-------
51537-------
52544-------
53555-------
54561-------
55562-------
56555-------
57547-------
58565562.1352547.6738576.59660.34890.979900.9799
59578569.7614549.7272589.79570.21010.679300.987
60580568.7489543.4292594.06850.19190.2375e-040.9539
61569553.201522.6918583.71010.15510.04260.00440.6548
62507499.2817463.6116534.95180.33571e-040.00810.0044
63501493.4114452.5768534.2460.35780.25710.01820.0051
64509497.9676451.9551543.98010.31920.44860.02490.0184
65510505.1436453.9378556.34940.42630.44130.02820.0546
66517510.198453.7852566.61080.40660.50270.03880.1005
67519510.5702448.9402572.20020.39430.4190.0510.1233
68512505.9876439.1346572.84060.430.35140.07540.1146
69509499.8229427.7456571.90020.40150.37030.09980.0998

\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[57]) \tabularnewline
45 & 594 & - & - & - & - & - & - & - \tabularnewline
46 & 611 & - & - & - & - & - & - & - \tabularnewline
47 & 613 & - & - & - & - & - & - & - \tabularnewline
48 & 611 & - & - & - & - & - & - & - \tabularnewline
49 & 594 & - & - & - & - & - & - & - \tabularnewline
50 & 543 & - & - & - & - & - & - & - \tabularnewline
51 & 537 & - & - & - & - & - & - & - \tabularnewline
52 & 544 & - & - & - & - & - & - & - \tabularnewline
53 & 555 & - & - & - & - & - & - & - \tabularnewline
54 & 561 & - & - & - & - & - & - & - \tabularnewline
55 & 562 & - & - & - & - & - & - & - \tabularnewline
56 & 555 & - & - & - & - & - & - & - \tabularnewline
57 & 547 & - & - & - & - & - & - & - \tabularnewline
58 & 565 & 562.1352 & 547.6738 & 576.5966 & 0.3489 & 0.9799 & 0 & 0.9799 \tabularnewline
59 & 578 & 569.7614 & 549.7272 & 589.7957 & 0.2101 & 0.6793 & 0 & 0.987 \tabularnewline
60 & 580 & 568.7489 & 543.4292 & 594.0685 & 0.1919 & 0.237 & 5e-04 & 0.9539 \tabularnewline
61 & 569 & 553.201 & 522.6918 & 583.7101 & 0.1551 & 0.0426 & 0.0044 & 0.6548 \tabularnewline
62 & 507 & 499.2817 & 463.6116 & 534.9518 & 0.3357 & 1e-04 & 0.0081 & 0.0044 \tabularnewline
63 & 501 & 493.4114 & 452.5768 & 534.246 & 0.3578 & 0.2571 & 0.0182 & 0.0051 \tabularnewline
64 & 509 & 497.9676 & 451.9551 & 543.9801 & 0.3192 & 0.4486 & 0.0249 & 0.0184 \tabularnewline
65 & 510 & 505.1436 & 453.9378 & 556.3494 & 0.4263 & 0.4413 & 0.0282 & 0.0546 \tabularnewline
66 & 517 & 510.198 & 453.7852 & 566.6108 & 0.4066 & 0.5027 & 0.0388 & 0.1005 \tabularnewline
67 & 519 & 510.5702 & 448.9402 & 572.2002 & 0.3943 & 0.419 & 0.051 & 0.1233 \tabularnewline
68 & 512 & 505.9876 & 439.1346 & 572.8406 & 0.43 & 0.3514 & 0.0754 & 0.1146 \tabularnewline
69 & 509 & 499.8229 & 427.7456 & 571.9002 & 0.4015 & 0.3703 & 0.0998 & 0.0998 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36517&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[57])[/C][/ROW]
[ROW][C]45[/C][C]594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]611[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]613[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]611[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]543[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]537[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]544[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]555[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]561[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]562[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]555[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]547[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]565[/C][C]562.1352[/C][C]547.6738[/C][C]576.5966[/C][C]0.3489[/C][C]0.9799[/C][C]0[/C][C]0.9799[/C][/ROW]
[ROW][C]59[/C][C]578[/C][C]569.7614[/C][C]549.7272[/C][C]589.7957[/C][C]0.2101[/C][C]0.6793[/C][C]0[/C][C]0.987[/C][/ROW]
[ROW][C]60[/C][C]580[/C][C]568.7489[/C][C]543.4292[/C][C]594.0685[/C][C]0.1919[/C][C]0.237[/C][C]5e-04[/C][C]0.9539[/C][/ROW]
[ROW][C]61[/C][C]569[/C][C]553.201[/C][C]522.6918[/C][C]583.7101[/C][C]0.1551[/C][C]0.0426[/C][C]0.0044[/C][C]0.6548[/C][/ROW]
[ROW][C]62[/C][C]507[/C][C]499.2817[/C][C]463.6116[/C][C]534.9518[/C][C]0.3357[/C][C]1e-04[/C][C]0.0081[/C][C]0.0044[/C][/ROW]
[ROW][C]63[/C][C]501[/C][C]493.4114[/C][C]452.5768[/C][C]534.246[/C][C]0.3578[/C][C]0.2571[/C][C]0.0182[/C][C]0.0051[/C][/ROW]
[ROW][C]64[/C][C]509[/C][C]497.9676[/C][C]451.9551[/C][C]543.9801[/C][C]0.3192[/C][C]0.4486[/C][C]0.0249[/C][C]0.0184[/C][/ROW]
[ROW][C]65[/C][C]510[/C][C]505.1436[/C][C]453.9378[/C][C]556.3494[/C][C]0.4263[/C][C]0.4413[/C][C]0.0282[/C][C]0.0546[/C][/ROW]
[ROW][C]66[/C][C]517[/C][C]510.198[/C][C]453.7852[/C][C]566.6108[/C][C]0.4066[/C][C]0.5027[/C][C]0.0388[/C][C]0.1005[/C][/ROW]
[ROW][C]67[/C][C]519[/C][C]510.5702[/C][C]448.9402[/C][C]572.2002[/C][C]0.3943[/C][C]0.419[/C][C]0.051[/C][C]0.1233[/C][/ROW]
[ROW][C]68[/C][C]512[/C][C]505.9876[/C][C]439.1346[/C][C]572.8406[/C][C]0.43[/C][C]0.3514[/C][C]0.0754[/C][C]0.1146[/C][/ROW]
[ROW][C]69[/C][C]509[/C][C]499.8229[/C][C]427.7456[/C][C]571.9002[/C][C]0.4015[/C][C]0.3703[/C][C]0.0998[/C][C]0.0998[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36517&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36517&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[57])
45594-------
46611-------
47613-------
48611-------
49594-------
50543-------
51537-------
52544-------
53555-------
54561-------
55562-------
56555-------
57547-------
58565562.1352547.6738576.59660.34890.979900.9799
59578569.7614549.7272589.79570.21010.679300.987
60580568.7489543.4292594.06850.19190.2375e-040.9539
61569553.201522.6918583.71010.15510.04260.00440.6548
62507499.2817463.6116534.95180.33571e-040.00810.0044
63501493.4114452.5768534.2460.35780.25710.01820.0051
64509497.9676451.9551543.98010.31920.44860.02490.0184
65510505.1436453.9378556.34940.42630.44130.02820.0546
66517510.198453.7852566.61080.40660.50270.03880.1005
67519510.5702448.9402572.20020.39430.4190.0510.1233
68512505.9876439.1346572.84060.430.35140.07540.1146
69509499.8229427.7456571.90020.40150.37030.09980.0998







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
580.01310.00514e-048.20690.68390.827
590.01790.01450.001267.87445.65622.3783
600.02270.01980.0016126.588410.5493.2479
610.02810.02860.0024249.609820.80084.5608
620.03650.01550.001359.57244.96442.2281
630.04220.01540.001357.58684.79892.1906
640.04710.02220.0018121.714310.14293.1848
650.05170.00968e-0423.58441.96541.4019
660.05640.01330.001146.26733.85561.9636
670.06160.01650.001471.06165.92182.4335
680.06740.01190.00136.1493.01241.7356
690.07360.01840.001584.21947.01832.6492

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
58 & 0.0131 & 0.0051 & 4e-04 & 8.2069 & 0.6839 & 0.827 \tabularnewline
59 & 0.0179 & 0.0145 & 0.0012 & 67.8744 & 5.6562 & 2.3783 \tabularnewline
60 & 0.0227 & 0.0198 & 0.0016 & 126.5884 & 10.549 & 3.2479 \tabularnewline
61 & 0.0281 & 0.0286 & 0.0024 & 249.6098 & 20.8008 & 4.5608 \tabularnewline
62 & 0.0365 & 0.0155 & 0.0013 & 59.5724 & 4.9644 & 2.2281 \tabularnewline
63 & 0.0422 & 0.0154 & 0.0013 & 57.5868 & 4.7989 & 2.1906 \tabularnewline
64 & 0.0471 & 0.0222 & 0.0018 & 121.7143 & 10.1429 & 3.1848 \tabularnewline
65 & 0.0517 & 0.0096 & 8e-04 & 23.5844 & 1.9654 & 1.4019 \tabularnewline
66 & 0.0564 & 0.0133 & 0.0011 & 46.2673 & 3.8556 & 1.9636 \tabularnewline
67 & 0.0616 & 0.0165 & 0.0014 & 71.0616 & 5.9218 & 2.4335 \tabularnewline
68 & 0.0674 & 0.0119 & 0.001 & 36.149 & 3.0124 & 1.7356 \tabularnewline
69 & 0.0736 & 0.0184 & 0.0015 & 84.2194 & 7.0183 & 2.6492 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36517&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]58[/C][C]0.0131[/C][C]0.0051[/C][C]4e-04[/C][C]8.2069[/C][C]0.6839[/C][C]0.827[/C][/ROW]
[ROW][C]59[/C][C]0.0179[/C][C]0.0145[/C][C]0.0012[/C][C]67.8744[/C][C]5.6562[/C][C]2.3783[/C][/ROW]
[ROW][C]60[/C][C]0.0227[/C][C]0.0198[/C][C]0.0016[/C][C]126.5884[/C][C]10.549[/C][C]3.2479[/C][/ROW]
[ROW][C]61[/C][C]0.0281[/C][C]0.0286[/C][C]0.0024[/C][C]249.6098[/C][C]20.8008[/C][C]4.5608[/C][/ROW]
[ROW][C]62[/C][C]0.0365[/C][C]0.0155[/C][C]0.0013[/C][C]59.5724[/C][C]4.9644[/C][C]2.2281[/C][/ROW]
[ROW][C]63[/C][C]0.0422[/C][C]0.0154[/C][C]0.0013[/C][C]57.5868[/C][C]4.7989[/C][C]2.1906[/C][/ROW]
[ROW][C]64[/C][C]0.0471[/C][C]0.0222[/C][C]0.0018[/C][C]121.7143[/C][C]10.1429[/C][C]3.1848[/C][/ROW]
[ROW][C]65[/C][C]0.0517[/C][C]0.0096[/C][C]8e-04[/C][C]23.5844[/C][C]1.9654[/C][C]1.4019[/C][/ROW]
[ROW][C]66[/C][C]0.0564[/C][C]0.0133[/C][C]0.0011[/C][C]46.2673[/C][C]3.8556[/C][C]1.9636[/C][/ROW]
[ROW][C]67[/C][C]0.0616[/C][C]0.0165[/C][C]0.0014[/C][C]71.0616[/C][C]5.9218[/C][C]2.4335[/C][/ROW]
[ROW][C]68[/C][C]0.0674[/C][C]0.0119[/C][C]0.001[/C][C]36.149[/C][C]3.0124[/C][C]1.7356[/C][/ROW]
[ROW][C]69[/C][C]0.0736[/C][C]0.0184[/C][C]0.0015[/C][C]84.2194[/C][C]7.0183[/C][C]2.6492[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36517&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36517&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
580.01310.00514e-048.20690.68390.827
590.01790.01450.001267.87445.65622.3783
600.02270.01980.0016126.588410.5493.2479
610.02810.02860.0024249.609820.80084.5608
620.03650.01550.001359.57244.96442.2281
630.04220.01540.001357.58684.79892.1906
640.04710.02220.0018121.714310.14293.1848
650.05170.00968e-0423.58441.96541.4019
660.05640.01330.001146.26733.85561.9636
670.06160.01650.001471.06165.92182.4335
680.06740.01190.00136.1493.01241.7356
690.07360.01840.001584.21947.01832.6492



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 2 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 2 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
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,fx))
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')