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, 26 Dec 2010 16:46:25 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/26/t1293381951t0q6f8joolv4r5n.htm/, Retrieved Mon, 06 May 2024 14:03:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115726, Retrieved Mon, 06 May 2024 14:03:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact124
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD      [ARIMA Forecasting] [ARIMA Model] [2010-12-07 16:48:47] [1c68a339ea090fe045c8010fcdb839f1]
-   PD        [ARIMA Forecasting] [Paper ARIMA Model] [2010-12-17 12:22:16] [1c68a339ea090fe045c8010fcdb839f1]
-   PD            [ARIMA Forecasting] [paper voorspellin...] [2010-12-26 16:46:25] [6df2229e3f2091de42c4a9cf9a617420] [Current]
-    D              [ARIMA Forecasting] [paper arima forec...] [2010-12-26 17:15:25] [eeb33d252044f8583501f5ba0605ad6d]
Feedback Forum

Post a new message
Dataseries X:
61,2
62
65,1
63,2
66,3
61,9
62,1
66,3
72
65,3
67,6
70,5
74,2
77,8
78,5
77,8
81,4
84,5
88
93,9
98,9
96,7
98,9
102,2
105,4
105,1
116,6
112
108,8
106,9
109,5
106,7
118,9
117,5
113,7
119,6
120,6
117,5
120,3
119,8
108
98,8
94,6
84,6
84,4
79,1
73,3
74,3
67,8
64,8
66,5
57,7
53,8
51,8
50,9
49
48,1
42,6
40,9
43,3
43,7




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 2 seconds \tabularnewline
R Server & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115726&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115726&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115726&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 time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk







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[49])
37120.6-------
38117.5-------
39120.3-------
40119.8-------
41108-------
4298.8-------
4394.6-------
4484.6-------
4584.4-------
4679.1-------
4773.3-------
4874.3-------
4967.8-------
5064.866.906259.564874.67410.29760.410800.4108
5166.567.713757.392178.88850.41570.695300.494
5257.767.569955.059881.35950.08030.560400.487
5353.864.129750.190279.77520.09780.789700.3228
5451.861.381746.267778.62830.13810.805600.2329
5550.960.105743.845878.92460.16880.80652e-040.2115
564957.005840.048976.94840.21570.72580.00330.1444
5748.156.942938.936278.36170.20920.76630.0060.1602
5842.655.259736.581877.77620.13520.73340.0190.1375
5940.953.382234.175576.85410.14860.8160.04810.1143
6043.353.708733.605478.50380.20530.84440.05180.1327
6143.751.563731.148377.09720.2730.73710.10630.1063

\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[49]) \tabularnewline
37 & 120.6 & - & - & - & - & - & - & - \tabularnewline
38 & 117.5 & - & - & - & - & - & - & - \tabularnewline
39 & 120.3 & - & - & - & - & - & - & - \tabularnewline
40 & 119.8 & - & - & - & - & - & - & - \tabularnewline
41 & 108 & - & - & - & - & - & - & - \tabularnewline
42 & 98.8 & - & - & - & - & - & - & - \tabularnewline
43 & 94.6 & - & - & - & - & - & - & - \tabularnewline
44 & 84.6 & - & - & - & - & - & - & - \tabularnewline
45 & 84.4 & - & - & - & - & - & - & - \tabularnewline
46 & 79.1 & - & - & - & - & - & - & - \tabularnewline
47 & 73.3 & - & - & - & - & - & - & - \tabularnewline
48 & 74.3 & - & - & - & - & - & - & - \tabularnewline
49 & 67.8 & - & - & - & - & - & - & - \tabularnewline
50 & 64.8 & 66.9062 & 59.5648 & 74.6741 & 0.2976 & 0.4108 & 0 & 0.4108 \tabularnewline
51 & 66.5 & 67.7137 & 57.3921 & 78.8885 & 0.4157 & 0.6953 & 0 & 0.494 \tabularnewline
52 & 57.7 & 67.5699 & 55.0598 & 81.3595 & 0.0803 & 0.5604 & 0 & 0.487 \tabularnewline
53 & 53.8 & 64.1297 & 50.1902 & 79.7752 & 0.0978 & 0.7897 & 0 & 0.3228 \tabularnewline
54 & 51.8 & 61.3817 & 46.2677 & 78.6283 & 0.1381 & 0.8056 & 0 & 0.2329 \tabularnewline
55 & 50.9 & 60.1057 & 43.8458 & 78.9246 & 0.1688 & 0.8065 & 2e-04 & 0.2115 \tabularnewline
56 & 49 & 57.0058 & 40.0489 & 76.9484 & 0.2157 & 0.7258 & 0.0033 & 0.1444 \tabularnewline
57 & 48.1 & 56.9429 & 38.9362 & 78.3617 & 0.2092 & 0.7663 & 0.006 & 0.1602 \tabularnewline
58 & 42.6 & 55.2597 & 36.5818 & 77.7762 & 0.1352 & 0.7334 & 0.019 & 0.1375 \tabularnewline
59 & 40.9 & 53.3822 & 34.1755 & 76.8541 & 0.1486 & 0.816 & 0.0481 & 0.1143 \tabularnewline
60 & 43.3 & 53.7087 & 33.6054 & 78.5038 & 0.2053 & 0.8444 & 0.0518 & 0.1327 \tabularnewline
61 & 43.7 & 51.5637 & 31.1483 & 77.0972 & 0.273 & 0.7371 & 0.1063 & 0.1063 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115726&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[49])[/C][/ROW]
[ROW][C]37[/C][C]120.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]117.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]120.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]119.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]108[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]98.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]94.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]84.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]84.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]79.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]73.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]74.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]67.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]64.8[/C][C]66.9062[/C][C]59.5648[/C][C]74.6741[/C][C]0.2976[/C][C]0.4108[/C][C]0[/C][C]0.4108[/C][/ROW]
[ROW][C]51[/C][C]66.5[/C][C]67.7137[/C][C]57.3921[/C][C]78.8885[/C][C]0.4157[/C][C]0.6953[/C][C]0[/C][C]0.494[/C][/ROW]
[ROW][C]52[/C][C]57.7[/C][C]67.5699[/C][C]55.0598[/C][C]81.3595[/C][C]0.0803[/C][C]0.5604[/C][C]0[/C][C]0.487[/C][/ROW]
[ROW][C]53[/C][C]53.8[/C][C]64.1297[/C][C]50.1902[/C][C]79.7752[/C][C]0.0978[/C][C]0.7897[/C][C]0[/C][C]0.3228[/C][/ROW]
[ROW][C]54[/C][C]51.8[/C][C]61.3817[/C][C]46.2677[/C][C]78.6283[/C][C]0.1381[/C][C]0.8056[/C][C]0[/C][C]0.2329[/C][/ROW]
[ROW][C]55[/C][C]50.9[/C][C]60.1057[/C][C]43.8458[/C][C]78.9246[/C][C]0.1688[/C][C]0.8065[/C][C]2e-04[/C][C]0.2115[/C][/ROW]
[ROW][C]56[/C][C]49[/C][C]57.0058[/C][C]40.0489[/C][C]76.9484[/C][C]0.2157[/C][C]0.7258[/C][C]0.0033[/C][C]0.1444[/C][/ROW]
[ROW][C]57[/C][C]48.1[/C][C]56.9429[/C][C]38.9362[/C][C]78.3617[/C][C]0.2092[/C][C]0.7663[/C][C]0.006[/C][C]0.1602[/C][/ROW]
[ROW][C]58[/C][C]42.6[/C][C]55.2597[/C][C]36.5818[/C][C]77.7762[/C][C]0.1352[/C][C]0.7334[/C][C]0.019[/C][C]0.1375[/C][/ROW]
[ROW][C]59[/C][C]40.9[/C][C]53.3822[/C][C]34.1755[/C][C]76.8541[/C][C]0.1486[/C][C]0.816[/C][C]0.0481[/C][C]0.1143[/C][/ROW]
[ROW][C]60[/C][C]43.3[/C][C]53.7087[/C][C]33.6054[/C][C]78.5038[/C][C]0.2053[/C][C]0.8444[/C][C]0.0518[/C][C]0.1327[/C][/ROW]
[ROW][C]61[/C][C]43.7[/C][C]51.5637[/C][C]31.1483[/C][C]77.0972[/C][C]0.273[/C][C]0.7371[/C][C]0.1063[/C][C]0.1063[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115726&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115726&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[49])
37120.6-------
38117.5-------
39120.3-------
40119.8-------
41108-------
4298.8-------
4394.6-------
4484.6-------
4584.4-------
4679.1-------
4773.3-------
4874.3-------
4967.8-------
5064.866.906259.564874.67410.29760.410800.4108
5166.567.713757.392178.88850.41570.695300.494
5257.767.569955.059881.35950.08030.560400.487
5353.864.129750.190279.77520.09780.789700.3228
5451.861.381746.267778.62830.13810.805600.2329
5550.960.105743.845878.92460.16880.80652e-040.2115
564957.005840.048976.94840.21570.72580.00330.1444
5748.156.942938.936278.36170.20920.76630.0060.1602
5842.655.259736.581877.77620.13520.73340.0190.1375
5940.953.382234.175576.85410.14860.8160.04810.1143
6043.353.708733.605478.50380.20530.84440.05180.1327
6143.751.563731.148377.09720.2730.73710.10630.1063







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.0592-0.031504.435900
510.0842-0.01790.02471.47322.95461.7189
520.1041-0.14610.065297.414534.44125.8687
530.1245-0.16110.0891106.702852.50667.2461
540.1434-0.15610.102591.809960.36737.7696
550.1597-0.15320.11184.744264.43018.0268
560.1785-0.14040.115264.093564.3828.0238
570.1919-0.15530.120278.196766.10888.1307
580.2079-0.22910.1323160.267576.57098.7505
590.2243-0.23380.1424155.805884.49449.1921
600.2355-0.19380.1471108.341986.66239.3093
610.2526-0.15250.147661.837584.59369.1975

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0592 & -0.0315 & 0 & 4.4359 & 0 & 0 \tabularnewline
51 & 0.0842 & -0.0179 & 0.0247 & 1.4732 & 2.9546 & 1.7189 \tabularnewline
52 & 0.1041 & -0.1461 & 0.0652 & 97.4145 & 34.4412 & 5.8687 \tabularnewline
53 & 0.1245 & -0.1611 & 0.0891 & 106.7028 & 52.5066 & 7.2461 \tabularnewline
54 & 0.1434 & -0.1561 & 0.1025 & 91.8099 & 60.3673 & 7.7696 \tabularnewline
55 & 0.1597 & -0.1532 & 0.111 & 84.7442 & 64.4301 & 8.0268 \tabularnewline
56 & 0.1785 & -0.1404 & 0.1152 & 64.0935 & 64.382 & 8.0238 \tabularnewline
57 & 0.1919 & -0.1553 & 0.1202 & 78.1967 & 66.1088 & 8.1307 \tabularnewline
58 & 0.2079 & -0.2291 & 0.1323 & 160.2675 & 76.5709 & 8.7505 \tabularnewline
59 & 0.2243 & -0.2338 & 0.1424 & 155.8058 & 84.4944 & 9.1921 \tabularnewline
60 & 0.2355 & -0.1938 & 0.1471 & 108.3419 & 86.6623 & 9.3093 \tabularnewline
61 & 0.2526 & -0.1525 & 0.1476 & 61.8375 & 84.5936 & 9.1975 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115726&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]50[/C][C]0.0592[/C][C]-0.0315[/C][C]0[/C][C]4.4359[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.0842[/C][C]-0.0179[/C][C]0.0247[/C][C]1.4732[/C][C]2.9546[/C][C]1.7189[/C][/ROW]
[ROW][C]52[/C][C]0.1041[/C][C]-0.1461[/C][C]0.0652[/C][C]97.4145[/C][C]34.4412[/C][C]5.8687[/C][/ROW]
[ROW][C]53[/C][C]0.1245[/C][C]-0.1611[/C][C]0.0891[/C][C]106.7028[/C][C]52.5066[/C][C]7.2461[/C][/ROW]
[ROW][C]54[/C][C]0.1434[/C][C]-0.1561[/C][C]0.1025[/C][C]91.8099[/C][C]60.3673[/C][C]7.7696[/C][/ROW]
[ROW][C]55[/C][C]0.1597[/C][C]-0.1532[/C][C]0.111[/C][C]84.7442[/C][C]64.4301[/C][C]8.0268[/C][/ROW]
[ROW][C]56[/C][C]0.1785[/C][C]-0.1404[/C][C]0.1152[/C][C]64.0935[/C][C]64.382[/C][C]8.0238[/C][/ROW]
[ROW][C]57[/C][C]0.1919[/C][C]-0.1553[/C][C]0.1202[/C][C]78.1967[/C][C]66.1088[/C][C]8.1307[/C][/ROW]
[ROW][C]58[/C][C]0.2079[/C][C]-0.2291[/C][C]0.1323[/C][C]160.2675[/C][C]76.5709[/C][C]8.7505[/C][/ROW]
[ROW][C]59[/C][C]0.2243[/C][C]-0.2338[/C][C]0.1424[/C][C]155.8058[/C][C]84.4944[/C][C]9.1921[/C][/ROW]
[ROW][C]60[/C][C]0.2355[/C][C]-0.1938[/C][C]0.1471[/C][C]108.3419[/C][C]86.6623[/C][C]9.3093[/C][/ROW]
[ROW][C]61[/C][C]0.2526[/C][C]-0.1525[/C][C]0.1476[/C][C]61.8375[/C][C]84.5936[/C][C]9.1975[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115726&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115726&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
500.0592-0.031504.435900
510.0842-0.01790.02471.47322.95461.7189
520.1041-0.14610.065297.414534.44125.8687
530.1245-0.16110.0891106.702852.50667.2461
540.1434-0.15610.102591.809960.36737.7696
550.1597-0.15320.11184.744264.43018.0268
560.1785-0.14040.115264.093564.3828.0238
570.1919-0.15530.120278.196766.10888.1307
580.2079-0.22910.1323160.267576.57098.7505
590.2243-0.23380.1424155.805884.49449.1921
600.2355-0.19380.1471108.341986.66239.3093
610.2526-0.15250.147661.837584.59369.1975



Parameters (Session):
par1 = 12 ; par2 = 0.3 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 1 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 0.5 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')