Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 07 Dec 2007 09:54:38 -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/07/t1197045675o1f2fodnu9s2i95.htm/, Retrieved Mon, 29 Apr 2024 06:25:07 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2886, Retrieved Mon, 29 Apr 2024 06:25:07 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact349
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA forecasting...] [2007-12-07 16:54:38] [1a2581828a3030ed7733053b32a6f065] [Current]
Feedback Forum

Post a new message
Dataseries X:
96,8
87,0
96,3
107,1
115,2
106,1
89,5
91,3
97,6
100,7
104,6
94,7
101,8
102,5
105,3
110,3
109,8
117,3
118,8
131,3
125,9
133,1
147,0
145,8
164,4
149,8
137,7
151,7
156,8
180,0
180,4
170,4
191,6
199,5
218,2
217,5
205,0
194,0
199,3
219,3
211,1
215,2
240,2
242,2
240,7
255,4
253,0
218,2
203,7
205,6
215,6
188,5
202,9
214,0
230,3
230,0
241,0
259,6
247,8
270,3




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=2886&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=2886&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2886&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])
36217.5-------
37205-------
38194-------
39199.3-------
40219.3-------
41211.1-------
42215.2-------
43240.2-------
44242.2-------
45240.7-------
46255.4-------
47253-------
48218.2-------
49203.7212.4672188.7941236.14030.2340.31750.73180.3175
50205.6201.9663161.7922242.14040.42960.46630.65120.2142
51215.6196.4509148.796244.10580.21550.35330.45340.1855
52188.5213.6735158.6309268.71620.1850.47270.42060.436
53202.9209.8459149.5184270.17340.41070.7560.48370.393
54214221.8523156.7176286.98690.40660.71580.57930.5438
55230.3234.6451165.572303.71830.45090.7210.43740.6796
56230230.4206157.8405303.00080.49550.50130.37520.6293
57241238.2045162.5988313.81020.47110.58420.47420.698
58259.6249.031170.7338327.32830.39570.57970.43670.7799
59247.8255.3057174.6335335.97780.42770.45850.52230.8163
60270.3235.0917152.2978317.88560.20230.38180.65540.6554

\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 & 217.5 & - & - & - & - & - & - & - \tabularnewline
37 & 205 & - & - & - & - & - & - & - \tabularnewline
38 & 194 & - & - & - & - & - & - & - \tabularnewline
39 & 199.3 & - & - & - & - & - & - & - \tabularnewline
40 & 219.3 & - & - & - & - & - & - & - \tabularnewline
41 & 211.1 & - & - & - & - & - & - & - \tabularnewline
42 & 215.2 & - & - & - & - & - & - & - \tabularnewline
43 & 240.2 & - & - & - & - & - & - & - \tabularnewline
44 & 242.2 & - & - & - & - & - & - & - \tabularnewline
45 & 240.7 & - & - & - & - & - & - & - \tabularnewline
46 & 255.4 & - & - & - & - & - & - & - \tabularnewline
47 & 253 & - & - & - & - & - & - & - \tabularnewline
48 & 218.2 & - & - & - & - & - & - & - \tabularnewline
49 & 203.7 & 212.4672 & 188.7941 & 236.1403 & 0.234 & 0.3175 & 0.7318 & 0.3175 \tabularnewline
50 & 205.6 & 201.9663 & 161.7922 & 242.1404 & 0.4296 & 0.4663 & 0.6512 & 0.2142 \tabularnewline
51 & 215.6 & 196.4509 & 148.796 & 244.1058 & 0.2155 & 0.3533 & 0.4534 & 0.1855 \tabularnewline
52 & 188.5 & 213.6735 & 158.6309 & 268.7162 & 0.185 & 0.4727 & 0.4206 & 0.436 \tabularnewline
53 & 202.9 & 209.8459 & 149.5184 & 270.1734 & 0.4107 & 0.756 & 0.4837 & 0.393 \tabularnewline
54 & 214 & 221.8523 & 156.7176 & 286.9869 & 0.4066 & 0.7158 & 0.5793 & 0.5438 \tabularnewline
55 & 230.3 & 234.6451 & 165.572 & 303.7183 & 0.4509 & 0.721 & 0.4374 & 0.6796 \tabularnewline
56 & 230 & 230.4206 & 157.8405 & 303.0008 & 0.4955 & 0.5013 & 0.3752 & 0.6293 \tabularnewline
57 & 241 & 238.2045 & 162.5988 & 313.8102 & 0.4711 & 0.5842 & 0.4742 & 0.698 \tabularnewline
58 & 259.6 & 249.031 & 170.7338 & 327.3283 & 0.3957 & 0.5797 & 0.4367 & 0.7799 \tabularnewline
59 & 247.8 & 255.3057 & 174.6335 & 335.9778 & 0.4277 & 0.4585 & 0.5223 & 0.8163 \tabularnewline
60 & 270.3 & 235.0917 & 152.2978 & 317.8856 & 0.2023 & 0.3818 & 0.6554 & 0.6554 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2886&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]217.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]205[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]194[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]199.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]219.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]211.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]215.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]240.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]242.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]240.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]255.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]253[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]218.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]203.7[/C][C]212.4672[/C][C]188.7941[/C][C]236.1403[/C][C]0.234[/C][C]0.3175[/C][C]0.7318[/C][C]0.3175[/C][/ROW]
[ROW][C]50[/C][C]205.6[/C][C]201.9663[/C][C]161.7922[/C][C]242.1404[/C][C]0.4296[/C][C]0.4663[/C][C]0.6512[/C][C]0.2142[/C][/ROW]
[ROW][C]51[/C][C]215.6[/C][C]196.4509[/C][C]148.796[/C][C]244.1058[/C][C]0.2155[/C][C]0.3533[/C][C]0.4534[/C][C]0.1855[/C][/ROW]
[ROW][C]52[/C][C]188.5[/C][C]213.6735[/C][C]158.6309[/C][C]268.7162[/C][C]0.185[/C][C]0.4727[/C][C]0.4206[/C][C]0.436[/C][/ROW]
[ROW][C]53[/C][C]202.9[/C][C]209.8459[/C][C]149.5184[/C][C]270.1734[/C][C]0.4107[/C][C]0.756[/C][C]0.4837[/C][C]0.393[/C][/ROW]
[ROW][C]54[/C][C]214[/C][C]221.8523[/C][C]156.7176[/C][C]286.9869[/C][C]0.4066[/C][C]0.7158[/C][C]0.5793[/C][C]0.5438[/C][/ROW]
[ROW][C]55[/C][C]230.3[/C][C]234.6451[/C][C]165.572[/C][C]303.7183[/C][C]0.4509[/C][C]0.721[/C][C]0.4374[/C][C]0.6796[/C][/ROW]
[ROW][C]56[/C][C]230[/C][C]230.4206[/C][C]157.8405[/C][C]303.0008[/C][C]0.4955[/C][C]0.5013[/C][C]0.3752[/C][C]0.6293[/C][/ROW]
[ROW][C]57[/C][C]241[/C][C]238.2045[/C][C]162.5988[/C][C]313.8102[/C][C]0.4711[/C][C]0.5842[/C][C]0.4742[/C][C]0.698[/C][/ROW]
[ROW][C]58[/C][C]259.6[/C][C]249.031[/C][C]170.7338[/C][C]327.3283[/C][C]0.3957[/C][C]0.5797[/C][C]0.4367[/C][C]0.7799[/C][/ROW]
[ROW][C]59[/C][C]247.8[/C][C]255.3057[/C][C]174.6335[/C][C]335.9778[/C][C]0.4277[/C][C]0.4585[/C][C]0.5223[/C][C]0.8163[/C][/ROW]
[ROW][C]60[/C][C]270.3[/C][C]235.0917[/C][C]152.2978[/C][C]317.8856[/C][C]0.2023[/C][C]0.3818[/C][C]0.6554[/C][C]0.6554[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2886&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2886&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])
36217.5-------
37205-------
38194-------
39199.3-------
40219.3-------
41211.1-------
42215.2-------
43240.2-------
44242.2-------
45240.7-------
46255.4-------
47253-------
48218.2-------
49203.7212.4672188.7941236.14030.2340.31750.73180.3175
50205.6201.9663161.7922242.14040.42960.46630.65120.2142
51215.6196.4509148.796244.10580.21550.35330.45340.1855
52188.5213.6735158.6309268.71620.1850.47270.42060.436
53202.9209.8459149.5184270.17340.41070.7560.48370.393
54214221.8523156.7176286.98690.40660.71580.57930.5438
55230.3234.6451165.572303.71830.45090.7210.43740.6796
56230230.4206157.8405303.00080.49550.50130.37520.6293
57241238.2045162.5988313.81020.47110.58420.47420.698
58259.6249.031170.7338327.32830.39570.57970.43670.7799
59247.8255.3057174.6335335.97780.42770.45850.52230.8163
60270.3235.0917152.2978317.88560.20230.38180.65540.6554







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0568-0.04130.003476.86396.40532.5309
500.10150.0180.001513.20391.10031.049
510.12380.09750.0081366.689330.55745.5279
520.1314-0.11780.0098633.707152.80897.267
530.1467-0.03310.002848.2454.02042.0051
540.1498-0.03540.002961.65795.13822.2668
550.1502-0.01850.001518.88031.57341.2543
560.1607-0.00182e-040.17690.01470.1214
570.16190.01170.0017.81490.65120.807
580.16040.04240.0035111.70299.30863.051
590.1612-0.02940.002456.33484.69462.1667
600.17970.14980.01251239.6215103.301810.1637

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0568 & -0.0413 & 0.0034 & 76.8639 & 6.4053 & 2.5309 \tabularnewline
50 & 0.1015 & 0.018 & 0.0015 & 13.2039 & 1.1003 & 1.049 \tabularnewline
51 & 0.1238 & 0.0975 & 0.0081 & 366.6893 & 30.5574 & 5.5279 \tabularnewline
52 & 0.1314 & -0.1178 & 0.0098 & 633.7071 & 52.8089 & 7.267 \tabularnewline
53 & 0.1467 & -0.0331 & 0.0028 & 48.245 & 4.0204 & 2.0051 \tabularnewline
54 & 0.1498 & -0.0354 & 0.0029 & 61.6579 & 5.1382 & 2.2668 \tabularnewline
55 & 0.1502 & -0.0185 & 0.0015 & 18.8803 & 1.5734 & 1.2543 \tabularnewline
56 & 0.1607 & -0.0018 & 2e-04 & 0.1769 & 0.0147 & 0.1214 \tabularnewline
57 & 0.1619 & 0.0117 & 0.001 & 7.8149 & 0.6512 & 0.807 \tabularnewline
58 & 0.1604 & 0.0424 & 0.0035 & 111.7029 & 9.3086 & 3.051 \tabularnewline
59 & 0.1612 & -0.0294 & 0.0024 & 56.3348 & 4.6946 & 2.1667 \tabularnewline
60 & 0.1797 & 0.1498 & 0.0125 & 1239.6215 & 103.3018 & 10.1637 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2886&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.0568[/C][C]-0.0413[/C][C]0.0034[/C][C]76.8639[/C][C]6.4053[/C][C]2.5309[/C][/ROW]
[ROW][C]50[/C][C]0.1015[/C][C]0.018[/C][C]0.0015[/C][C]13.2039[/C][C]1.1003[/C][C]1.049[/C][/ROW]
[ROW][C]51[/C][C]0.1238[/C][C]0.0975[/C][C]0.0081[/C][C]366.6893[/C][C]30.5574[/C][C]5.5279[/C][/ROW]
[ROW][C]52[/C][C]0.1314[/C][C]-0.1178[/C][C]0.0098[/C][C]633.7071[/C][C]52.8089[/C][C]7.267[/C][/ROW]
[ROW][C]53[/C][C]0.1467[/C][C]-0.0331[/C][C]0.0028[/C][C]48.245[/C][C]4.0204[/C][C]2.0051[/C][/ROW]
[ROW][C]54[/C][C]0.1498[/C][C]-0.0354[/C][C]0.0029[/C][C]61.6579[/C][C]5.1382[/C][C]2.2668[/C][/ROW]
[ROW][C]55[/C][C]0.1502[/C][C]-0.0185[/C][C]0.0015[/C][C]18.8803[/C][C]1.5734[/C][C]1.2543[/C][/ROW]
[ROW][C]56[/C][C]0.1607[/C][C]-0.0018[/C][C]2e-04[/C][C]0.1769[/C][C]0.0147[/C][C]0.1214[/C][/ROW]
[ROW][C]57[/C][C]0.1619[/C][C]0.0117[/C][C]0.001[/C][C]7.8149[/C][C]0.6512[/C][C]0.807[/C][/ROW]
[ROW][C]58[/C][C]0.1604[/C][C]0.0424[/C][C]0.0035[/C][C]111.7029[/C][C]9.3086[/C][C]3.051[/C][/ROW]
[ROW][C]59[/C][C]0.1612[/C][C]-0.0294[/C][C]0.0024[/C][C]56.3348[/C][C]4.6946[/C][C]2.1667[/C][/ROW]
[ROW][C]60[/C][C]0.1797[/C][C]0.1498[/C][C]0.0125[/C][C]1239.6215[/C][C]103.3018[/C][C]10.1637[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2886&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2886&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.0568-0.04130.003476.86396.40532.5309
500.10150.0180.001513.20391.10031.049
510.12380.09750.0081366.689330.55745.5279
520.1314-0.11780.0098633.707152.80897.267
530.1467-0.03310.002848.2454.02042.0051
540.1498-0.03540.002961.65795.13822.2668
550.1502-0.01850.001518.88031.57341.2543
560.1607-0.00182e-040.17690.01470.1214
570.16190.01170.0017.81490.65120.807
580.16040.04240.0035111.70299.30863.051
590.1612-0.02940.002456.33484.69462.1667
600.17970.14980.01251239.6215103.301810.1637



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