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 computationSat, 13 Dec 2008 03:25:16 -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/2008/Dec/13/t1229163975b8rdes1p92zwxkd.htm/, Retrieved Sat, 25 May 2024 04:09:23 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=32945, Retrieved Sat, 25 May 2024 04:09:23 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact190
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forcasting ...] [2008-12-13 10:25:16] [63db34dadd44fb018112addcdefe949f] [Current]
- RMPD    [Bivariate Kernel Density Estimation] [Bivariate Kernel ...] [2008-12-13 14:43:52] [58bf45a666dc5198906262e8815a9722]
- RMPD    [Bivariate Kernel Density Estimation] [Bivariate Kernel ...] [2008-12-13 14:50:34] [58bf45a666dc5198906262e8815a9722]
-   P     [ARIMA Forecasting] [ARIMA Forcasting ...] [2008-12-18 17:23:29] [58bf45a666dc5198906262e8815a9722]
-   PD      [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-20 14:53:20] [063e4b67ad7d3a8a83eccec794cd5aa7]
Feedback Forum

Post a new message
Dataseries X:
101
104
99
105
107
111
117
119
127
128
135
132
136
143
142
153
145
138
148
152
169
169
161
174
179
191
190
182
175
181
197
194
197
216
221
218
230
227
204
197
199
208
191
202
211
224
224
231
244
235
250
266
288
283
295
312
334
348
383
407




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32945&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32945&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32945&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'George Udny Yule' @ 72.249.76.132







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])
36218-------
37230-------
38227-------
39204-------
40197-------
41199-------
42208-------
43191-------
44202-------
45211-------
46224-------
47224-------
48231-------
49244231.5074214.1547248.86010.07910.52290.56760.5229
50235231.5442206.0987256.98960.3950.16870.63680.5167
51250231.5469199.968263.12570.1260.41510.95630.5135
52266231.547194.8424268.25170.03290.16220.96750.5117
53288231.5471190.3494272.74470.00360.05060.93920.5104
54283231.5471186.3003276.79380.01290.00720.84610.5095
55295231.5471182.5849280.50920.00550.01970.94770.5087
56312231.5471179.1322283.96190.00130.00880.86540.5082
57334231.5471175.8933287.20082e-040.00230.76540.5077
58348231.5471172.8329290.26131e-043e-040.59950.5073
59383231.5471169.9242293.169901e-040.59490.5069
60407231.5471167.1467295.9474000.50660.5066

\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 & 218 & - & - & - & - & - & - & - \tabularnewline
37 & 230 & - & - & - & - & - & - & - \tabularnewline
38 & 227 & - & - & - & - & - & - & - \tabularnewline
39 & 204 & - & - & - & - & - & - & - \tabularnewline
40 & 197 & - & - & - & - & - & - & - \tabularnewline
41 & 199 & - & - & - & - & - & - & - \tabularnewline
42 & 208 & - & - & - & - & - & - & - \tabularnewline
43 & 191 & - & - & - & - & - & - & - \tabularnewline
44 & 202 & - & - & - & - & - & - & - \tabularnewline
45 & 211 & - & - & - & - & - & - & - \tabularnewline
46 & 224 & - & - & - & - & - & - & - \tabularnewline
47 & 224 & - & - & - & - & - & - & - \tabularnewline
48 & 231 & - & - & - & - & - & - & - \tabularnewline
49 & 244 & 231.5074 & 214.1547 & 248.8601 & 0.0791 & 0.5229 & 0.5676 & 0.5229 \tabularnewline
50 & 235 & 231.5442 & 206.0987 & 256.9896 & 0.395 & 0.1687 & 0.6368 & 0.5167 \tabularnewline
51 & 250 & 231.5469 & 199.968 & 263.1257 & 0.126 & 0.4151 & 0.9563 & 0.5135 \tabularnewline
52 & 266 & 231.547 & 194.8424 & 268.2517 & 0.0329 & 0.1622 & 0.9675 & 0.5117 \tabularnewline
53 & 288 & 231.5471 & 190.3494 & 272.7447 & 0.0036 & 0.0506 & 0.9392 & 0.5104 \tabularnewline
54 & 283 & 231.5471 & 186.3003 & 276.7938 & 0.0129 & 0.0072 & 0.8461 & 0.5095 \tabularnewline
55 & 295 & 231.5471 & 182.5849 & 280.5092 & 0.0055 & 0.0197 & 0.9477 & 0.5087 \tabularnewline
56 & 312 & 231.5471 & 179.1322 & 283.9619 & 0.0013 & 0.0088 & 0.8654 & 0.5082 \tabularnewline
57 & 334 & 231.5471 & 175.8933 & 287.2008 & 2e-04 & 0.0023 & 0.7654 & 0.5077 \tabularnewline
58 & 348 & 231.5471 & 172.8329 & 290.2613 & 1e-04 & 3e-04 & 0.5995 & 0.5073 \tabularnewline
59 & 383 & 231.5471 & 169.9242 & 293.1699 & 0 & 1e-04 & 0.5949 & 0.5069 \tabularnewline
60 & 407 & 231.5471 & 167.1467 & 295.9474 & 0 & 0 & 0.5066 & 0.5066 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32945&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]218[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]230[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]227[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]204[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]197[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]199[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]208[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]191[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]202[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]211[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]224[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]224[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]231[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]244[/C][C]231.5074[/C][C]214.1547[/C][C]248.8601[/C][C]0.0791[/C][C]0.5229[/C][C]0.5676[/C][C]0.5229[/C][/ROW]
[ROW][C]50[/C][C]235[/C][C]231.5442[/C][C]206.0987[/C][C]256.9896[/C][C]0.395[/C][C]0.1687[/C][C]0.6368[/C][C]0.5167[/C][/ROW]
[ROW][C]51[/C][C]250[/C][C]231.5469[/C][C]199.968[/C][C]263.1257[/C][C]0.126[/C][C]0.4151[/C][C]0.9563[/C][C]0.5135[/C][/ROW]
[ROW][C]52[/C][C]266[/C][C]231.547[/C][C]194.8424[/C][C]268.2517[/C][C]0.0329[/C][C]0.1622[/C][C]0.9675[/C][C]0.5117[/C][/ROW]
[ROW][C]53[/C][C]288[/C][C]231.5471[/C][C]190.3494[/C][C]272.7447[/C][C]0.0036[/C][C]0.0506[/C][C]0.9392[/C][C]0.5104[/C][/ROW]
[ROW][C]54[/C][C]283[/C][C]231.5471[/C][C]186.3003[/C][C]276.7938[/C][C]0.0129[/C][C]0.0072[/C][C]0.8461[/C][C]0.5095[/C][/ROW]
[ROW][C]55[/C][C]295[/C][C]231.5471[/C][C]182.5849[/C][C]280.5092[/C][C]0.0055[/C][C]0.0197[/C][C]0.9477[/C][C]0.5087[/C][/ROW]
[ROW][C]56[/C][C]312[/C][C]231.5471[/C][C]179.1322[/C][C]283.9619[/C][C]0.0013[/C][C]0.0088[/C][C]0.8654[/C][C]0.5082[/C][/ROW]
[ROW][C]57[/C][C]334[/C][C]231.5471[/C][C]175.8933[/C][C]287.2008[/C][C]2e-04[/C][C]0.0023[/C][C]0.7654[/C][C]0.5077[/C][/ROW]
[ROW][C]58[/C][C]348[/C][C]231.5471[/C][C]172.8329[/C][C]290.2613[/C][C]1e-04[/C][C]3e-04[/C][C]0.5995[/C][C]0.5073[/C][/ROW]
[ROW][C]59[/C][C]383[/C][C]231.5471[/C][C]169.9242[/C][C]293.1699[/C][C]0[/C][C]1e-04[/C][C]0.5949[/C][C]0.5069[/C][/ROW]
[ROW][C]60[/C][C]407[/C][C]231.5471[/C][C]167.1467[/C][C]295.9474[/C][C]0[/C][C]0[/C][C]0.5066[/C][C]0.5066[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32945&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32945&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])
36218-------
37230-------
38227-------
39204-------
40197-------
41199-------
42208-------
43191-------
44202-------
45211-------
46224-------
47224-------
48231-------
49244231.5074214.1547248.86010.07910.52290.56760.5229
50235231.5442206.0987256.98960.3950.16870.63680.5167
51250231.5469199.968263.12570.1260.41510.95630.5135
52266231.547194.8424268.25170.03290.16220.96750.5117
53288231.5471190.3494272.74470.00360.05060.93920.5104
54283231.5471186.3003276.79380.01290.00720.84610.5095
55295231.5471182.5849280.50920.00550.01970.94770.5087
56312231.5471179.1322283.96190.00130.00880.86540.5082
57334231.5471175.8933287.20082e-040.00230.76540.5077
58348231.5471172.8329290.26131e-043e-040.59950.5073
59383231.5471169.9242293.169901e-040.59490.5069
60407231.5471167.1467295.9474000.50660.5066







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.03820.0540.0045156.064913.00543.6063
500.05610.01490.001211.94270.99520.9976
510.06960.07970.0066340.518728.37665.327
520.08090.14880.01241187.006298.91729.9457
530.09080.24380.02033186.9346265.577916.2966
540.09970.22220.01852647.4051220.617114.8532
550.10790.2740.02284026.2757335.52318.3173
560.11550.34750.0296472.6757539.389623.2248
570.12260.44250.036910496.605874.717129.5756
580.12940.50290.041913561.28741130.107333.6171
590.13580.65410.054522937.99321911.499443.7207
600.14190.75770.063130783.73442565.311250.6489

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0382 & 0.054 & 0.0045 & 156.0649 & 13.0054 & 3.6063 \tabularnewline
50 & 0.0561 & 0.0149 & 0.0012 & 11.9427 & 0.9952 & 0.9976 \tabularnewline
51 & 0.0696 & 0.0797 & 0.0066 & 340.5187 & 28.3766 & 5.327 \tabularnewline
52 & 0.0809 & 0.1488 & 0.0124 & 1187.0062 & 98.9172 & 9.9457 \tabularnewline
53 & 0.0908 & 0.2438 & 0.0203 & 3186.9346 & 265.5779 & 16.2966 \tabularnewline
54 & 0.0997 & 0.2222 & 0.0185 & 2647.4051 & 220.6171 & 14.8532 \tabularnewline
55 & 0.1079 & 0.274 & 0.0228 & 4026.2757 & 335.523 & 18.3173 \tabularnewline
56 & 0.1155 & 0.3475 & 0.029 & 6472.6757 & 539.3896 & 23.2248 \tabularnewline
57 & 0.1226 & 0.4425 & 0.0369 & 10496.605 & 874.7171 & 29.5756 \tabularnewline
58 & 0.1294 & 0.5029 & 0.0419 & 13561.2874 & 1130.1073 & 33.6171 \tabularnewline
59 & 0.1358 & 0.6541 & 0.0545 & 22937.9932 & 1911.4994 & 43.7207 \tabularnewline
60 & 0.1419 & 0.7577 & 0.0631 & 30783.7344 & 2565.3112 & 50.6489 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32945&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.0382[/C][C]0.054[/C][C]0.0045[/C][C]156.0649[/C][C]13.0054[/C][C]3.6063[/C][/ROW]
[ROW][C]50[/C][C]0.0561[/C][C]0.0149[/C][C]0.0012[/C][C]11.9427[/C][C]0.9952[/C][C]0.9976[/C][/ROW]
[ROW][C]51[/C][C]0.0696[/C][C]0.0797[/C][C]0.0066[/C][C]340.5187[/C][C]28.3766[/C][C]5.327[/C][/ROW]
[ROW][C]52[/C][C]0.0809[/C][C]0.1488[/C][C]0.0124[/C][C]1187.0062[/C][C]98.9172[/C][C]9.9457[/C][/ROW]
[ROW][C]53[/C][C]0.0908[/C][C]0.2438[/C][C]0.0203[/C][C]3186.9346[/C][C]265.5779[/C][C]16.2966[/C][/ROW]
[ROW][C]54[/C][C]0.0997[/C][C]0.2222[/C][C]0.0185[/C][C]2647.4051[/C][C]220.6171[/C][C]14.8532[/C][/ROW]
[ROW][C]55[/C][C]0.1079[/C][C]0.274[/C][C]0.0228[/C][C]4026.2757[/C][C]335.523[/C][C]18.3173[/C][/ROW]
[ROW][C]56[/C][C]0.1155[/C][C]0.3475[/C][C]0.029[/C][C]6472.6757[/C][C]539.3896[/C][C]23.2248[/C][/ROW]
[ROW][C]57[/C][C]0.1226[/C][C]0.4425[/C][C]0.0369[/C][C]10496.605[/C][C]874.7171[/C][C]29.5756[/C][/ROW]
[ROW][C]58[/C][C]0.1294[/C][C]0.5029[/C][C]0.0419[/C][C]13561.2874[/C][C]1130.1073[/C][C]33.6171[/C][/ROW]
[ROW][C]59[/C][C]0.1358[/C][C]0.6541[/C][C]0.0545[/C][C]22937.9932[/C][C]1911.4994[/C][C]43.7207[/C][/ROW]
[ROW][C]60[/C][C]0.1419[/C][C]0.7577[/C][C]0.0631[/C][C]30783.7344[/C][C]2565.3112[/C][C]50.6489[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32945&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32945&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.03820.0540.0045156.064913.00543.6063
500.05610.01490.001211.94270.99520.9976
510.06960.07970.0066340.518728.37665.327
520.08090.14880.01241187.006298.91729.9457
530.09080.24380.02033186.9346265.577916.2966
540.09970.22220.01852647.4051220.617114.8532
550.10790.2740.02284026.2757335.52318.3173
560.11550.34750.0296472.6757539.389623.2248
570.12260.44250.036910496.605874.717129.5756
580.12940.50290.041913561.28741130.107333.6171
590.13580.65410.054522937.99321911.499443.7207
600.14190.75770.063130783.73442565.311250.6489



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