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 computationThu, 17 Dec 2009 04:33:08 -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/17/t1261049653y9ryv3u43jsen7n.htm/, Retrieved Tue, 30 Apr 2024 00:04:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=68765, Retrieved Tue, 30 Apr 2024 00:04:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact89
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [Bruto Industriële...] [2009-12-13 15:21:44] [5482608004c1d7bbf873930172393a2d]
-   P   [ARIMA Backward Selection] [Bruto Industriële...] [2009-12-14 17:52:52] [5482608004c1d7bbf873930172393a2d]
- RMP       [ARIMA Forecasting] [Bruto Industriële...] [2009-12-17 11:33:08] [efdfe680cd785c4af09f858b30f777ec] [Current]
-   P         [ARIMA Forecasting] [Bruto Industriële...] [2009-12-17 12:24:15] [5482608004c1d7bbf873930172393a2d]
Feedback Forum

Post a new message
Dataseries X:
98.8
100.5
110.4
96.4
101.9
106.2
81
94.7
101
109.4
102.3
90.7
96.2
96.1
106
103.1
102
104.7
86
92.1
106.9
112.6
101.7
92
97.4
97
105.4
102.7
98.1
104.5
87.4
89.9
109.8
111.7
98.6
96.9
95.1
97
112.7
102.9
97.4
111.4
87.4
96.8
114.1
110.3
103.9
101.6
94.6
95.9
104.7
102.8
98.1
113.9
80.9
95.7
113.2
105.9
108.8
102.3
99
100.7
115.5
100.7
109.9
114.6
85.4
100.5
114.8
116.5
112.9
102
106
105.3
118.8
106.1
109.3
117.2
92.5
104.2
112.5
122.4
113.3
100
110.7
112.8
109.8
117.3
109.1
115.9
96
99.8
116.8
115.7
99.4
94.3
91
93.2
103.1
94.1
91.8
102.7
82.6
89.1
104.5




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68765&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]3 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=68765&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68765&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 time3 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[93])
81112.5-------
82122.4-------
83113.3-------
84100-------
85110.7-------
86112.8-------
87109.8-------
88117.3-------
89109.1-------
90115.9-------
9196-------
9299.8-------
93116.8-------
94115.7121.5772115.2741127.88030.03380.93130.3990.9313
9599.4111.2649104.917117.61281e-040.08540.26490.0437
9694.3104.935598.3767111.49437e-040.9510.92992e-04
9791108.1904100.8401115.540700.99990.25170.0108
9893.2108.4563101.1049115.8077010.12340.0131
99103.1116.8795109.2584124.50052e-0410.96570.5082
10094.1112.5728104.7194120.426200.9910.1190.1457
10191.8110.1869102.3199118.0539010.60670.0497
102102.7118.385110.3003126.46971e-0410.72660.6496
10382.694.705586.514102.89710.00190.02790.37840
10489.1103.314295.0709111.55754e-0410.79837e-04
105104.5118.3673109.9684126.76626e-0410.64270.6427

\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[93]) \tabularnewline
81 & 112.5 & - & - & - & - & - & - & - \tabularnewline
82 & 122.4 & - & - & - & - & - & - & - \tabularnewline
83 & 113.3 & - & - & - & - & - & - & - \tabularnewline
84 & 100 & - & - & - & - & - & - & - \tabularnewline
85 & 110.7 & - & - & - & - & - & - & - \tabularnewline
86 & 112.8 & - & - & - & - & - & - & - \tabularnewline
87 & 109.8 & - & - & - & - & - & - & - \tabularnewline
88 & 117.3 & - & - & - & - & - & - & - \tabularnewline
89 & 109.1 & - & - & - & - & - & - & - \tabularnewline
90 & 115.9 & - & - & - & - & - & - & - \tabularnewline
91 & 96 & - & - & - & - & - & - & - \tabularnewline
92 & 99.8 & - & - & - & - & - & - & - \tabularnewline
93 & 116.8 & - & - & - & - & - & - & - \tabularnewline
94 & 115.7 & 121.5772 & 115.2741 & 127.8803 & 0.0338 & 0.9313 & 0.399 & 0.9313 \tabularnewline
95 & 99.4 & 111.2649 & 104.917 & 117.6128 & 1e-04 & 0.0854 & 0.2649 & 0.0437 \tabularnewline
96 & 94.3 & 104.9355 & 98.3767 & 111.4943 & 7e-04 & 0.951 & 0.9299 & 2e-04 \tabularnewline
97 & 91 & 108.1904 & 100.8401 & 115.5407 & 0 & 0.9999 & 0.2517 & 0.0108 \tabularnewline
98 & 93.2 & 108.4563 & 101.1049 & 115.8077 & 0 & 1 & 0.1234 & 0.0131 \tabularnewline
99 & 103.1 & 116.8795 & 109.2584 & 124.5005 & 2e-04 & 1 & 0.9657 & 0.5082 \tabularnewline
100 & 94.1 & 112.5728 & 104.7194 & 120.4262 & 0 & 0.991 & 0.119 & 0.1457 \tabularnewline
101 & 91.8 & 110.1869 & 102.3199 & 118.0539 & 0 & 1 & 0.6067 & 0.0497 \tabularnewline
102 & 102.7 & 118.385 & 110.3003 & 126.4697 & 1e-04 & 1 & 0.7266 & 0.6496 \tabularnewline
103 & 82.6 & 94.7055 & 86.514 & 102.8971 & 0.0019 & 0.0279 & 0.3784 & 0 \tabularnewline
104 & 89.1 & 103.3142 & 95.0709 & 111.5575 & 4e-04 & 1 & 0.7983 & 7e-04 \tabularnewline
105 & 104.5 & 118.3673 & 109.9684 & 126.7662 & 6e-04 & 1 & 0.6427 & 0.6427 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68765&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[93])[/C][/ROW]
[ROW][C]81[/C][C]112.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]122.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]113.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]110.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]112.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]109.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]117.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]109.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]115.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]99.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]116.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]115.7[/C][C]121.5772[/C][C]115.2741[/C][C]127.8803[/C][C]0.0338[/C][C]0.9313[/C][C]0.399[/C][C]0.9313[/C][/ROW]
[ROW][C]95[/C][C]99.4[/C][C]111.2649[/C][C]104.917[/C][C]117.6128[/C][C]1e-04[/C][C]0.0854[/C][C]0.2649[/C][C]0.0437[/C][/ROW]
[ROW][C]96[/C][C]94.3[/C][C]104.9355[/C][C]98.3767[/C][C]111.4943[/C][C]7e-04[/C][C]0.951[/C][C]0.9299[/C][C]2e-04[/C][/ROW]
[ROW][C]97[/C][C]91[/C][C]108.1904[/C][C]100.8401[/C][C]115.5407[/C][C]0[/C][C]0.9999[/C][C]0.2517[/C][C]0.0108[/C][/ROW]
[ROW][C]98[/C][C]93.2[/C][C]108.4563[/C][C]101.1049[/C][C]115.8077[/C][C]0[/C][C]1[/C][C]0.1234[/C][C]0.0131[/C][/ROW]
[ROW][C]99[/C][C]103.1[/C][C]116.8795[/C][C]109.2584[/C][C]124.5005[/C][C]2e-04[/C][C]1[/C][C]0.9657[/C][C]0.5082[/C][/ROW]
[ROW][C]100[/C][C]94.1[/C][C]112.5728[/C][C]104.7194[/C][C]120.4262[/C][C]0[/C][C]0.991[/C][C]0.119[/C][C]0.1457[/C][/ROW]
[ROW][C]101[/C][C]91.8[/C][C]110.1869[/C][C]102.3199[/C][C]118.0539[/C][C]0[/C][C]1[/C][C]0.6067[/C][C]0.0497[/C][/ROW]
[ROW][C]102[/C][C]102.7[/C][C]118.385[/C][C]110.3003[/C][C]126.4697[/C][C]1e-04[/C][C]1[/C][C]0.7266[/C][C]0.6496[/C][/ROW]
[ROW][C]103[/C][C]82.6[/C][C]94.7055[/C][C]86.514[/C][C]102.8971[/C][C]0.0019[/C][C]0.0279[/C][C]0.3784[/C][C]0[/C][/ROW]
[ROW][C]104[/C][C]89.1[/C][C]103.3142[/C][C]95.0709[/C][C]111.5575[/C][C]4e-04[/C][C]1[/C][C]0.7983[/C][C]7e-04[/C][/ROW]
[ROW][C]105[/C][C]104.5[/C][C]118.3673[/C][C]109.9684[/C][C]126.7662[/C][C]6e-04[/C][C]1[/C][C]0.6427[/C][C]0.6427[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68765&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68765&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[93])
81112.5-------
82122.4-------
83113.3-------
84100-------
85110.7-------
86112.8-------
87109.8-------
88117.3-------
89109.1-------
90115.9-------
9196-------
9299.8-------
93116.8-------
94115.7121.5772115.2741127.88030.03380.93130.3990.9313
9599.4111.2649104.917117.61281e-040.08540.26490.0437
9694.3104.935598.3767111.49437e-040.9510.92992e-04
9791108.1904100.8401115.540700.99990.25170.0108
9893.2108.4563101.1049115.8077010.12340.0131
99103.1116.8795109.2584124.50052e-0410.96570.5082
10094.1112.5728104.7194120.426200.9910.1190.1457
10191.8110.1869102.3199118.0539010.60670.0497
102102.7118.385110.3003126.46971e-0410.72660.6496
10382.694.705586.514102.89710.00190.02790.37840
10489.1103.314295.0709111.55754e-0410.79837e-04
105104.5118.3673109.9684126.76626e-0410.64270.6427







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
940.0265-0.0483034.541400
950.0291-0.10660.0775140.776387.65899.3626
960.0319-0.10140.0854113.113896.14389.8053
970.0347-0.15890.1038295.511145.985612.0825
980.0346-0.14070.1112232.7548163.339512.7804
990.0333-0.11790.1123189.8735167.761812.9523
1000.0356-0.16410.1197341.2439192.54513.8761
1010.0364-0.16690.1256338.0778210.736614.5168
1020.0348-0.13250.1264246.0204214.65714.6512
1030.0441-0.12780.1265146.5442207.845714.4169
1040.0407-0.13760.1275202.0441207.318314.3986
1050.0362-0.11720.1267192.3024206.06714.355

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
94 & 0.0265 & -0.0483 & 0 & 34.5414 & 0 & 0 \tabularnewline
95 & 0.0291 & -0.1066 & 0.0775 & 140.7763 & 87.6589 & 9.3626 \tabularnewline
96 & 0.0319 & -0.1014 & 0.0854 & 113.1138 & 96.1438 & 9.8053 \tabularnewline
97 & 0.0347 & -0.1589 & 0.1038 & 295.511 & 145.9856 & 12.0825 \tabularnewline
98 & 0.0346 & -0.1407 & 0.1112 & 232.7548 & 163.3395 & 12.7804 \tabularnewline
99 & 0.0333 & -0.1179 & 0.1123 & 189.8735 & 167.7618 & 12.9523 \tabularnewline
100 & 0.0356 & -0.1641 & 0.1197 & 341.2439 & 192.545 & 13.8761 \tabularnewline
101 & 0.0364 & -0.1669 & 0.1256 & 338.0778 & 210.7366 & 14.5168 \tabularnewline
102 & 0.0348 & -0.1325 & 0.1264 & 246.0204 & 214.657 & 14.6512 \tabularnewline
103 & 0.0441 & -0.1278 & 0.1265 & 146.5442 & 207.8457 & 14.4169 \tabularnewline
104 & 0.0407 & -0.1376 & 0.1275 & 202.0441 & 207.3183 & 14.3986 \tabularnewline
105 & 0.0362 & -0.1172 & 0.1267 & 192.3024 & 206.067 & 14.355 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68765&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]94[/C][C]0.0265[/C][C]-0.0483[/C][C]0[/C][C]34.5414[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]95[/C][C]0.0291[/C][C]-0.1066[/C][C]0.0775[/C][C]140.7763[/C][C]87.6589[/C][C]9.3626[/C][/ROW]
[ROW][C]96[/C][C]0.0319[/C][C]-0.1014[/C][C]0.0854[/C][C]113.1138[/C][C]96.1438[/C][C]9.8053[/C][/ROW]
[ROW][C]97[/C][C]0.0347[/C][C]-0.1589[/C][C]0.1038[/C][C]295.511[/C][C]145.9856[/C][C]12.0825[/C][/ROW]
[ROW][C]98[/C][C]0.0346[/C][C]-0.1407[/C][C]0.1112[/C][C]232.7548[/C][C]163.3395[/C][C]12.7804[/C][/ROW]
[ROW][C]99[/C][C]0.0333[/C][C]-0.1179[/C][C]0.1123[/C][C]189.8735[/C][C]167.7618[/C][C]12.9523[/C][/ROW]
[ROW][C]100[/C][C]0.0356[/C][C]-0.1641[/C][C]0.1197[/C][C]341.2439[/C][C]192.545[/C][C]13.8761[/C][/ROW]
[ROW][C]101[/C][C]0.0364[/C][C]-0.1669[/C][C]0.1256[/C][C]338.0778[/C][C]210.7366[/C][C]14.5168[/C][/ROW]
[ROW][C]102[/C][C]0.0348[/C][C]-0.1325[/C][C]0.1264[/C][C]246.0204[/C][C]214.657[/C][C]14.6512[/C][/ROW]
[ROW][C]103[/C][C]0.0441[/C][C]-0.1278[/C][C]0.1265[/C][C]146.5442[/C][C]207.8457[/C][C]14.4169[/C][/ROW]
[ROW][C]104[/C][C]0.0407[/C][C]-0.1376[/C][C]0.1275[/C][C]202.0441[/C][C]207.3183[/C][C]14.3986[/C][/ROW]
[ROW][C]105[/C][C]0.0362[/C][C]-0.1172[/C][C]0.1267[/C][C]192.3024[/C][C]206.067[/C][C]14.355[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68765&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68765&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
940.0265-0.0483034.541400
950.0291-0.10660.0775140.776387.65899.3626
960.0319-0.10140.0854113.113896.14389.8053
970.0347-0.15890.1038295.511145.985612.0825
980.0346-0.14070.1112232.7548163.339512.7804
990.0333-0.11790.1123189.8735167.761812.9523
1000.0356-0.16410.1197341.2439192.54513.8761
1010.0364-0.16690.1256338.0778210.736614.5168
1020.0348-0.13250.1264246.0204214.65714.6512
1030.0441-0.12780.1265146.5442207.845714.4169
1040.0407-0.13760.1275202.0441207.318314.3986
1050.0362-0.11720.1267192.3024206.06714.355



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