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 computationFri, 23 Dec 2011 05:42:38 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/23/t1324636984a8jzrd6069pwlok.htm/, Retrieved Mon, 29 Apr 2024 19:26:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=160257, Retrieved Mon, 29 Apr 2024 19:26:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact84
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2011-12-15 18:59:44] [c53df38315e3cbde2dbe0de809195ef2]
-    D    [ARIMA Forecasting] [] [2011-12-23 10:42:38] [204816f6f70a8d342ddc2b9d4f4a80d3] [Current]
Feedback Forum

Post a new message
Dataseries X:
1.579
2.146
2.462
3.695
4.831
5.134
6.250
5.760
6.249
2.917
1.741
2.359
1.511
2.059
2.635
2.867
4.403
5.720
4.502
5.749
5.627
2.846
1.762
2.429
1.169
2.154
2.249
2.687
4.359
5.382
4.459
6.398
4.596
3.024
1.887
2.070
1.351
2.218
2.461
3.028
4.784
4.975
4.607
6.249
4.809
3.157
1.910
2.228
1.594
2.467
2.222
3.607
4.685
4.962
5.770
5.480
5.000
3.228
1.993
2.288
1.580
2.111
2.192
3.601
4.665
4.876
5.813
5.589
5.331
3.075
2.002
2.306
1.507
1.992
2.487
3.490
4.647
5.594
5.611
5.788
6.204
3.013
1.931
2.549
1.504
2.090
2.702
2.939
4.500
6.208
6.415
5.657
5.964
3.163
1.997
2.422
1.376
2.202
2.683
3.303
5.202
5.231
4.880
7.998
4.977
3.531
2.025
2.205
1.442
2.238
2.179
3.218
5.139
4.990
4.914
6.084
5.672
3.548
1.793
2.086
1.262
1.743
1.964
3.258
4.966
4.944
5.907
5.561
5.321
3.582
1.757
1.894




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net

\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 & 4 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=160257&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]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=160257&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=160257&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 time4 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







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[120])
1082.205-------
1091.442-------
1102.238-------
1112.179-------
1123.218-------
1135.139-------
1144.99-------
1154.914-------
1166.084-------
1175.672-------
1183.548-------
1191.793-------
1202.086-------
1211.2621.59230.85952.32520.18850.09340.65620.0934
1221.7432.16881.39812.93940.13940.98950.43010.5834
1231.9642.2661.49413.0380.22160.90790.58750.6762
1243.2583.2492.46574.03230.4910.99930.53090.9982
1254.9664.74863.96515.53210.29330.99990.16441
1264.9445.21674.43186.00170.2480.73430.71431
1275.9075.32994.5436.11690.07530.83180.84991
1285.5615.64164.85366.42960.42060.25460.13561
1295.3215.6324.84286.42110.21990.570.46041
1303.5823.19672.40663.98680.169600.19170.9971
1311.7571.85061.05962.64160.408300.55680.2798
1321.8942.26151.46993.0530.18140.89420.6680.668

\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[120]) \tabularnewline
108 & 2.205 & - & - & - & - & - & - & - \tabularnewline
109 & 1.442 & - & - & - & - & - & - & - \tabularnewline
110 & 2.238 & - & - & - & - & - & - & - \tabularnewline
111 & 2.179 & - & - & - & - & - & - & - \tabularnewline
112 & 3.218 & - & - & - & - & - & - & - \tabularnewline
113 & 5.139 & - & - & - & - & - & - & - \tabularnewline
114 & 4.99 & - & - & - & - & - & - & - \tabularnewline
115 & 4.914 & - & - & - & - & - & - & - \tabularnewline
116 & 6.084 & - & - & - & - & - & - & - \tabularnewline
117 & 5.672 & - & - & - & - & - & - & - \tabularnewline
118 & 3.548 & - & - & - & - & - & - & - \tabularnewline
119 & 1.793 & - & - & - & - & - & - & - \tabularnewline
120 & 2.086 & - & - & - & - & - & - & - \tabularnewline
121 & 1.262 & 1.5923 & 0.8595 & 2.3252 & 0.1885 & 0.0934 & 0.6562 & 0.0934 \tabularnewline
122 & 1.743 & 2.1688 & 1.3981 & 2.9394 & 0.1394 & 0.9895 & 0.4301 & 0.5834 \tabularnewline
123 & 1.964 & 2.266 & 1.4941 & 3.038 & 0.2216 & 0.9079 & 0.5875 & 0.6762 \tabularnewline
124 & 3.258 & 3.249 & 2.4657 & 4.0323 & 0.491 & 0.9993 & 0.5309 & 0.9982 \tabularnewline
125 & 4.966 & 4.7486 & 3.9651 & 5.5321 & 0.2933 & 0.9999 & 0.1644 & 1 \tabularnewline
126 & 4.944 & 5.2167 & 4.4318 & 6.0017 & 0.248 & 0.7343 & 0.7143 & 1 \tabularnewline
127 & 5.907 & 5.3299 & 4.543 & 6.1169 & 0.0753 & 0.8318 & 0.8499 & 1 \tabularnewline
128 & 5.561 & 5.6416 & 4.8536 & 6.4296 & 0.4206 & 0.2546 & 0.1356 & 1 \tabularnewline
129 & 5.321 & 5.632 & 4.8428 & 6.4211 & 0.2199 & 0.57 & 0.4604 & 1 \tabularnewline
130 & 3.582 & 3.1967 & 2.4066 & 3.9868 & 0.1696 & 0 & 0.1917 & 0.9971 \tabularnewline
131 & 1.757 & 1.8506 & 1.0596 & 2.6416 & 0.4083 & 0 & 0.5568 & 0.2798 \tabularnewline
132 & 1.894 & 2.2615 & 1.4699 & 3.053 & 0.1814 & 0.8942 & 0.668 & 0.668 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=160257&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[120])[/C][/ROW]
[ROW][C]108[/C][C]2.205[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]1.442[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]2.238[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]2.179[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]3.218[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]5.139[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]4.99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]4.914[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]6.084[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]5.672[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]3.548[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]1.793[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]2.086[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]121[/C][C]1.262[/C][C]1.5923[/C][C]0.8595[/C][C]2.3252[/C][C]0.1885[/C][C]0.0934[/C][C]0.6562[/C][C]0.0934[/C][/ROW]
[ROW][C]122[/C][C]1.743[/C][C]2.1688[/C][C]1.3981[/C][C]2.9394[/C][C]0.1394[/C][C]0.9895[/C][C]0.4301[/C][C]0.5834[/C][/ROW]
[ROW][C]123[/C][C]1.964[/C][C]2.266[/C][C]1.4941[/C][C]3.038[/C][C]0.2216[/C][C]0.9079[/C][C]0.5875[/C][C]0.6762[/C][/ROW]
[ROW][C]124[/C][C]3.258[/C][C]3.249[/C][C]2.4657[/C][C]4.0323[/C][C]0.491[/C][C]0.9993[/C][C]0.5309[/C][C]0.9982[/C][/ROW]
[ROW][C]125[/C][C]4.966[/C][C]4.7486[/C][C]3.9651[/C][C]5.5321[/C][C]0.2933[/C][C]0.9999[/C][C]0.1644[/C][C]1[/C][/ROW]
[ROW][C]126[/C][C]4.944[/C][C]5.2167[/C][C]4.4318[/C][C]6.0017[/C][C]0.248[/C][C]0.7343[/C][C]0.7143[/C][C]1[/C][/ROW]
[ROW][C]127[/C][C]5.907[/C][C]5.3299[/C][C]4.543[/C][C]6.1169[/C][C]0.0753[/C][C]0.8318[/C][C]0.8499[/C][C]1[/C][/ROW]
[ROW][C]128[/C][C]5.561[/C][C]5.6416[/C][C]4.8536[/C][C]6.4296[/C][C]0.4206[/C][C]0.2546[/C][C]0.1356[/C][C]1[/C][/ROW]
[ROW][C]129[/C][C]5.321[/C][C]5.632[/C][C]4.8428[/C][C]6.4211[/C][C]0.2199[/C][C]0.57[/C][C]0.4604[/C][C]1[/C][/ROW]
[ROW][C]130[/C][C]3.582[/C][C]3.1967[/C][C]2.4066[/C][C]3.9868[/C][C]0.1696[/C][C]0[/C][C]0.1917[/C][C]0.9971[/C][/ROW]
[ROW][C]131[/C][C]1.757[/C][C]1.8506[/C][C]1.0596[/C][C]2.6416[/C][C]0.4083[/C][C]0[/C][C]0.5568[/C][C]0.2798[/C][/ROW]
[ROW][C]132[/C][C]1.894[/C][C]2.2615[/C][C]1.4699[/C][C]3.053[/C][C]0.1814[/C][C]0.8942[/C][C]0.668[/C][C]0.668[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=160257&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=160257&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[120])
1082.205-------
1091.442-------
1102.238-------
1112.179-------
1123.218-------
1135.139-------
1144.99-------
1154.914-------
1166.084-------
1175.672-------
1183.548-------
1191.793-------
1202.086-------
1211.2621.59230.85952.32520.18850.09340.65620.0934
1221.7432.16881.39812.93940.13940.98950.43010.5834
1231.9642.2661.49413.0380.22160.90790.58750.6762
1243.2583.2492.46574.03230.4910.99930.53090.9982
1254.9664.74863.96515.53210.29330.99990.16441
1264.9445.21674.43186.00170.2480.73430.71431
1275.9075.32994.5436.11690.07530.83180.84991
1285.5615.64164.85366.42960.42060.25460.13561
1295.3215.6324.84286.42110.21990.570.46041
1303.5823.19672.40663.98680.169600.19170.9971
1311.7571.85061.05962.64160.408300.55680.2798
1321.8942.26151.46993.0530.18140.89420.6680.668







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1210.2348-0.207400.109100
1220.1813-0.19630.20190.18130.14520.381
1230.1738-0.13330.1790.09120.12720.3567
1240.1230.00280.1351e-040.09540.3089
1250.08420.04580.11710.04730.08580.2929
1260.0768-0.05230.10630.07440.08390.2896
1270.07530.10830.10660.3330.11950.3457
1280.0713-0.01430.09510.00650.10540.3246
1290.0715-0.05520.09060.09670.10440.3231
1300.12610.12050.09360.14850.10880.3298
1310.2181-0.05060.08970.00880.09970.3158
1320.1786-0.16250.09580.1350.10260.3204

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
121 & 0.2348 & -0.2074 & 0 & 0.1091 & 0 & 0 \tabularnewline
122 & 0.1813 & -0.1963 & 0.2019 & 0.1813 & 0.1452 & 0.381 \tabularnewline
123 & 0.1738 & -0.1333 & 0.179 & 0.0912 & 0.1272 & 0.3567 \tabularnewline
124 & 0.123 & 0.0028 & 0.135 & 1e-04 & 0.0954 & 0.3089 \tabularnewline
125 & 0.0842 & 0.0458 & 0.1171 & 0.0473 & 0.0858 & 0.2929 \tabularnewline
126 & 0.0768 & -0.0523 & 0.1063 & 0.0744 & 0.0839 & 0.2896 \tabularnewline
127 & 0.0753 & 0.1083 & 0.1066 & 0.333 & 0.1195 & 0.3457 \tabularnewline
128 & 0.0713 & -0.0143 & 0.0951 & 0.0065 & 0.1054 & 0.3246 \tabularnewline
129 & 0.0715 & -0.0552 & 0.0906 & 0.0967 & 0.1044 & 0.3231 \tabularnewline
130 & 0.1261 & 0.1205 & 0.0936 & 0.1485 & 0.1088 & 0.3298 \tabularnewline
131 & 0.2181 & -0.0506 & 0.0897 & 0.0088 & 0.0997 & 0.3158 \tabularnewline
132 & 0.1786 & -0.1625 & 0.0958 & 0.135 & 0.1026 & 0.3204 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=160257&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]121[/C][C]0.2348[/C][C]-0.2074[/C][C]0[/C][C]0.1091[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]122[/C][C]0.1813[/C][C]-0.1963[/C][C]0.2019[/C][C]0.1813[/C][C]0.1452[/C][C]0.381[/C][/ROW]
[ROW][C]123[/C][C]0.1738[/C][C]-0.1333[/C][C]0.179[/C][C]0.0912[/C][C]0.1272[/C][C]0.3567[/C][/ROW]
[ROW][C]124[/C][C]0.123[/C][C]0.0028[/C][C]0.135[/C][C]1e-04[/C][C]0.0954[/C][C]0.3089[/C][/ROW]
[ROW][C]125[/C][C]0.0842[/C][C]0.0458[/C][C]0.1171[/C][C]0.0473[/C][C]0.0858[/C][C]0.2929[/C][/ROW]
[ROW][C]126[/C][C]0.0768[/C][C]-0.0523[/C][C]0.1063[/C][C]0.0744[/C][C]0.0839[/C][C]0.2896[/C][/ROW]
[ROW][C]127[/C][C]0.0753[/C][C]0.1083[/C][C]0.1066[/C][C]0.333[/C][C]0.1195[/C][C]0.3457[/C][/ROW]
[ROW][C]128[/C][C]0.0713[/C][C]-0.0143[/C][C]0.0951[/C][C]0.0065[/C][C]0.1054[/C][C]0.3246[/C][/ROW]
[ROW][C]129[/C][C]0.0715[/C][C]-0.0552[/C][C]0.0906[/C][C]0.0967[/C][C]0.1044[/C][C]0.3231[/C][/ROW]
[ROW][C]130[/C][C]0.1261[/C][C]0.1205[/C][C]0.0936[/C][C]0.1485[/C][C]0.1088[/C][C]0.3298[/C][/ROW]
[ROW][C]131[/C][C]0.2181[/C][C]-0.0506[/C][C]0.0897[/C][C]0.0088[/C][C]0.0997[/C][C]0.3158[/C][/ROW]
[ROW][C]132[/C][C]0.1786[/C][C]-0.1625[/C][C]0.0958[/C][C]0.135[/C][C]0.1026[/C][C]0.3204[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=160257&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=160257&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
1210.2348-0.207400.109100
1220.1813-0.19630.20190.18130.14520.381
1230.1738-0.13330.1790.09120.12720.3567
1240.1230.00280.1351e-040.09540.3089
1250.08420.04580.11710.04730.08580.2929
1260.0768-0.05230.10630.07440.08390.2896
1270.07530.10830.10660.3330.11950.3457
1280.0713-0.01430.09510.00650.10540.3246
1290.0715-0.05520.09060.09670.10440.3231
1300.12610.12050.09360.14850.10880.3298
1310.2181-0.05060.08970.00880.09970.3158
1320.1786-0.16250.09580.1350.10260.3204



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