Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 17 Dec 2007 01:37:22 -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/2007/Dec/17/t1197879678om41qvb6vc0qub3.htm/, Retrieved Sat, 04 May 2024 03:19:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4284, Retrieved Sat, 04 May 2024 03:19:15 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact226
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Paper Forecast ti...] [2007-12-17 08:37:22] [cb172450b25aceeff04d58e88e905157] [Current]
Feedback Forum

Post a new message
Dataseries X:
902.2
891.9
874
930.9
944.2
935.9
937.1
885.1
892.4
987.3
946.3
799.6
875.4
846.2
880.6
885.7
868.9
882.5
789.6
773.3
804.3
817.8
836.7
721.8
760.8
841.4
1045.6
949.2
850.1
957.4
851.8
913.9
888
973.8
927.6
833
879.5
797.3
834.5
735.1
835
892.8
697.2
821.1
732.7
797.6
866.3
826.3
778.6
779.2
951
692.3
841.4
857.3
760.7
841.2
810.3
1007.4
931.3
931.2




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

\begin{tabular}{lllllllll}
\hline
Summary of compuational 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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4284&T=0

[TABLE]
[ROW][C]Summary of compuational 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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4284&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4284&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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[48])
36833-------
37879.5-------
38797.3-------
39834.5-------
40735.1-------
41835-------
42892.8-------
43697.2-------
44821.1-------
45732.7-------
46797.6-------
47866.3-------
48826.3-------
49778.6829.3177683.5814975.0540.24760.51620.24990.5162
50779.2823.3226654.3234992.32170.30440.6980.61860.4862
51951938.6934749.2671128.11980.44930.95060.85950.8776
52692.3840.6976632.84191048.55340.08090.14910.84030.554
53841.4847.448622.66891072.22710.4790.91190.54320.5732
54857.3928.4184687.90371168.9330.28110.76090.61420.7973
55760.7774.9464519.66431030.22850.45650.26360.72470.3467
56841.2869.9185600.67771139.15930.41720.78670.63880.6246
57810.3810.774528.26341093.28460.49870.41640.7060.4571
581007.4885.4571590.27261180.64160.20910.69110.72020.6528
59931.3900.3737593.03751207.70990.42180.24740.5860.6817
60931.2834.816515.79071153.84140.27690.27670.52090.5209

\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[48]) \tabularnewline
36 & 833 & - & - & - & - & - & - & - \tabularnewline
37 & 879.5 & - & - & - & - & - & - & - \tabularnewline
38 & 797.3 & - & - & - & - & - & - & - \tabularnewline
39 & 834.5 & - & - & - & - & - & - & - \tabularnewline
40 & 735.1 & - & - & - & - & - & - & - \tabularnewline
41 & 835 & - & - & - & - & - & - & - \tabularnewline
42 & 892.8 & - & - & - & - & - & - & - \tabularnewline
43 & 697.2 & - & - & - & - & - & - & - \tabularnewline
44 & 821.1 & - & - & - & - & - & - & - \tabularnewline
45 & 732.7 & - & - & - & - & - & - & - \tabularnewline
46 & 797.6 & - & - & - & - & - & - & - \tabularnewline
47 & 866.3 & - & - & - & - & - & - & - \tabularnewline
48 & 826.3 & - & - & - & - & - & - & - \tabularnewline
49 & 778.6 & 829.3177 & 683.5814 & 975.054 & 0.2476 & 0.5162 & 0.2499 & 0.5162 \tabularnewline
50 & 779.2 & 823.3226 & 654.3234 & 992.3217 & 0.3044 & 0.698 & 0.6186 & 0.4862 \tabularnewline
51 & 951 & 938.6934 & 749.267 & 1128.1198 & 0.4493 & 0.9506 & 0.8595 & 0.8776 \tabularnewline
52 & 692.3 & 840.6976 & 632.8419 & 1048.5534 & 0.0809 & 0.1491 & 0.8403 & 0.554 \tabularnewline
53 & 841.4 & 847.448 & 622.6689 & 1072.2271 & 0.479 & 0.9119 & 0.5432 & 0.5732 \tabularnewline
54 & 857.3 & 928.4184 & 687.9037 & 1168.933 & 0.2811 & 0.7609 & 0.6142 & 0.7973 \tabularnewline
55 & 760.7 & 774.9464 & 519.6643 & 1030.2285 & 0.4565 & 0.2636 & 0.7247 & 0.3467 \tabularnewline
56 & 841.2 & 869.9185 & 600.6777 & 1139.1593 & 0.4172 & 0.7867 & 0.6388 & 0.6246 \tabularnewline
57 & 810.3 & 810.774 & 528.2634 & 1093.2846 & 0.4987 & 0.4164 & 0.706 & 0.4571 \tabularnewline
58 & 1007.4 & 885.4571 & 590.2726 & 1180.6416 & 0.2091 & 0.6911 & 0.7202 & 0.6528 \tabularnewline
59 & 931.3 & 900.3737 & 593.0375 & 1207.7099 & 0.4218 & 0.2474 & 0.586 & 0.6817 \tabularnewline
60 & 931.2 & 834.816 & 515.7907 & 1153.8414 & 0.2769 & 0.2767 & 0.5209 & 0.5209 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4284&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[48])[/C][/ROW]
[ROW][C]36[/C][C]833[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]879.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]797.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]834.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]735.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]835[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]892.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]697.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]821.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]732.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]797.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]866.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]826.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]778.6[/C][C]829.3177[/C][C]683.5814[/C][C]975.054[/C][C]0.2476[/C][C]0.5162[/C][C]0.2499[/C][C]0.5162[/C][/ROW]
[ROW][C]50[/C][C]779.2[/C][C]823.3226[/C][C]654.3234[/C][C]992.3217[/C][C]0.3044[/C][C]0.698[/C][C]0.6186[/C][C]0.4862[/C][/ROW]
[ROW][C]51[/C][C]951[/C][C]938.6934[/C][C]749.267[/C][C]1128.1198[/C][C]0.4493[/C][C]0.9506[/C][C]0.8595[/C][C]0.8776[/C][/ROW]
[ROW][C]52[/C][C]692.3[/C][C]840.6976[/C][C]632.8419[/C][C]1048.5534[/C][C]0.0809[/C][C]0.1491[/C][C]0.8403[/C][C]0.554[/C][/ROW]
[ROW][C]53[/C][C]841.4[/C][C]847.448[/C][C]622.6689[/C][C]1072.2271[/C][C]0.479[/C][C]0.9119[/C][C]0.5432[/C][C]0.5732[/C][/ROW]
[ROW][C]54[/C][C]857.3[/C][C]928.4184[/C][C]687.9037[/C][C]1168.933[/C][C]0.2811[/C][C]0.7609[/C][C]0.6142[/C][C]0.7973[/C][/ROW]
[ROW][C]55[/C][C]760.7[/C][C]774.9464[/C][C]519.6643[/C][C]1030.2285[/C][C]0.4565[/C][C]0.2636[/C][C]0.7247[/C][C]0.3467[/C][/ROW]
[ROW][C]56[/C][C]841.2[/C][C]869.9185[/C][C]600.6777[/C][C]1139.1593[/C][C]0.4172[/C][C]0.7867[/C][C]0.6388[/C][C]0.6246[/C][/ROW]
[ROW][C]57[/C][C]810.3[/C][C]810.774[/C][C]528.2634[/C][C]1093.2846[/C][C]0.4987[/C][C]0.4164[/C][C]0.706[/C][C]0.4571[/C][/ROW]
[ROW][C]58[/C][C]1007.4[/C][C]885.4571[/C][C]590.2726[/C][C]1180.6416[/C][C]0.2091[/C][C]0.6911[/C][C]0.7202[/C][C]0.6528[/C][/ROW]
[ROW][C]59[/C][C]931.3[/C][C]900.3737[/C][C]593.0375[/C][C]1207.7099[/C][C]0.4218[/C][C]0.2474[/C][C]0.586[/C][C]0.6817[/C][/ROW]
[ROW][C]60[/C][C]931.2[/C][C]834.816[/C][C]515.7907[/C][C]1153.8414[/C][C]0.2769[/C][C]0.2767[/C][C]0.5209[/C][C]0.5209[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4284&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4284&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[48])
36833-------
37879.5-------
38797.3-------
39834.5-------
40735.1-------
41835-------
42892.8-------
43697.2-------
44821.1-------
45732.7-------
46797.6-------
47866.3-------
48826.3-------
49778.6829.3177683.5814975.0540.24760.51620.24990.5162
50779.2823.3226654.3234992.32170.30440.6980.61860.4862
51951938.6934749.2671128.11980.44930.95060.85950.8776
52692.3840.6976632.84191048.55340.08090.14910.84030.554
53841.4847.448622.66891072.22710.4790.91190.54320.5732
54857.3928.4184687.90371168.9330.28110.76090.61420.7973
55760.7774.9464519.66431030.22850.45650.26360.72470.3467
56841.2869.9185600.67771139.15930.41720.78670.63880.6246
57810.3810.774528.26341093.28460.49870.41640.7060.4571
581007.4885.4571590.27261180.64160.20910.69110.72020.6528
59931.3900.3737593.03751207.70990.42180.24740.5860.6817
60931.2834.816515.79071153.84140.27690.27670.52090.5209







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0897-0.06120.00512572.2877214.357314.6409
500.1047-0.05360.00451946.801162.233412.7371
510.1030.01310.0011151.452812.62113.5526
520.1261-0.17650.014722021.86191835.155242.8387
530.1353-0.00716e-0436.57823.04821.7459
540.1322-0.07660.00645057.8249421.485420.5301
550.1681-0.01840.0015202.959116.91334.1126
560.1579-0.0330.0028824.751568.72938.2903
570.1778-6e-0400.22470.01870.1368
580.17010.13770.011514870.07431239.172935.2019
590.17420.03430.0029956.436479.7038.9277
600.1950.11550.00969289.8658774.155527.8236

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0897 & -0.0612 & 0.0051 & 2572.2877 & 214.3573 & 14.6409 \tabularnewline
50 & 0.1047 & -0.0536 & 0.0045 & 1946.801 & 162.2334 & 12.7371 \tabularnewline
51 & 0.103 & 0.0131 & 0.0011 & 151.4528 & 12.6211 & 3.5526 \tabularnewline
52 & 0.1261 & -0.1765 & 0.0147 & 22021.8619 & 1835.1552 & 42.8387 \tabularnewline
53 & 0.1353 & -0.0071 & 6e-04 & 36.5782 & 3.0482 & 1.7459 \tabularnewline
54 & 0.1322 & -0.0766 & 0.0064 & 5057.8249 & 421.4854 & 20.5301 \tabularnewline
55 & 0.1681 & -0.0184 & 0.0015 & 202.9591 & 16.9133 & 4.1126 \tabularnewline
56 & 0.1579 & -0.033 & 0.0028 & 824.7515 & 68.7293 & 8.2903 \tabularnewline
57 & 0.1778 & -6e-04 & 0 & 0.2247 & 0.0187 & 0.1368 \tabularnewline
58 & 0.1701 & 0.1377 & 0.0115 & 14870.0743 & 1239.1729 & 35.2019 \tabularnewline
59 & 0.1742 & 0.0343 & 0.0029 & 956.4364 & 79.703 & 8.9277 \tabularnewline
60 & 0.195 & 0.1155 & 0.0096 & 9289.8658 & 774.1555 & 27.8236 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4284&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]49[/C][C]0.0897[/C][C]-0.0612[/C][C]0.0051[/C][C]2572.2877[/C][C]214.3573[/C][C]14.6409[/C][/ROW]
[ROW][C]50[/C][C]0.1047[/C][C]-0.0536[/C][C]0.0045[/C][C]1946.801[/C][C]162.2334[/C][C]12.7371[/C][/ROW]
[ROW][C]51[/C][C]0.103[/C][C]0.0131[/C][C]0.0011[/C][C]151.4528[/C][C]12.6211[/C][C]3.5526[/C][/ROW]
[ROW][C]52[/C][C]0.1261[/C][C]-0.1765[/C][C]0.0147[/C][C]22021.8619[/C][C]1835.1552[/C][C]42.8387[/C][/ROW]
[ROW][C]53[/C][C]0.1353[/C][C]-0.0071[/C][C]6e-04[/C][C]36.5782[/C][C]3.0482[/C][C]1.7459[/C][/ROW]
[ROW][C]54[/C][C]0.1322[/C][C]-0.0766[/C][C]0.0064[/C][C]5057.8249[/C][C]421.4854[/C][C]20.5301[/C][/ROW]
[ROW][C]55[/C][C]0.1681[/C][C]-0.0184[/C][C]0.0015[/C][C]202.9591[/C][C]16.9133[/C][C]4.1126[/C][/ROW]
[ROW][C]56[/C][C]0.1579[/C][C]-0.033[/C][C]0.0028[/C][C]824.7515[/C][C]68.7293[/C][C]8.2903[/C][/ROW]
[ROW][C]57[/C][C]0.1778[/C][C]-6e-04[/C][C]0[/C][C]0.2247[/C][C]0.0187[/C][C]0.1368[/C][/ROW]
[ROW][C]58[/C][C]0.1701[/C][C]0.1377[/C][C]0.0115[/C][C]14870.0743[/C][C]1239.1729[/C][C]35.2019[/C][/ROW]
[ROW][C]59[/C][C]0.1742[/C][C]0.0343[/C][C]0.0029[/C][C]956.4364[/C][C]79.703[/C][C]8.9277[/C][/ROW]
[ROW][C]60[/C][C]0.195[/C][C]0.1155[/C][C]0.0096[/C][C]9289.8658[/C][C]774.1555[/C][C]27.8236[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4284&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4284&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
490.0897-0.06120.00512572.2877214.357314.6409
500.1047-0.05360.00451946.801162.233412.7371
510.1030.01310.0011151.452812.62113.5526
520.1261-0.17650.014722021.86191835.155242.8387
530.1353-0.00716e-0436.57823.04821.7459
540.1322-0.07660.00645057.8249421.485420.5301
550.1681-0.01840.0015202.959116.91334.1126
560.1579-0.0330.0028824.751568.72938.2903
570.1778-6e-0400.22470.01870.1368
580.17010.13770.011514870.07431239.172935.2019
590.17420.03430.0029956.436479.7038.9277
600.1950.11550.00969289.8658774.155527.8236



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