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 computationSun, 20 Dec 2009 14:59:01 -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/2009/Dec/20/t1261348388t2w344afnj0lq2g.htm/, Retrieved Sat, 27 Apr 2024 10:54:13 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=70041, Retrieved Sat, 27 Apr 2024 10:54:13 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact130
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Paper - Arima For...] [2008-12-14 14:14:00] [7a664918911e34206ce9d0436dd7c1c8]
-   P   [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-15 14:52:51] [12d343c4448a5f9e527bb31caeac580b]
-  M D      [ARIMA Forecasting] [ARIMA Forecasting...] [2009-12-20 21:59:01] [8cd69d0f4298074aa572ca2f9b39b6ae] [Current]
Feedback Forum

Post a new message
Dataseries X:
-1,2
-2,4
0,8
-0,1
-1,5
-4,4
-4,2
3,5
10
8,6
9,5
9,9
10,4
16
12,7
10,2
8,9
12,6
13,6
14,8
9,5
13,7
17
14,7
17,4
9
9,1
12,2
15,9
12,9
10,9
10,6
13,2
9,6
6,4
5,8
-1
-0,2
2,7
3,6
-0,9
0,3
-1,1
-2,5
-3,4
-3,5
-3,9
-4,6
-0,1
4,3
10,2
8,7
13,3
15
20,7
20,7
26,4
31,2
31,4
26,6
26,6
19,2
6,5
3,1
-0,2
-4
-12,6
-13
-17,6
-21,7
-23,2
-16,8
-19,8




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70041&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'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[61])
49-0.1-------
504.3-------
5110.2-------
528.7-------
5313.3-------
5415-------
5520.7-------
5620.7-------
5726.4-------
5831.2-------
5931.4-------
6026.6-------
6126.6-------
6219.231.367520.231842.50320.01610.799310.7993
636.537.267522.109352.425800.99030.99980.9161
643.135.767517.449754.08532e-040.99910.99810.8367
65-0.240.367519.360161.37491e-040.99970.99420.9005
66-442.067518.677865.45731e-040.99980.98830.9025
67-12.647.767522.216673.3184010.98110.9478
68-1347.767520.224575.3105010.9730.934
69-17.653.467524.067182.868010.96440.9634
70-21.758.267527.120289.4148010.95570.9769
71-23.258.467525.666391.2688010.94710.9716
72-16.853.667519.291888.0433010.93860.9386
73-19.853.667517.786389.548700.99990.93040.9304

\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[61]) \tabularnewline
49 & -0.1 & - & - & - & - & - & - & - \tabularnewline
50 & 4.3 & - & - & - & - & - & - & - \tabularnewline
51 & 10.2 & - & - & - & - & - & - & - \tabularnewline
52 & 8.7 & - & - & - & - & - & - & - \tabularnewline
53 & 13.3 & - & - & - & - & - & - & - \tabularnewline
54 & 15 & - & - & - & - & - & - & - \tabularnewline
55 & 20.7 & - & - & - & - & - & - & - \tabularnewline
56 & 20.7 & - & - & - & - & - & - & - \tabularnewline
57 & 26.4 & - & - & - & - & - & - & - \tabularnewline
58 & 31.2 & - & - & - & - & - & - & - \tabularnewline
59 & 31.4 & - & - & - & - & - & - & - \tabularnewline
60 & 26.6 & - & - & - & - & - & - & - \tabularnewline
61 & 26.6 & - & - & - & - & - & - & - \tabularnewline
62 & 19.2 & 31.3675 & 20.2318 & 42.5032 & 0.0161 & 0.7993 & 1 & 0.7993 \tabularnewline
63 & 6.5 & 37.2675 & 22.1093 & 52.4258 & 0 & 0.9903 & 0.9998 & 0.9161 \tabularnewline
64 & 3.1 & 35.7675 & 17.4497 & 54.0853 & 2e-04 & 0.9991 & 0.9981 & 0.8367 \tabularnewline
65 & -0.2 & 40.3675 & 19.3601 & 61.3749 & 1e-04 & 0.9997 & 0.9942 & 0.9005 \tabularnewline
66 & -4 & 42.0675 & 18.6778 & 65.4573 & 1e-04 & 0.9998 & 0.9883 & 0.9025 \tabularnewline
67 & -12.6 & 47.7675 & 22.2166 & 73.3184 & 0 & 1 & 0.9811 & 0.9478 \tabularnewline
68 & -13 & 47.7675 & 20.2245 & 75.3105 & 0 & 1 & 0.973 & 0.934 \tabularnewline
69 & -17.6 & 53.4675 & 24.0671 & 82.868 & 0 & 1 & 0.9644 & 0.9634 \tabularnewline
70 & -21.7 & 58.2675 & 27.1202 & 89.4148 & 0 & 1 & 0.9557 & 0.9769 \tabularnewline
71 & -23.2 & 58.4675 & 25.6663 & 91.2688 & 0 & 1 & 0.9471 & 0.9716 \tabularnewline
72 & -16.8 & 53.6675 & 19.2918 & 88.0433 & 0 & 1 & 0.9386 & 0.9386 \tabularnewline
73 & -19.8 & 53.6675 & 17.7863 & 89.5487 & 0 & 0.9999 & 0.9304 & 0.9304 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70041&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[61])[/C][/ROW]
[ROW][C]49[/C][C]-0.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]4.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]10.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]13.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]20.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]20.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]26.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]31.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]31.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]26.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]26.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]19.2[/C][C]31.3675[/C][C]20.2318[/C][C]42.5032[/C][C]0.0161[/C][C]0.7993[/C][C]1[/C][C]0.7993[/C][/ROW]
[ROW][C]63[/C][C]6.5[/C][C]37.2675[/C][C]22.1093[/C][C]52.4258[/C][C]0[/C][C]0.9903[/C][C]0.9998[/C][C]0.9161[/C][/ROW]
[ROW][C]64[/C][C]3.1[/C][C]35.7675[/C][C]17.4497[/C][C]54.0853[/C][C]2e-04[/C][C]0.9991[/C][C]0.9981[/C][C]0.8367[/C][/ROW]
[ROW][C]65[/C][C]-0.2[/C][C]40.3675[/C][C]19.3601[/C][C]61.3749[/C][C]1e-04[/C][C]0.9997[/C][C]0.9942[/C][C]0.9005[/C][/ROW]
[ROW][C]66[/C][C]-4[/C][C]42.0675[/C][C]18.6778[/C][C]65.4573[/C][C]1e-04[/C][C]0.9998[/C][C]0.9883[/C][C]0.9025[/C][/ROW]
[ROW][C]67[/C][C]-12.6[/C][C]47.7675[/C][C]22.2166[/C][C]73.3184[/C][C]0[/C][C]1[/C][C]0.9811[/C][C]0.9478[/C][/ROW]
[ROW][C]68[/C][C]-13[/C][C]47.7675[/C][C]20.2245[/C][C]75.3105[/C][C]0[/C][C]1[/C][C]0.973[/C][C]0.934[/C][/ROW]
[ROW][C]69[/C][C]-17.6[/C][C]53.4675[/C][C]24.0671[/C][C]82.868[/C][C]0[/C][C]1[/C][C]0.9644[/C][C]0.9634[/C][/ROW]
[ROW][C]70[/C][C]-21.7[/C][C]58.2675[/C][C]27.1202[/C][C]89.4148[/C][C]0[/C][C]1[/C][C]0.9557[/C][C]0.9769[/C][/ROW]
[ROW][C]71[/C][C]-23.2[/C][C]58.4675[/C][C]25.6663[/C][C]91.2688[/C][C]0[/C][C]1[/C][C]0.9471[/C][C]0.9716[/C][/ROW]
[ROW][C]72[/C][C]-16.8[/C][C]53.6675[/C][C]19.2918[/C][C]88.0433[/C][C]0[/C][C]1[/C][C]0.9386[/C][C]0.9386[/C][/ROW]
[ROW][C]73[/C][C]-19.8[/C][C]53.6675[/C][C]17.7863[/C][C]89.5487[/C][C]0[/C][C]0.9999[/C][C]0.9304[/C][C]0.9304[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70041&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70041&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[61])
49-0.1-------
504.3-------
5110.2-------
528.7-------
5313.3-------
5415-------
5520.7-------
5620.7-------
5726.4-------
5831.2-------
5931.4-------
6026.6-------
6126.6-------
6219.231.367520.231842.50320.01610.799310.7993
636.537.267522.109352.425800.99030.99980.9161
643.135.767517.449754.08532e-040.99910.99810.8367
65-0.240.367519.360161.37491e-040.99970.99420.9005
66-442.067518.677865.45731e-040.99980.98830.9025
67-12.647.767522.216673.3184010.98110.9478
68-1347.767520.224575.3105010.9730.934
69-17.653.467524.067182.868010.96440.9634
70-21.758.267527.120289.4148010.95570.9769
71-23.258.467525.666391.2688010.94710.9716
72-16.853.667519.291888.0433010.93860.9386
73-19.853.667517.786389.548700.99990.93040.9304







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.1811-0.38790.0323148.048812.33743.5125
630.2075-0.82560.0688946.64178.88688.8818
640.2613-0.91330.07611067.167788.93069.4303
650.2655-1.0050.08371645.7247137.143711.7108
660.2837-1.09510.09132122.2175176.851513.2986
670.2729-1.26380.10533644.2389303.686617.4266
680.2942-1.27220.1063692.693307.724417.5421
690.2805-1.32920.11085050.5941420.882820.5154
700.2727-1.37240.11446394.8062532.900523.0846
710.2862-1.39680.11646669.5858555.798823.5754
720.3268-1.3130.10944965.6731413.806120.3422
730.3411-1.36890.11415397.4783449.789921.2082

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.1811 & -0.3879 & 0.0323 & 148.0488 & 12.3374 & 3.5125 \tabularnewline
63 & 0.2075 & -0.8256 & 0.0688 & 946.641 & 78.8868 & 8.8818 \tabularnewline
64 & 0.2613 & -0.9133 & 0.0761 & 1067.1677 & 88.9306 & 9.4303 \tabularnewline
65 & 0.2655 & -1.005 & 0.0837 & 1645.7247 & 137.1437 & 11.7108 \tabularnewline
66 & 0.2837 & -1.0951 & 0.0913 & 2122.2175 & 176.8515 & 13.2986 \tabularnewline
67 & 0.2729 & -1.2638 & 0.1053 & 3644.2389 & 303.6866 & 17.4266 \tabularnewline
68 & 0.2942 & -1.2722 & 0.106 & 3692.693 & 307.7244 & 17.5421 \tabularnewline
69 & 0.2805 & -1.3292 & 0.1108 & 5050.5941 & 420.8828 & 20.5154 \tabularnewline
70 & 0.2727 & -1.3724 & 0.1144 & 6394.8062 & 532.9005 & 23.0846 \tabularnewline
71 & 0.2862 & -1.3968 & 0.1164 & 6669.5858 & 555.7988 & 23.5754 \tabularnewline
72 & 0.3268 & -1.313 & 0.1094 & 4965.6731 & 413.8061 & 20.3422 \tabularnewline
73 & 0.3411 & -1.3689 & 0.1141 & 5397.4783 & 449.7899 & 21.2082 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70041&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]62[/C][C]0.1811[/C][C]-0.3879[/C][C]0.0323[/C][C]148.0488[/C][C]12.3374[/C][C]3.5125[/C][/ROW]
[ROW][C]63[/C][C]0.2075[/C][C]-0.8256[/C][C]0.0688[/C][C]946.641[/C][C]78.8868[/C][C]8.8818[/C][/ROW]
[ROW][C]64[/C][C]0.2613[/C][C]-0.9133[/C][C]0.0761[/C][C]1067.1677[/C][C]88.9306[/C][C]9.4303[/C][/ROW]
[ROW][C]65[/C][C]0.2655[/C][C]-1.005[/C][C]0.0837[/C][C]1645.7247[/C][C]137.1437[/C][C]11.7108[/C][/ROW]
[ROW][C]66[/C][C]0.2837[/C][C]-1.0951[/C][C]0.0913[/C][C]2122.2175[/C][C]176.8515[/C][C]13.2986[/C][/ROW]
[ROW][C]67[/C][C]0.2729[/C][C]-1.2638[/C][C]0.1053[/C][C]3644.2389[/C][C]303.6866[/C][C]17.4266[/C][/ROW]
[ROW][C]68[/C][C]0.2942[/C][C]-1.2722[/C][C]0.106[/C][C]3692.693[/C][C]307.7244[/C][C]17.5421[/C][/ROW]
[ROW][C]69[/C][C]0.2805[/C][C]-1.3292[/C][C]0.1108[/C][C]5050.5941[/C][C]420.8828[/C][C]20.5154[/C][/ROW]
[ROW][C]70[/C][C]0.2727[/C][C]-1.3724[/C][C]0.1144[/C][C]6394.8062[/C][C]532.9005[/C][C]23.0846[/C][/ROW]
[ROW][C]71[/C][C]0.2862[/C][C]-1.3968[/C][C]0.1164[/C][C]6669.5858[/C][C]555.7988[/C][C]23.5754[/C][/ROW]
[ROW][C]72[/C][C]0.3268[/C][C]-1.313[/C][C]0.1094[/C][C]4965.6731[/C][C]413.8061[/C][C]20.3422[/C][/ROW]
[ROW][C]73[/C][C]0.3411[/C][C]-1.3689[/C][C]0.1141[/C][C]5397.4783[/C][C]449.7899[/C][C]21.2082[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70041&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70041&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
620.1811-0.38790.0323148.048812.33743.5125
630.2075-0.82560.0688946.64178.88688.8818
640.2613-0.91330.07611067.167788.93069.4303
650.2655-1.0050.08371645.7247137.143711.7108
660.2837-1.09510.09132122.2175176.851513.2986
670.2729-1.26380.10533644.2389303.686617.4266
680.2942-1.27220.1063692.693307.724417.5421
690.2805-1.32920.11085050.5941420.882820.5154
700.2727-1.37240.11446394.8062532.900523.0846
710.2862-1.39680.11646669.5858555.798823.5754
720.3268-1.3130.10944965.6731413.806120.3422
730.3411-1.36890.11415397.4783449.789921.2082



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