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 computationTue, 15 Dec 2009 13:24:19 -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/15/t1260908794g6k7pumc2ujxcqw.htm/, Retrieved Wed, 08 May 2024 09:55:39 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=68126, Retrieved Wed, 08 May 2024 09:55:39 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact133
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-06 10:44:58] [1e83ffa964db6f7ea6ccc4e7b5acbbff]
-   PD  [ARIMA Forecasting] [ws 10 deel 2 prblm] [2009-12-09 19:29:01] [134dc66689e3d457a82860db6471d419]
-   P     [ARIMA Forecasting] [ws 10 deel 2 arim...] [2009-12-12 09:45:03] [134dc66689e3d457a82860db6471d419]
-   P       [ARIMA Forecasting] [Paper ARIMA F IGP] [2009-12-14 21:07:10] [134dc66689e3d457a82860db6471d419]
-   P           [ARIMA Forecasting] [Paper ARIMA F IGP 12] [2009-12-15 20:24:19] [4f297b039e1043ebee7ff7a83b1eaaaa] [Current]
- R PD            [ARIMA Forecasting] [Paper arima forec...] [2009-12-23 22:37:42] [62d3ced7fb1c10c35a82e9cb1d0d0e2b]
- R PD            [ARIMA Forecasting] [Paper arima forec...] [2009-12-23 23:25:41] [62d3ced7fb1c10c35a82e9cb1d0d0e2b]
Feedback Forum

Post a new message
Dataseries X:
100.01
103.84
104.48
95.43
104.80
108.64
105.65
108.42
115.35
113.64
115.24
100.33
101.29
104.48
99.26
100.11
103.52
101.18
96.39
97.56
96.39
85.10
79.77
79.13
80.84
82.75
92.55
96.60
96.92
95.32
98.52
100.22
104.91
103.10
97.13
103.42
111.72
118.11
111.62
100.22
102.03
105.76
107.68
110.77
105.44
112.26
114.07
117.90
124.72
126.42
134.73
135.79
143.36
140.37
144.74
151.98
150.92
163.38
154.43
146.66
157.95
162.10
180.42
179.57
171.58
185.43
190.64
203.00
202.36
193.41
186.17
192.24
209.60
206.41
209.82
230.37
235.80
232.07
244.64
242.19
217.48
209.39
211.73
221.00
203.11
214.71
224.19
238.04
238.36
246.24
259.87
249.97
266.48
282.98
306.31
301.73
314.62
332.62
355.51
370.32
408.13
433.58
440.51
386.29
342.84
254.97
203.42
170.09
174.03
167.85
177.01
188.19
211.20
240.91
230.26
251.25
241.66




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68126&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 time1 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[105])
93266.48-------
94282.98-------
95306.31-------
96301.73-------
97314.62-------
98332.62-------
99355.51-------
100370.32-------
101408.13-------
102433.58-------
103440.51-------
104386.29-------
105342.84-------
106254.97338.6286281.2533419.19360.02090.45920.91210.4592
107203.42339.1741258.4194474.69390.02480.88840.68270.4789
108170.09338.8421242.681524.20380.03720.92390.65260.4831
109174.03339.4921231.2819574.71030.0840.9210.58210.4889
110167.85340.2756222.1602626.57210.11890.87250.52090.493
111177.01341.1884214.5664681.02890.17180.84130.46710.4962
112188.19341.7173207.8579737.21710.22340.79280.44360.4978
113211.2342.974202.2571800.02240.2860.74660.390.5002
114240.91343.7053197.0617865.43040.34970.69070.36780.5013
115230.26343.8762192.1673933.14440.35280.6340.37390.5014
116251.25342.2549187.0695995.24320.39240.63160.44740.4993
117241.66340.6223182.38141060.68860.39380.59610.49760.4976

\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[105]) \tabularnewline
93 & 266.48 & - & - & - & - & - & - & - \tabularnewline
94 & 282.98 & - & - & - & - & - & - & - \tabularnewline
95 & 306.31 & - & - & - & - & - & - & - \tabularnewline
96 & 301.73 & - & - & - & - & - & - & - \tabularnewline
97 & 314.62 & - & - & - & - & - & - & - \tabularnewline
98 & 332.62 & - & - & - & - & - & - & - \tabularnewline
99 & 355.51 & - & - & - & - & - & - & - \tabularnewline
100 & 370.32 & - & - & - & - & - & - & - \tabularnewline
101 & 408.13 & - & - & - & - & - & - & - \tabularnewline
102 & 433.58 & - & - & - & - & - & - & - \tabularnewline
103 & 440.51 & - & - & - & - & - & - & - \tabularnewline
104 & 386.29 & - & - & - & - & - & - & - \tabularnewline
105 & 342.84 & - & - & - & - & - & - & - \tabularnewline
106 & 254.97 & 338.6286 & 281.2533 & 419.1936 & 0.0209 & 0.4592 & 0.9121 & 0.4592 \tabularnewline
107 & 203.42 & 339.1741 & 258.4194 & 474.6939 & 0.0248 & 0.8884 & 0.6827 & 0.4789 \tabularnewline
108 & 170.09 & 338.8421 & 242.681 & 524.2038 & 0.0372 & 0.9239 & 0.6526 & 0.4831 \tabularnewline
109 & 174.03 & 339.4921 & 231.2819 & 574.7103 & 0.084 & 0.921 & 0.5821 & 0.4889 \tabularnewline
110 & 167.85 & 340.2756 & 222.1602 & 626.5721 & 0.1189 & 0.8725 & 0.5209 & 0.493 \tabularnewline
111 & 177.01 & 341.1884 & 214.5664 & 681.0289 & 0.1718 & 0.8413 & 0.4671 & 0.4962 \tabularnewline
112 & 188.19 & 341.7173 & 207.8579 & 737.2171 & 0.2234 & 0.7928 & 0.4436 & 0.4978 \tabularnewline
113 & 211.2 & 342.974 & 202.2571 & 800.0224 & 0.286 & 0.7466 & 0.39 & 0.5002 \tabularnewline
114 & 240.91 & 343.7053 & 197.0617 & 865.4304 & 0.3497 & 0.6907 & 0.3678 & 0.5013 \tabularnewline
115 & 230.26 & 343.8762 & 192.1673 & 933.1444 & 0.3528 & 0.634 & 0.3739 & 0.5014 \tabularnewline
116 & 251.25 & 342.2549 & 187.0695 & 995.2432 & 0.3924 & 0.6316 & 0.4474 & 0.4993 \tabularnewline
117 & 241.66 & 340.6223 & 182.3814 & 1060.6886 & 0.3938 & 0.5961 & 0.4976 & 0.4976 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68126&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[105])[/C][/ROW]
[ROW][C]93[/C][C]266.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]282.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]306.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]301.73[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]314.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]332.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]355.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]370.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]408.13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]433.58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]440.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]386.29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]342.84[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]254.97[/C][C]338.6286[/C][C]281.2533[/C][C]419.1936[/C][C]0.0209[/C][C]0.4592[/C][C]0.9121[/C][C]0.4592[/C][/ROW]
[ROW][C]107[/C][C]203.42[/C][C]339.1741[/C][C]258.4194[/C][C]474.6939[/C][C]0.0248[/C][C]0.8884[/C][C]0.6827[/C][C]0.4789[/C][/ROW]
[ROW][C]108[/C][C]170.09[/C][C]338.8421[/C][C]242.681[/C][C]524.2038[/C][C]0.0372[/C][C]0.9239[/C][C]0.6526[/C][C]0.4831[/C][/ROW]
[ROW][C]109[/C][C]174.03[/C][C]339.4921[/C][C]231.2819[/C][C]574.7103[/C][C]0.084[/C][C]0.921[/C][C]0.5821[/C][C]0.4889[/C][/ROW]
[ROW][C]110[/C][C]167.85[/C][C]340.2756[/C][C]222.1602[/C][C]626.5721[/C][C]0.1189[/C][C]0.8725[/C][C]0.5209[/C][C]0.493[/C][/ROW]
[ROW][C]111[/C][C]177.01[/C][C]341.1884[/C][C]214.5664[/C][C]681.0289[/C][C]0.1718[/C][C]0.8413[/C][C]0.4671[/C][C]0.4962[/C][/ROW]
[ROW][C]112[/C][C]188.19[/C][C]341.7173[/C][C]207.8579[/C][C]737.2171[/C][C]0.2234[/C][C]0.7928[/C][C]0.4436[/C][C]0.4978[/C][/ROW]
[ROW][C]113[/C][C]211.2[/C][C]342.974[/C][C]202.2571[/C][C]800.0224[/C][C]0.286[/C][C]0.7466[/C][C]0.39[/C][C]0.5002[/C][/ROW]
[ROW][C]114[/C][C]240.91[/C][C]343.7053[/C][C]197.0617[/C][C]865.4304[/C][C]0.3497[/C][C]0.6907[/C][C]0.3678[/C][C]0.5013[/C][/ROW]
[ROW][C]115[/C][C]230.26[/C][C]343.8762[/C][C]192.1673[/C][C]933.1444[/C][C]0.3528[/C][C]0.634[/C][C]0.3739[/C][C]0.5014[/C][/ROW]
[ROW][C]116[/C][C]251.25[/C][C]342.2549[/C][C]187.0695[/C][C]995.2432[/C][C]0.3924[/C][C]0.6316[/C][C]0.4474[/C][C]0.4993[/C][/ROW]
[ROW][C]117[/C][C]241.66[/C][C]340.6223[/C][C]182.3814[/C][C]1060.6886[/C][C]0.3938[/C][C]0.5961[/C][C]0.4976[/C][C]0.4976[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68126&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68126&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[105])
93266.48-------
94282.98-------
95306.31-------
96301.73-------
97314.62-------
98332.62-------
99355.51-------
100370.32-------
101408.13-------
102433.58-------
103440.51-------
104386.29-------
105342.84-------
106254.97338.6286281.2533419.19360.02090.45920.91210.4592
107203.42339.1741258.4194474.69390.02480.88840.68270.4789
108170.09338.8421242.681524.20380.03720.92390.65260.4831
109174.03339.4921231.2819574.71030.0840.9210.58210.4889
110167.85340.2756222.1602626.57210.11890.87250.52090.493
111177.01341.1884214.5664681.02890.17180.84130.46710.4962
112188.19341.7173207.8579737.21710.22340.79280.44360.4978
113211.2342.974202.2571800.02240.2860.74660.390.5002
114240.91343.7053197.0617865.43040.34970.69070.36780.5013
115230.26343.8762192.1673933.14440.35280.6340.37390.5014
116251.25342.2549187.0695995.24320.39240.63160.44740.4993
117241.66340.6223182.38141060.68860.39380.59610.49760.4976







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1060.1214-0.24710.02066998.7604583.2324.1502
1070.2039-0.40020.033418429.1861535.765539.1888
1080.2791-0.4980.041528477.26042373.10548.7145
1090.3535-0.48740.040627377.69872281.474947.7648
1100.4293-0.50670.042229730.59682477.549749.775
1110.5082-0.48120.040126954.54932246.212447.3942
1120.5905-0.44930.037423570.62961964.219144.3195
1130.6799-0.38420.03217364.39281447.032738.0399
1140.7745-0.29910.024910566.8766880.57329.6745
1150.8743-0.33040.027512908.63521075.719632.7982
1160.9734-0.26590.02228281.8851690.157126.2708
1171.0786-0.29050.02429793.5421816.128528.568

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
106 & 0.1214 & -0.2471 & 0.0206 & 6998.7604 & 583.23 & 24.1502 \tabularnewline
107 & 0.2039 & -0.4002 & 0.0334 & 18429.186 & 1535.7655 & 39.1888 \tabularnewline
108 & 0.2791 & -0.498 & 0.0415 & 28477.2604 & 2373.105 & 48.7145 \tabularnewline
109 & 0.3535 & -0.4874 & 0.0406 & 27377.6987 & 2281.4749 & 47.7648 \tabularnewline
110 & 0.4293 & -0.5067 & 0.0422 & 29730.5968 & 2477.5497 & 49.775 \tabularnewline
111 & 0.5082 & -0.4812 & 0.0401 & 26954.5493 & 2246.2124 & 47.3942 \tabularnewline
112 & 0.5905 & -0.4493 & 0.0374 & 23570.6296 & 1964.2191 & 44.3195 \tabularnewline
113 & 0.6799 & -0.3842 & 0.032 & 17364.3928 & 1447.0327 & 38.0399 \tabularnewline
114 & 0.7745 & -0.2991 & 0.0249 & 10566.8766 & 880.573 & 29.6745 \tabularnewline
115 & 0.8743 & -0.3304 & 0.0275 & 12908.6352 & 1075.7196 & 32.7982 \tabularnewline
116 & 0.9734 & -0.2659 & 0.0222 & 8281.8851 & 690.1571 & 26.2708 \tabularnewline
117 & 1.0786 & -0.2905 & 0.0242 & 9793.5421 & 816.1285 & 28.568 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68126&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]106[/C][C]0.1214[/C][C]-0.2471[/C][C]0.0206[/C][C]6998.7604[/C][C]583.23[/C][C]24.1502[/C][/ROW]
[ROW][C]107[/C][C]0.2039[/C][C]-0.4002[/C][C]0.0334[/C][C]18429.186[/C][C]1535.7655[/C][C]39.1888[/C][/ROW]
[ROW][C]108[/C][C]0.2791[/C][C]-0.498[/C][C]0.0415[/C][C]28477.2604[/C][C]2373.105[/C][C]48.7145[/C][/ROW]
[ROW][C]109[/C][C]0.3535[/C][C]-0.4874[/C][C]0.0406[/C][C]27377.6987[/C][C]2281.4749[/C][C]47.7648[/C][/ROW]
[ROW][C]110[/C][C]0.4293[/C][C]-0.5067[/C][C]0.0422[/C][C]29730.5968[/C][C]2477.5497[/C][C]49.775[/C][/ROW]
[ROW][C]111[/C][C]0.5082[/C][C]-0.4812[/C][C]0.0401[/C][C]26954.5493[/C][C]2246.2124[/C][C]47.3942[/C][/ROW]
[ROW][C]112[/C][C]0.5905[/C][C]-0.4493[/C][C]0.0374[/C][C]23570.6296[/C][C]1964.2191[/C][C]44.3195[/C][/ROW]
[ROW][C]113[/C][C]0.6799[/C][C]-0.3842[/C][C]0.032[/C][C]17364.3928[/C][C]1447.0327[/C][C]38.0399[/C][/ROW]
[ROW][C]114[/C][C]0.7745[/C][C]-0.2991[/C][C]0.0249[/C][C]10566.8766[/C][C]880.573[/C][C]29.6745[/C][/ROW]
[ROW][C]115[/C][C]0.8743[/C][C]-0.3304[/C][C]0.0275[/C][C]12908.6352[/C][C]1075.7196[/C][C]32.7982[/C][/ROW]
[ROW][C]116[/C][C]0.9734[/C][C]-0.2659[/C][C]0.0222[/C][C]8281.8851[/C][C]690.1571[/C][C]26.2708[/C][/ROW]
[ROW][C]117[/C][C]1.0786[/C][C]-0.2905[/C][C]0.0242[/C][C]9793.5421[/C][C]816.1285[/C][C]28.568[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68126&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68126&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
1060.1214-0.24710.02066998.7604583.2324.1502
1070.2039-0.40020.033418429.1861535.765539.1888
1080.2791-0.4980.041528477.26042373.10548.7145
1090.3535-0.48740.040627377.69872281.474947.7648
1100.4293-0.50670.042229730.59682477.549749.775
1110.5082-0.48120.040126954.54932246.212447.3942
1120.5905-0.44930.037423570.62961964.219144.3195
1130.6799-0.38420.03217364.39281447.032738.0399
1140.7745-0.29910.024910566.8766880.57329.6745
1150.8743-0.33040.027512908.63521075.719632.7982
1160.9734-0.26590.02228281.8851690.157126.2708
1171.0786-0.29050.02429793.5421816.128528.568



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