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:17:29 -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/t1197043482gurcsq6g2oeuai5.htm/, Retrieved Sun, 28 Apr 2024 19:38:08 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2878, Retrieved Sun, 28 Apr 2024 19:38:08 +0000
QR Codes:

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

Post a new message
Dataseries X:
95,4
101,2
101,5
101,9
101,7
100,1
97,4
96,5
99,2
102,2
105,3
111,1
114,9
124,5
142,2
159,7
165,2
198,6
207,8
219,6
239,6
235,3
218,5
213,8
205,5
198,4
198,5
190,2
180,7
193,6
192,8
195,5
197,2
196,9
178,9
172,4
156,4
143,7
153,6
168,8
185,8
199,9
205,4
197,5
199,6
200,5
193,7
179,6
169,1
169,8
195,5
194,8
204,5
203,8
204,8
204,9
240,0
248,3
258,4
254,9




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2878&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[48])
36172.4-------
37156.4-------
38143.7-------
39153.6-------
40168.8-------
41185.8-------
42199.9-------
43205.4-------
44197.5-------
45199.6-------
46200.5-------
47193.7-------
48179.6-------
49169.1168.5842151.7768185.39160.4760.09950.92230.0995
50169.8160.5429130.1473190.93860.27530.29050.86130.1096
51195.5160.543117.0303204.05560.05770.33830.62280.1953
52194.8163.0391107.1351218.94310.13270.12750.420.2807
53204.5166.701499.2167234.18610.13610.20720.28960.354
54203.8169.939591.6716248.20740.19820.19340.22650.4044
55204.8170.931682.6208259.24240.22610.23290.22210.4237
56204.9168.165870.4795265.8520.23050.23120.27810.4093
57240168.491862.0231274.96060.0940.25140.28340.419
58248.3168.55753.829283.2850.08650.11110.29260.4252
59258.4166.410843.8843288.93740.07060.09510.33120.4165
60254.9162.151432.2321292.07060.08090.07320.39620.3962

\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 & 172.4 & - & - & - & - & - & - & - \tabularnewline
37 & 156.4 & - & - & - & - & - & - & - \tabularnewline
38 & 143.7 & - & - & - & - & - & - & - \tabularnewline
39 & 153.6 & - & - & - & - & - & - & - \tabularnewline
40 & 168.8 & - & - & - & - & - & - & - \tabularnewline
41 & 185.8 & - & - & - & - & - & - & - \tabularnewline
42 & 199.9 & - & - & - & - & - & - & - \tabularnewline
43 & 205.4 & - & - & - & - & - & - & - \tabularnewline
44 & 197.5 & - & - & - & - & - & - & - \tabularnewline
45 & 199.6 & - & - & - & - & - & - & - \tabularnewline
46 & 200.5 & - & - & - & - & - & - & - \tabularnewline
47 & 193.7 & - & - & - & - & - & - & - \tabularnewline
48 & 179.6 & - & - & - & - & - & - & - \tabularnewline
49 & 169.1 & 168.5842 & 151.7768 & 185.3916 & 0.476 & 0.0995 & 0.9223 & 0.0995 \tabularnewline
50 & 169.8 & 160.5429 & 130.1473 & 190.9386 & 0.2753 & 0.2905 & 0.8613 & 0.1096 \tabularnewline
51 & 195.5 & 160.543 & 117.0303 & 204.0556 & 0.0577 & 0.3383 & 0.6228 & 0.1953 \tabularnewline
52 & 194.8 & 163.0391 & 107.1351 & 218.9431 & 0.1327 & 0.1275 & 0.42 & 0.2807 \tabularnewline
53 & 204.5 & 166.7014 & 99.2167 & 234.1861 & 0.1361 & 0.2072 & 0.2896 & 0.354 \tabularnewline
54 & 203.8 & 169.9395 & 91.6716 & 248.2074 & 0.1982 & 0.1934 & 0.2265 & 0.4044 \tabularnewline
55 & 204.8 & 170.9316 & 82.6208 & 259.2424 & 0.2261 & 0.2329 & 0.2221 & 0.4237 \tabularnewline
56 & 204.9 & 168.1658 & 70.4795 & 265.852 & 0.2305 & 0.2312 & 0.2781 & 0.4093 \tabularnewline
57 & 240 & 168.4918 & 62.0231 & 274.9606 & 0.094 & 0.2514 & 0.2834 & 0.419 \tabularnewline
58 & 248.3 & 168.557 & 53.829 & 283.285 & 0.0865 & 0.1111 & 0.2926 & 0.4252 \tabularnewline
59 & 258.4 & 166.4108 & 43.8843 & 288.9374 & 0.0706 & 0.0951 & 0.3312 & 0.4165 \tabularnewline
60 & 254.9 & 162.1514 & 32.2321 & 292.0706 & 0.0809 & 0.0732 & 0.3962 & 0.3962 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2878&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]172.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]156.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]143.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]153.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]168.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]185.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]199.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]205.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]197.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]199.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]200.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]193.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]179.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]169.1[/C][C]168.5842[/C][C]151.7768[/C][C]185.3916[/C][C]0.476[/C][C]0.0995[/C][C]0.9223[/C][C]0.0995[/C][/ROW]
[ROW][C]50[/C][C]169.8[/C][C]160.5429[/C][C]130.1473[/C][C]190.9386[/C][C]0.2753[/C][C]0.2905[/C][C]0.8613[/C][C]0.1096[/C][/ROW]
[ROW][C]51[/C][C]195.5[/C][C]160.543[/C][C]117.0303[/C][C]204.0556[/C][C]0.0577[/C][C]0.3383[/C][C]0.6228[/C][C]0.1953[/C][/ROW]
[ROW][C]52[/C][C]194.8[/C][C]163.0391[/C][C]107.1351[/C][C]218.9431[/C][C]0.1327[/C][C]0.1275[/C][C]0.42[/C][C]0.2807[/C][/ROW]
[ROW][C]53[/C][C]204.5[/C][C]166.7014[/C][C]99.2167[/C][C]234.1861[/C][C]0.1361[/C][C]0.2072[/C][C]0.2896[/C][C]0.354[/C][/ROW]
[ROW][C]54[/C][C]203.8[/C][C]169.9395[/C][C]91.6716[/C][C]248.2074[/C][C]0.1982[/C][C]0.1934[/C][C]0.2265[/C][C]0.4044[/C][/ROW]
[ROW][C]55[/C][C]204.8[/C][C]170.9316[/C][C]82.6208[/C][C]259.2424[/C][C]0.2261[/C][C]0.2329[/C][C]0.2221[/C][C]0.4237[/C][/ROW]
[ROW][C]56[/C][C]204.9[/C][C]168.1658[/C][C]70.4795[/C][C]265.852[/C][C]0.2305[/C][C]0.2312[/C][C]0.2781[/C][C]0.4093[/C][/ROW]
[ROW][C]57[/C][C]240[/C][C]168.4918[/C][C]62.0231[/C][C]274.9606[/C][C]0.094[/C][C]0.2514[/C][C]0.2834[/C][C]0.419[/C][/ROW]
[ROW][C]58[/C][C]248.3[/C][C]168.557[/C][C]53.829[/C][C]283.285[/C][C]0.0865[/C][C]0.1111[/C][C]0.2926[/C][C]0.4252[/C][/ROW]
[ROW][C]59[/C][C]258.4[/C][C]166.4108[/C][C]43.8843[/C][C]288.9374[/C][C]0.0706[/C][C]0.0951[/C][C]0.3312[/C][C]0.4165[/C][/ROW]
[ROW][C]60[/C][C]254.9[/C][C]162.1514[/C][C]32.2321[/C][C]292.0706[/C][C]0.0809[/C][C]0.0732[/C][C]0.3962[/C][C]0.3962[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2878&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2878&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])
36172.4-------
37156.4-------
38143.7-------
39153.6-------
40168.8-------
41185.8-------
42199.9-------
43205.4-------
44197.5-------
45199.6-------
46200.5-------
47193.7-------
48179.6-------
49169.1168.5842151.7768185.39160.4760.09950.92230.0995
50169.8160.5429130.1473190.93860.27530.29050.86130.1096
51195.5160.543117.0303204.05560.05770.33830.62280.1953
52194.8163.0391107.1351218.94310.13270.12750.420.2807
53204.5166.701499.2167234.18610.13610.20720.28960.354
54203.8169.939591.6716248.20740.19820.19340.22650.4044
55204.8170.931682.6208259.24240.22610.23290.22210.4237
56204.9168.165870.4795265.8520.23050.23120.27810.4093
57240168.491862.0231274.96060.0940.25140.28340.419
58248.3168.55753.829283.2850.08650.11110.29260.4252
59258.4166.410843.8843288.93740.07060.09510.33120.4165
60254.9162.151432.2321292.07060.08090.07320.39620.3962







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.05090.00313e-040.26610.02220.1489
500.09660.05770.004885.69327.14112.6723
510.13830.21770.01811221.9938101.832810.0912
520.17490.19480.01621008.75684.0639.1686
530.20650.22670.01891428.7354119.061310.9115
540.2350.19930.01661146.53595.54469.7747
550.26360.19810.01651147.066595.58899.777
560.29640.21840.01821349.4035112.450310.6043
570.32240.42440.03545113.4163426.11820.6426
580.34730.47310.03946358.9508529.912623.0198
590.37570.55280.04618462.0044705.16726.555
600.40880.5720.04778602.3106716.859226.7742

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0509 & 0.0031 & 3e-04 & 0.2661 & 0.0222 & 0.1489 \tabularnewline
50 & 0.0966 & 0.0577 & 0.0048 & 85.6932 & 7.1411 & 2.6723 \tabularnewline
51 & 0.1383 & 0.2177 & 0.0181 & 1221.9938 & 101.8328 & 10.0912 \tabularnewline
52 & 0.1749 & 0.1948 & 0.0162 & 1008.756 & 84.063 & 9.1686 \tabularnewline
53 & 0.2065 & 0.2267 & 0.0189 & 1428.7354 & 119.0613 & 10.9115 \tabularnewline
54 & 0.235 & 0.1993 & 0.0166 & 1146.535 & 95.5446 & 9.7747 \tabularnewline
55 & 0.2636 & 0.1981 & 0.0165 & 1147.0665 & 95.5889 & 9.777 \tabularnewline
56 & 0.2964 & 0.2184 & 0.0182 & 1349.4035 & 112.4503 & 10.6043 \tabularnewline
57 & 0.3224 & 0.4244 & 0.0354 & 5113.4163 & 426.118 & 20.6426 \tabularnewline
58 & 0.3473 & 0.4731 & 0.0394 & 6358.9508 & 529.9126 & 23.0198 \tabularnewline
59 & 0.3757 & 0.5528 & 0.0461 & 8462.0044 & 705.167 & 26.555 \tabularnewline
60 & 0.4088 & 0.572 & 0.0477 & 8602.3106 & 716.8592 & 26.7742 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2878&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.0509[/C][C]0.0031[/C][C]3e-04[/C][C]0.2661[/C][C]0.0222[/C][C]0.1489[/C][/ROW]
[ROW][C]50[/C][C]0.0966[/C][C]0.0577[/C][C]0.0048[/C][C]85.6932[/C][C]7.1411[/C][C]2.6723[/C][/ROW]
[ROW][C]51[/C][C]0.1383[/C][C]0.2177[/C][C]0.0181[/C][C]1221.9938[/C][C]101.8328[/C][C]10.0912[/C][/ROW]
[ROW][C]52[/C][C]0.1749[/C][C]0.1948[/C][C]0.0162[/C][C]1008.756[/C][C]84.063[/C][C]9.1686[/C][/ROW]
[ROW][C]53[/C][C]0.2065[/C][C]0.2267[/C][C]0.0189[/C][C]1428.7354[/C][C]119.0613[/C][C]10.9115[/C][/ROW]
[ROW][C]54[/C][C]0.235[/C][C]0.1993[/C][C]0.0166[/C][C]1146.535[/C][C]95.5446[/C][C]9.7747[/C][/ROW]
[ROW][C]55[/C][C]0.2636[/C][C]0.1981[/C][C]0.0165[/C][C]1147.0665[/C][C]95.5889[/C][C]9.777[/C][/ROW]
[ROW][C]56[/C][C]0.2964[/C][C]0.2184[/C][C]0.0182[/C][C]1349.4035[/C][C]112.4503[/C][C]10.6043[/C][/ROW]
[ROW][C]57[/C][C]0.3224[/C][C]0.4244[/C][C]0.0354[/C][C]5113.4163[/C][C]426.118[/C][C]20.6426[/C][/ROW]
[ROW][C]58[/C][C]0.3473[/C][C]0.4731[/C][C]0.0394[/C][C]6358.9508[/C][C]529.9126[/C][C]23.0198[/C][/ROW]
[ROW][C]59[/C][C]0.3757[/C][C]0.5528[/C][C]0.0461[/C][C]8462.0044[/C][C]705.167[/C][C]26.555[/C][/ROW]
[ROW][C]60[/C][C]0.4088[/C][C]0.572[/C][C]0.0477[/C][C]8602.3106[/C][C]716.8592[/C][C]26.7742[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2878&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2878&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.05090.00313e-040.26610.02220.1489
500.09660.05770.004885.69327.14112.6723
510.13830.21770.01811221.9938101.832810.0912
520.17490.19480.01621008.75684.0639.1686
530.20650.22670.01891428.7354119.061310.9115
540.2350.19930.01661146.53595.54469.7747
550.26360.19810.01651147.066595.58899.777
560.29640.21840.01821349.4035112.450310.6043
570.32240.42440.03545113.4163426.11820.6426
580.34730.47310.03946358.9508529.912623.0198
590.37570.55280.04618462.0044705.16726.555
600.40880.5720.04778602.3106716.859226.7742



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