Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 13 Dec 2008 06:51:55 -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/t1229176411w0irr41twxshtsp.htm/, Retrieved Sat, 18 May 2024 09:24:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33095, Retrieved Sat, 18 May 2024 09:24:50 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact163
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F       [ARIMA Forecasting] [ARIMA forecasting] [2008-12-13 13:51:55] [72e979bcc364082694890d2eccc1a66f] [Current]
Feedback Forum
2008-12-18 10:40:06 [407693b66d7f2e0b350979005057872d] [reply
Deze vraag is helemaal correct beantwoord. De tabelbeschrijving klopt ook .
2008-12-19 12:57:16 [Jessica Alves Pires] [reply
Tabel goed en uitgebreid besproken. De student heeft de tabel echter theoretisch besproken, de concrete waarden van de eigen tijdreeks werden niet besproken. De grafieken zijn ook niet besproken. Er wordt ook niet vermeld of er seizoenaliteit of een trend aanwezig is.

Post a new message
Dataseries X:
345
334
345
333
336
324
320
330
313
301
288
294
302
294
293
290
283
286
293
334
329
411
416
418
408
402
401
400
389
371
364
350
332
323
316
312
315
314
313
314
317
308
312
306
304
297
284
278
273
265
259
252
245
235
232
229
219
218
215
211




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33095&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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33095&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33095&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'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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])
36312-------
37315-------
38314-------
39313-------
40314-------
41317-------
42308-------
43312-------
44306-------
45304-------
46297-------
47284-------
48278-------
49273271.5338243.4778299.58980.45920.32570.00120.3257
50265268.8084229.3132308.30360.4250.41760.01250.3241
51259266.3905210.9478321.83320.39690.51960.04970.3408
52252264.8688196.2489333.48870.35660.56660.08030.3538
53245263.5665182.2451344.88790.32730.60980.09890.364
54235264.1169170.8385357.39520.27030.6560.17820.3853
55232263.2855159.2633367.30780.27780.7030.17930.3908
56229263.7714149.3529378.18990.27570.70690.23470.4037
57219264.0072140.1734387.8410.23810.71020.26340.4124
58218264.7666131.8446397.68860.24520.75010.31730.4226
59215266.4167125.0671407.76630.23790.7490.40370.4362
60211267.1361117.6956416.57660.23080.75290.44330.4433

\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 & 312 & - & - & - & - & - & - & - \tabularnewline
37 & 315 & - & - & - & - & - & - & - \tabularnewline
38 & 314 & - & - & - & - & - & - & - \tabularnewline
39 & 313 & - & - & - & - & - & - & - \tabularnewline
40 & 314 & - & - & - & - & - & - & - \tabularnewline
41 & 317 & - & - & - & - & - & - & - \tabularnewline
42 & 308 & - & - & - & - & - & - & - \tabularnewline
43 & 312 & - & - & - & - & - & - & - \tabularnewline
44 & 306 & - & - & - & - & - & - & - \tabularnewline
45 & 304 & - & - & - & - & - & - & - \tabularnewline
46 & 297 & - & - & - & - & - & - & - \tabularnewline
47 & 284 & - & - & - & - & - & - & - \tabularnewline
48 & 278 & - & - & - & - & - & - & - \tabularnewline
49 & 273 & 271.5338 & 243.4778 & 299.5898 & 0.4592 & 0.3257 & 0.0012 & 0.3257 \tabularnewline
50 & 265 & 268.8084 & 229.3132 & 308.3036 & 0.425 & 0.4176 & 0.0125 & 0.3241 \tabularnewline
51 & 259 & 266.3905 & 210.9478 & 321.8332 & 0.3969 & 0.5196 & 0.0497 & 0.3408 \tabularnewline
52 & 252 & 264.8688 & 196.2489 & 333.4887 & 0.3566 & 0.5666 & 0.0803 & 0.3538 \tabularnewline
53 & 245 & 263.5665 & 182.2451 & 344.8879 & 0.3273 & 0.6098 & 0.0989 & 0.364 \tabularnewline
54 & 235 & 264.1169 & 170.8385 & 357.3952 & 0.2703 & 0.656 & 0.1782 & 0.3853 \tabularnewline
55 & 232 & 263.2855 & 159.2633 & 367.3078 & 0.2778 & 0.703 & 0.1793 & 0.3908 \tabularnewline
56 & 229 & 263.7714 & 149.3529 & 378.1899 & 0.2757 & 0.7069 & 0.2347 & 0.4037 \tabularnewline
57 & 219 & 264.0072 & 140.1734 & 387.841 & 0.2381 & 0.7102 & 0.2634 & 0.4124 \tabularnewline
58 & 218 & 264.7666 & 131.8446 & 397.6886 & 0.2452 & 0.7501 & 0.3173 & 0.4226 \tabularnewline
59 & 215 & 266.4167 & 125.0671 & 407.7663 & 0.2379 & 0.749 & 0.4037 & 0.4362 \tabularnewline
60 & 211 & 267.1361 & 117.6956 & 416.5766 & 0.2308 & 0.7529 & 0.4433 & 0.4433 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33095&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]312[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]315[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]314[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]313[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]314[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]317[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]308[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]312[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]306[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]304[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]297[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]284[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]278[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]273[/C][C]271.5338[/C][C]243.4778[/C][C]299.5898[/C][C]0.4592[/C][C]0.3257[/C][C]0.0012[/C][C]0.3257[/C][/ROW]
[ROW][C]50[/C][C]265[/C][C]268.8084[/C][C]229.3132[/C][C]308.3036[/C][C]0.425[/C][C]0.4176[/C][C]0.0125[/C][C]0.3241[/C][/ROW]
[ROW][C]51[/C][C]259[/C][C]266.3905[/C][C]210.9478[/C][C]321.8332[/C][C]0.3969[/C][C]0.5196[/C][C]0.0497[/C][C]0.3408[/C][/ROW]
[ROW][C]52[/C][C]252[/C][C]264.8688[/C][C]196.2489[/C][C]333.4887[/C][C]0.3566[/C][C]0.5666[/C][C]0.0803[/C][C]0.3538[/C][/ROW]
[ROW][C]53[/C][C]245[/C][C]263.5665[/C][C]182.2451[/C][C]344.8879[/C][C]0.3273[/C][C]0.6098[/C][C]0.0989[/C][C]0.364[/C][/ROW]
[ROW][C]54[/C][C]235[/C][C]264.1169[/C][C]170.8385[/C][C]357.3952[/C][C]0.2703[/C][C]0.656[/C][C]0.1782[/C][C]0.3853[/C][/ROW]
[ROW][C]55[/C][C]232[/C][C]263.2855[/C][C]159.2633[/C][C]367.3078[/C][C]0.2778[/C][C]0.703[/C][C]0.1793[/C][C]0.3908[/C][/ROW]
[ROW][C]56[/C][C]229[/C][C]263.7714[/C][C]149.3529[/C][C]378.1899[/C][C]0.2757[/C][C]0.7069[/C][C]0.2347[/C][C]0.4037[/C][/ROW]
[ROW][C]57[/C][C]219[/C][C]264.0072[/C][C]140.1734[/C][C]387.841[/C][C]0.2381[/C][C]0.7102[/C][C]0.2634[/C][C]0.4124[/C][/ROW]
[ROW][C]58[/C][C]218[/C][C]264.7666[/C][C]131.8446[/C][C]397.6886[/C][C]0.2452[/C][C]0.7501[/C][C]0.3173[/C][C]0.4226[/C][/ROW]
[ROW][C]59[/C][C]215[/C][C]266.4167[/C][C]125.0671[/C][C]407.7663[/C][C]0.2379[/C][C]0.749[/C][C]0.4037[/C][C]0.4362[/C][/ROW]
[ROW][C]60[/C][C]211[/C][C]267.1361[/C][C]117.6956[/C][C]416.5766[/C][C]0.2308[/C][C]0.7529[/C][C]0.4433[/C][C]0.4433[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33095&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33095&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])
36312-------
37315-------
38314-------
39313-------
40314-------
41317-------
42308-------
43312-------
44306-------
45304-------
46297-------
47284-------
48278-------
49273271.5338243.4778299.58980.45920.32570.00120.3257
50265268.8084229.3132308.30360.4250.41760.01250.3241
51259266.3905210.9478321.83320.39690.51960.04970.3408
52252264.8688196.2489333.48870.35660.56660.08030.3538
53245263.5665182.2451344.88790.32730.60980.09890.364
54235264.1169170.8385357.39520.27030.6560.17820.3853
55232263.2855159.2633367.30780.27780.7030.17930.3908
56229263.7714149.3529378.18990.27570.70690.23470.4037
57219264.0072140.1734387.8410.23810.71020.26340.4124
58218264.7666131.8446397.68860.24520.75010.31730.4226
59215266.4167125.0671407.76630.23790.7490.40370.4362
60211267.1361117.6956416.57660.23080.75290.44330.4433







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.05270.00544e-042.14970.17910.4233
500.075-0.01420.001214.50371.20861.0994
510.1062-0.02770.002354.61944.55162.1335
520.1322-0.04860.004165.605813.80053.7149
530.1574-0.07040.0059344.71428.72625.3597
540.1802-0.11020.0092847.791870.64938.4053
550.2016-0.11880.0099978.784181.56539.0314
560.2213-0.13180.0111209.0508100.754210.0376
570.2393-0.17050.01422025.6499168.804212.9925
580.2561-0.17660.01472187.115182.259613.5004
590.2707-0.1930.01612643.6804220.306714.8427
600.2854-0.21010.01753151.2643262.605416.2051

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0527 & 0.0054 & 4e-04 & 2.1497 & 0.1791 & 0.4233 \tabularnewline
50 & 0.075 & -0.0142 & 0.0012 & 14.5037 & 1.2086 & 1.0994 \tabularnewline
51 & 0.1062 & -0.0277 & 0.0023 & 54.6194 & 4.5516 & 2.1335 \tabularnewline
52 & 0.1322 & -0.0486 & 0.004 & 165.6058 & 13.8005 & 3.7149 \tabularnewline
53 & 0.1574 & -0.0704 & 0.0059 & 344.714 & 28.7262 & 5.3597 \tabularnewline
54 & 0.1802 & -0.1102 & 0.0092 & 847.7918 & 70.6493 & 8.4053 \tabularnewline
55 & 0.2016 & -0.1188 & 0.0099 & 978.7841 & 81.5653 & 9.0314 \tabularnewline
56 & 0.2213 & -0.1318 & 0.011 & 1209.0508 & 100.7542 & 10.0376 \tabularnewline
57 & 0.2393 & -0.1705 & 0.0142 & 2025.6499 & 168.8042 & 12.9925 \tabularnewline
58 & 0.2561 & -0.1766 & 0.0147 & 2187.115 & 182.2596 & 13.5004 \tabularnewline
59 & 0.2707 & -0.193 & 0.0161 & 2643.6804 & 220.3067 & 14.8427 \tabularnewline
60 & 0.2854 & -0.2101 & 0.0175 & 3151.2643 & 262.6054 & 16.2051 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33095&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.0527[/C][C]0.0054[/C][C]4e-04[/C][C]2.1497[/C][C]0.1791[/C][C]0.4233[/C][/ROW]
[ROW][C]50[/C][C]0.075[/C][C]-0.0142[/C][C]0.0012[/C][C]14.5037[/C][C]1.2086[/C][C]1.0994[/C][/ROW]
[ROW][C]51[/C][C]0.1062[/C][C]-0.0277[/C][C]0.0023[/C][C]54.6194[/C][C]4.5516[/C][C]2.1335[/C][/ROW]
[ROW][C]52[/C][C]0.1322[/C][C]-0.0486[/C][C]0.004[/C][C]165.6058[/C][C]13.8005[/C][C]3.7149[/C][/ROW]
[ROW][C]53[/C][C]0.1574[/C][C]-0.0704[/C][C]0.0059[/C][C]344.714[/C][C]28.7262[/C][C]5.3597[/C][/ROW]
[ROW][C]54[/C][C]0.1802[/C][C]-0.1102[/C][C]0.0092[/C][C]847.7918[/C][C]70.6493[/C][C]8.4053[/C][/ROW]
[ROW][C]55[/C][C]0.2016[/C][C]-0.1188[/C][C]0.0099[/C][C]978.7841[/C][C]81.5653[/C][C]9.0314[/C][/ROW]
[ROW][C]56[/C][C]0.2213[/C][C]-0.1318[/C][C]0.011[/C][C]1209.0508[/C][C]100.7542[/C][C]10.0376[/C][/ROW]
[ROW][C]57[/C][C]0.2393[/C][C]-0.1705[/C][C]0.0142[/C][C]2025.6499[/C][C]168.8042[/C][C]12.9925[/C][/ROW]
[ROW][C]58[/C][C]0.2561[/C][C]-0.1766[/C][C]0.0147[/C][C]2187.115[/C][C]182.2596[/C][C]13.5004[/C][/ROW]
[ROW][C]59[/C][C]0.2707[/C][C]-0.193[/C][C]0.0161[/C][C]2643.6804[/C][C]220.3067[/C][C]14.8427[/C][/ROW]
[ROW][C]60[/C][C]0.2854[/C][C]-0.2101[/C][C]0.0175[/C][C]3151.2643[/C][C]262.6054[/C][C]16.2051[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33095&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33095&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.05270.00544e-042.14970.17910.4233
500.075-0.01420.001214.50371.20861.0994
510.1062-0.02770.002354.61944.55162.1335
520.1322-0.04860.004165.605813.80053.7149
530.1574-0.07040.0059344.71428.72625.3597
540.1802-0.11020.0092847.791870.64938.4053
550.2016-0.11880.0099978.784181.56539.0314
560.2213-0.13180.0111209.0508100.754210.0376
570.2393-0.17050.01422025.6499168.804212.9925
580.2561-0.17660.01472187.115182.259613.5004
590.2707-0.1930.01612643.6804220.306714.8427
600.2854-0.21010.01753151.2643262.605416.2051



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