Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSun, 09 Dec 2007 12:02:59 -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/09/t1197226300hs7zsiedjv1pkx7.htm/, Retrieved Wed, 08 May 2024 09:17:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2973, Retrieved Wed, 08 May 2024 09:17:15 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact279
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Forcasting - gron...] [2007-12-09 19:02:59] [bebbf4ab6ac77d61a56e6916ab0650f9] [Current]
Feedback Forum

Post a new message
Dataseries X:
75,9
77,7
86,9
90,7
91,0
89,5
92,5
94,1
98,5
96,8
91,2
97,1
104,9
110,9
104,8
94,1
95,8
99,3
101,1
104,0
99,0
105,4
107,1
110,7
117,1
118,7
126,5
127,5
134,6
131,8
135,9
142,7
141,7
153,4
145,0
137,7
148,3
152,2
169,4
168,6
161,1
174,1
179,0
190,6
190,0
181,6
174,8
180,5
196,8
193,8
197,0
216,3
221,4
217,9
229,7
227,4
204,2
196,6
198,8
207,5
190,7
201,6
210,5
223,5
223,8
231,2
244,0




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2973&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2973&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2973&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 time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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])
43179-------
44190.6-------
45190-------
46181.600000000000-------
47174.8-------
48180.500000000000-------
49196.8-------
50193.8-------
51197-------
52216.3-------
53221.400000000000-------
54217.9-------
55229.7-------
56227.4242.4098268.0162219.46880.90010.138800.1388
57204.2239.6277276.947207.76580.98530.2260.00110.2707
58196.6243.819286.6154207.94730.99510.01523e-040.2202
59198.8236.0351281.2804198.66730.97460.01937e-040.3698
60207.5241.2302292.6128199.59910.94390.02290.00210.2936
61190.7259.1112319.9905210.73160.99720.01830.00580.1167
62201.6264.9304331.8253212.57250.99110.00270.00390.0936
63210.5279.2865354.7339221.11730.98980.00440.00280.0474
64223.5280.9248361.361219.74780.96710.0120.01920.0504
65223.8284.1724370.0679219.7020.96680.03260.02820.0489
66231.2287.8302379.2651220.06270.94930.0320.02160.0464
67244298.0487397.4627225.30760.92740.03580.03280.0328

\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 & 179 & - & - & - & - & - & - & - \tabularnewline
44 & 190.6 & - & - & - & - & - & - & - \tabularnewline
45 & 190 & - & - & - & - & - & - & - \tabularnewline
46 & 181.600000000000 & - & - & - & - & - & - & - \tabularnewline
47 & 174.8 & - & - & - & - & - & - & - \tabularnewline
48 & 180.500000000000 & - & - & - & - & - & - & - \tabularnewline
49 & 196.8 & - & - & - & - & - & - & - \tabularnewline
50 & 193.8 & - & - & - & - & - & - & - \tabularnewline
51 & 197 & - & - & - & - & - & - & - \tabularnewline
52 & 216.3 & - & - & - & - & - & - & - \tabularnewline
53 & 221.400000000000 & - & - & - & - & - & - & - \tabularnewline
54 & 217.9 & - & - & - & - & - & - & - \tabularnewline
55 & 229.7 & - & - & - & - & - & - & - \tabularnewline
56 & 227.4 & 242.4098 & 268.0162 & 219.4688 & 0.9001 & 0.1388 & 0 & 0.1388 \tabularnewline
57 & 204.2 & 239.6277 & 276.947 & 207.7658 & 0.9853 & 0.226 & 0.0011 & 0.2707 \tabularnewline
58 & 196.6 & 243.819 & 286.6154 & 207.9473 & 0.9951 & 0.0152 & 3e-04 & 0.2202 \tabularnewline
59 & 198.8 & 236.0351 & 281.2804 & 198.6673 & 0.9746 & 0.0193 & 7e-04 & 0.3698 \tabularnewline
60 & 207.5 & 241.2302 & 292.6128 & 199.5991 & 0.9439 & 0.0229 & 0.0021 & 0.2936 \tabularnewline
61 & 190.7 & 259.1112 & 319.9905 & 210.7316 & 0.9972 & 0.0183 & 0.0058 & 0.1167 \tabularnewline
62 & 201.6 & 264.9304 & 331.8253 & 212.5725 & 0.9911 & 0.0027 & 0.0039 & 0.0936 \tabularnewline
63 & 210.5 & 279.2865 & 354.7339 & 221.1173 & 0.9898 & 0.0044 & 0.0028 & 0.0474 \tabularnewline
64 & 223.5 & 280.9248 & 361.361 & 219.7478 & 0.9671 & 0.012 & 0.0192 & 0.0504 \tabularnewline
65 & 223.8 & 284.1724 & 370.0679 & 219.702 & 0.9668 & 0.0326 & 0.0282 & 0.0489 \tabularnewline
66 & 231.2 & 287.8302 & 379.2651 & 220.0627 & 0.9493 & 0.032 & 0.0216 & 0.0464 \tabularnewline
67 & 244 & 298.0487 & 397.4627 & 225.3076 & 0.9274 & 0.0358 & 0.0328 & 0.0328 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2973&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]179[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]190.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]190[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]181.600000000000[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]174.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]180.500000000000[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]196.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]193.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]197[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]216.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]221.400000000000[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]217.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]229.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]227.4[/C][C]242.4098[/C][C]268.0162[/C][C]219.4688[/C][C]0.9001[/C][C]0.1388[/C][C]0[/C][C]0.1388[/C][/ROW]
[ROW][C]57[/C][C]204.2[/C][C]239.6277[/C][C]276.947[/C][C]207.7658[/C][C]0.9853[/C][C]0.226[/C][C]0.0011[/C][C]0.2707[/C][/ROW]
[ROW][C]58[/C][C]196.6[/C][C]243.819[/C][C]286.6154[/C][C]207.9473[/C][C]0.9951[/C][C]0.0152[/C][C]3e-04[/C][C]0.2202[/C][/ROW]
[ROW][C]59[/C][C]198.8[/C][C]236.0351[/C][C]281.2804[/C][C]198.6673[/C][C]0.9746[/C][C]0.0193[/C][C]7e-04[/C][C]0.3698[/C][/ROW]
[ROW][C]60[/C][C]207.5[/C][C]241.2302[/C][C]292.6128[/C][C]199.5991[/C][C]0.9439[/C][C]0.0229[/C][C]0.0021[/C][C]0.2936[/C][/ROW]
[ROW][C]61[/C][C]190.7[/C][C]259.1112[/C][C]319.9905[/C][C]210.7316[/C][C]0.9972[/C][C]0.0183[/C][C]0.0058[/C][C]0.1167[/C][/ROW]
[ROW][C]62[/C][C]201.6[/C][C]264.9304[/C][C]331.8253[/C][C]212.5725[/C][C]0.9911[/C][C]0.0027[/C][C]0.0039[/C][C]0.0936[/C][/ROW]
[ROW][C]63[/C][C]210.5[/C][C]279.2865[/C][C]354.7339[/C][C]221.1173[/C][C]0.9898[/C][C]0.0044[/C][C]0.0028[/C][C]0.0474[/C][/ROW]
[ROW][C]64[/C][C]223.5[/C][C]280.9248[/C][C]361.361[/C][C]219.7478[/C][C]0.9671[/C][C]0.012[/C][C]0.0192[/C][C]0.0504[/C][/ROW]
[ROW][C]65[/C][C]223.8[/C][C]284.1724[/C][C]370.0679[/C][C]219.702[/C][C]0.9668[/C][C]0.0326[/C][C]0.0282[/C][C]0.0489[/C][/ROW]
[ROW][C]66[/C][C]231.2[/C][C]287.8302[/C][C]379.2651[/C][C]220.0627[/C][C]0.9493[/C][C]0.032[/C][C]0.0216[/C][C]0.0464[/C][/ROW]
[ROW][C]67[/C][C]244[/C][C]298.0487[/C][C]397.4627[/C][C]225.3076[/C][C]0.9274[/C][C]0.0358[/C][C]0.0328[/C][C]0.0328[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2973&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2973&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])
43179-------
44190.6-------
45190-------
46181.600000000000-------
47174.8-------
48180.500000000000-------
49196.8-------
50193.8-------
51197-------
52216.3-------
53221.400000000000-------
54217.9-------
55229.7-------
56227.4242.4098268.0162219.46880.90010.138800.1388
57204.2239.6277276.947207.76580.98530.2260.00110.2707
58196.6243.819286.6154207.94730.99510.01523e-040.2202
59198.8236.0351281.2804198.66730.97460.01937e-040.3698
60207.5241.2302292.6128199.59910.94390.02290.00210.2936
61190.7259.1112319.9905210.73160.99720.01830.00580.1167
62201.6264.9304331.8253212.57250.99110.00270.00390.0936
63210.5279.2865354.7339221.11730.98980.00440.00280.0474
64223.5280.9248361.361219.74780.96710.0120.01920.0504
65223.8284.1724370.0679219.7020.96680.03260.02820.0489
66231.2287.8302379.2651220.06270.94930.0320.02160.0464
67244298.0487397.4627225.30760.92740.03580.03280.0328







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
56-0.0483-0.06190.0052225.293118.77444.3329
57-0.0678-0.14780.01231255.1191104.593310.2271
58-0.0751-0.19370.01612229.6323185.802713.6309
59-0.0808-0.15780.01311386.452115.537710.7488
60-0.0881-0.13980.01171137.724594.81049.7371
61-0.0953-0.2640.0224680.0971390.008119.7486
62-0.1008-0.2390.01994010.7423334.228518.2819
63-0.1063-0.24630.02054731.5837394.298619.857
64-0.1111-0.20440.0173297.6021274.800216.5771
65-0.1158-0.21240.01773644.8306303.735917.428
66-0.1201-0.19670.01643206.9827267.248616.3477
67-0.1245-0.18130.01512921.2588243.438215.6025

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
56 & -0.0483 & -0.0619 & 0.0052 & 225.2931 & 18.7744 & 4.3329 \tabularnewline
57 & -0.0678 & -0.1478 & 0.0123 & 1255.1191 & 104.5933 & 10.2271 \tabularnewline
58 & -0.0751 & -0.1937 & 0.0161 & 2229.6323 & 185.8027 & 13.6309 \tabularnewline
59 & -0.0808 & -0.1578 & 0.0131 & 1386.452 & 115.5377 & 10.7488 \tabularnewline
60 & -0.0881 & -0.1398 & 0.0117 & 1137.7245 & 94.8104 & 9.7371 \tabularnewline
61 & -0.0953 & -0.264 & 0.022 & 4680.0971 & 390.0081 & 19.7486 \tabularnewline
62 & -0.1008 & -0.239 & 0.0199 & 4010.7423 & 334.2285 & 18.2819 \tabularnewline
63 & -0.1063 & -0.2463 & 0.0205 & 4731.5837 & 394.2986 & 19.857 \tabularnewline
64 & -0.1111 & -0.2044 & 0.017 & 3297.6021 & 274.8002 & 16.5771 \tabularnewline
65 & -0.1158 & -0.2124 & 0.0177 & 3644.8306 & 303.7359 & 17.428 \tabularnewline
66 & -0.1201 & -0.1967 & 0.0164 & 3206.9827 & 267.2486 & 16.3477 \tabularnewline
67 & -0.1245 & -0.1813 & 0.0151 & 2921.2588 & 243.4382 & 15.6025 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2973&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.0483[/C][C]-0.0619[/C][C]0.0052[/C][C]225.2931[/C][C]18.7744[/C][C]4.3329[/C][/ROW]
[ROW][C]57[/C][C]-0.0678[/C][C]-0.1478[/C][C]0.0123[/C][C]1255.1191[/C][C]104.5933[/C][C]10.2271[/C][/ROW]
[ROW][C]58[/C][C]-0.0751[/C][C]-0.1937[/C][C]0.0161[/C][C]2229.6323[/C][C]185.8027[/C][C]13.6309[/C][/ROW]
[ROW][C]59[/C][C]-0.0808[/C][C]-0.1578[/C][C]0.0131[/C][C]1386.452[/C][C]115.5377[/C][C]10.7488[/C][/ROW]
[ROW][C]60[/C][C]-0.0881[/C][C]-0.1398[/C][C]0.0117[/C][C]1137.7245[/C][C]94.8104[/C][C]9.7371[/C][/ROW]
[ROW][C]61[/C][C]-0.0953[/C][C]-0.264[/C][C]0.022[/C][C]4680.0971[/C][C]390.0081[/C][C]19.7486[/C][/ROW]
[ROW][C]62[/C][C]-0.1008[/C][C]-0.239[/C][C]0.0199[/C][C]4010.7423[/C][C]334.2285[/C][C]18.2819[/C][/ROW]
[ROW][C]63[/C][C]-0.1063[/C][C]-0.2463[/C][C]0.0205[/C][C]4731.5837[/C][C]394.2986[/C][C]19.857[/C][/ROW]
[ROW][C]64[/C][C]-0.1111[/C][C]-0.2044[/C][C]0.017[/C][C]3297.6021[/C][C]274.8002[/C][C]16.5771[/C][/ROW]
[ROW][C]65[/C][C]-0.1158[/C][C]-0.2124[/C][C]0.0177[/C][C]3644.8306[/C][C]303.7359[/C][C]17.428[/C][/ROW]
[ROW][C]66[/C][C]-0.1201[/C][C]-0.1967[/C][C]0.0164[/C][C]3206.9827[/C][C]267.2486[/C][C]16.3477[/C][/ROW]
[ROW][C]67[/C][C]-0.1245[/C][C]-0.1813[/C][C]0.0151[/C][C]2921.2588[/C][C]243.4382[/C][C]15.6025[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2973&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2973&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
56-0.0483-0.06190.0052225.293118.77444.3329
57-0.0678-0.14780.01231255.1191104.593310.2271
58-0.0751-0.19370.01612229.6323185.802713.6309
59-0.0808-0.15780.01311386.452115.537710.7488
60-0.0881-0.13980.01171137.724594.81049.7371
61-0.0953-0.2640.0224680.0971390.008119.7486
62-0.1008-0.2390.01994010.7423334.228518.2819
63-0.1063-0.24630.02054731.5837394.298619.857
64-0.1111-0.20440.0173297.6021274.800216.5771
65-0.1158-0.21240.01773644.8306303.735917.428
66-0.1201-0.19670.01643206.9827267.248616.3477
67-0.1245-0.18130.01512921.2588243.438215.6025



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