Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 05 Dec 2007 13:38:24 -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/2007/Dec/05/t1196886355b5i2dbspi21bn3y.htm/, Retrieved Fri, 03 May 2024 02:55:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2512, Retrieved Fri, 03 May 2024 02:55:15 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact217
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMAFORCechtsch] [2007-12-05 20:38:24] [142ab5472309a9ae9a3b52678758dc4a] [Current]
Feedback Forum

Post a new message
Dataseries X:
2529
2196
3202
2718
2728
2354
2697
2651
2067
2641
2539
2294
2712
2314
3092
2677
2813
2668
2939
2617
2231
2481
2421
2408
2560
2100
3315
2801
2403
3024
2507
2980
2211
2471
2594
2452
2232
2373
3127
2802
2641
2787
2619
2806
2193
2323
2529
2412
2262
2154
3230
2295
2715
2733
2317
2730
1913
2390
2484
1960




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of compuational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2512&T=0

[TABLE]
[ROW][C]Summary of compuational 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]2 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=2512&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2512&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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[48])
362452-------
372232-------
382373-------
393127-------
402802-------
412641-------
422787-------
432619-------
442806-------
452193-------
462323-------
472529-------
482412-------
4922622217.59231874.22052560.9640.39990.13360.46720.1336
5021542368.55631989.85282747.25990.13340.70940.49080.411
5132303121.48552732.69163510.27930.292210.48890.9998
5222952802.30362412.83373191.77360.00530.01570.50060.9752
5327152639.98642247.50923032.46360.3540.95750.4980.8726
5427332786.43582391.20543181.66620.39550.63840.49890.9683
5523172619.41322223.58483015.24160.06710.28690.50080.8478
5627302805.55432409.72173201.3870.35420.99220.49910.9743
5719132193.13681797.20052589.07310.08280.00390.50030.1393
5823902323.01381926.95332719.07430.37010.97880.50.3298
5924842528.89612132.78922925.0030.41210.7540.49980.7185
6019602412.08962015.97982808.19930.01260.3610.50020.5002

\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 & 2452 & - & - & - & - & - & - & - \tabularnewline
37 & 2232 & - & - & - & - & - & - & - \tabularnewline
38 & 2373 & - & - & - & - & - & - & - \tabularnewline
39 & 3127 & - & - & - & - & - & - & - \tabularnewline
40 & 2802 & - & - & - & - & - & - & - \tabularnewline
41 & 2641 & - & - & - & - & - & - & - \tabularnewline
42 & 2787 & - & - & - & - & - & - & - \tabularnewline
43 & 2619 & - & - & - & - & - & - & - \tabularnewline
44 & 2806 & - & - & - & - & - & - & - \tabularnewline
45 & 2193 & - & - & - & - & - & - & - \tabularnewline
46 & 2323 & - & - & - & - & - & - & - \tabularnewline
47 & 2529 & - & - & - & - & - & - & - \tabularnewline
48 & 2412 & - & - & - & - & - & - & - \tabularnewline
49 & 2262 & 2217.5923 & 1874.2205 & 2560.964 & 0.3999 & 0.1336 & 0.4672 & 0.1336 \tabularnewline
50 & 2154 & 2368.5563 & 1989.8528 & 2747.2599 & 0.1334 & 0.7094 & 0.4908 & 0.411 \tabularnewline
51 & 3230 & 3121.4855 & 2732.6916 & 3510.2793 & 0.2922 & 1 & 0.4889 & 0.9998 \tabularnewline
52 & 2295 & 2802.3036 & 2412.8337 & 3191.7736 & 0.0053 & 0.0157 & 0.5006 & 0.9752 \tabularnewline
53 & 2715 & 2639.9864 & 2247.5092 & 3032.4636 & 0.354 & 0.9575 & 0.498 & 0.8726 \tabularnewline
54 & 2733 & 2786.4358 & 2391.2054 & 3181.6662 & 0.3955 & 0.6384 & 0.4989 & 0.9683 \tabularnewline
55 & 2317 & 2619.4132 & 2223.5848 & 3015.2416 & 0.0671 & 0.2869 & 0.5008 & 0.8478 \tabularnewline
56 & 2730 & 2805.5543 & 2409.7217 & 3201.387 & 0.3542 & 0.9922 & 0.4991 & 0.9743 \tabularnewline
57 & 1913 & 2193.1368 & 1797.2005 & 2589.0731 & 0.0828 & 0.0039 & 0.5003 & 0.1393 \tabularnewline
58 & 2390 & 2323.0138 & 1926.9533 & 2719.0743 & 0.3701 & 0.9788 & 0.5 & 0.3298 \tabularnewline
59 & 2484 & 2528.8961 & 2132.7892 & 2925.003 & 0.4121 & 0.754 & 0.4998 & 0.7185 \tabularnewline
60 & 1960 & 2412.0896 & 2015.9798 & 2808.1993 & 0.0126 & 0.361 & 0.5002 & 0.5002 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2512&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]2452[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]2232[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]2373[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]3127[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]2802[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]2641[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]2787[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]2619[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]2806[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]2193[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]2323[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]2529[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]2412[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]2262[/C][C]2217.5923[/C][C]1874.2205[/C][C]2560.964[/C][C]0.3999[/C][C]0.1336[/C][C]0.4672[/C][C]0.1336[/C][/ROW]
[ROW][C]50[/C][C]2154[/C][C]2368.5563[/C][C]1989.8528[/C][C]2747.2599[/C][C]0.1334[/C][C]0.7094[/C][C]0.4908[/C][C]0.411[/C][/ROW]
[ROW][C]51[/C][C]3230[/C][C]3121.4855[/C][C]2732.6916[/C][C]3510.2793[/C][C]0.2922[/C][C]1[/C][C]0.4889[/C][C]0.9998[/C][/ROW]
[ROW][C]52[/C][C]2295[/C][C]2802.3036[/C][C]2412.8337[/C][C]3191.7736[/C][C]0.0053[/C][C]0.0157[/C][C]0.5006[/C][C]0.9752[/C][/ROW]
[ROW][C]53[/C][C]2715[/C][C]2639.9864[/C][C]2247.5092[/C][C]3032.4636[/C][C]0.354[/C][C]0.9575[/C][C]0.498[/C][C]0.8726[/C][/ROW]
[ROW][C]54[/C][C]2733[/C][C]2786.4358[/C][C]2391.2054[/C][C]3181.6662[/C][C]0.3955[/C][C]0.6384[/C][C]0.4989[/C][C]0.9683[/C][/ROW]
[ROW][C]55[/C][C]2317[/C][C]2619.4132[/C][C]2223.5848[/C][C]3015.2416[/C][C]0.0671[/C][C]0.2869[/C][C]0.5008[/C][C]0.8478[/C][/ROW]
[ROW][C]56[/C][C]2730[/C][C]2805.5543[/C][C]2409.7217[/C][C]3201.387[/C][C]0.3542[/C][C]0.9922[/C][C]0.4991[/C][C]0.9743[/C][/ROW]
[ROW][C]57[/C][C]1913[/C][C]2193.1368[/C][C]1797.2005[/C][C]2589.0731[/C][C]0.0828[/C][C]0.0039[/C][C]0.5003[/C][C]0.1393[/C][/ROW]
[ROW][C]58[/C][C]2390[/C][C]2323.0138[/C][C]1926.9533[/C][C]2719.0743[/C][C]0.3701[/C][C]0.9788[/C][C]0.5[/C][C]0.3298[/C][/ROW]
[ROW][C]59[/C][C]2484[/C][C]2528.8961[/C][C]2132.7892[/C][C]2925.003[/C][C]0.4121[/C][C]0.754[/C][C]0.4998[/C][C]0.7185[/C][/ROW]
[ROW][C]60[/C][C]1960[/C][C]2412.0896[/C][C]2015.9798[/C][C]2808.1993[/C][C]0.0126[/C][C]0.361[/C][C]0.5002[/C][C]0.5002[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2512&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2512&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])
362452-------
372232-------
382373-------
393127-------
402802-------
412641-------
422787-------
432619-------
442806-------
452193-------
462323-------
472529-------
482412-------
4922622217.59231874.22052560.9640.39990.13360.46720.1336
5021542368.55631989.85282747.25990.13340.70940.49080.411
5132303121.48552732.69163510.27930.292210.48890.9998
5222952802.30362412.83373191.77360.00530.01570.50060.9752
5327152639.98642247.50923032.46360.3540.95750.4980.8726
5427332786.43582391.20543181.66620.39550.63840.49890.9683
5523172619.41322223.58483015.24160.06710.28690.50080.8478
5627302805.55432409.72173201.3870.35420.99220.49910.9743
5719132193.13681797.20052589.07310.08280.00390.50030.1393
5823902323.01381926.95332719.07430.37010.97880.50.3298
5924842528.89612132.78922925.0030.41210.7540.49980.7185
6019602412.08962015.97982808.19930.01260.3610.50020.5002







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0790.020.00171972.0475164.337312.8194
500.0816-0.09060.007546034.41453836.201261.9371
510.06350.03480.002911775.4067981.283931.3255
520.0709-0.1810.0151257356.986321446.4155146.4459
530.07590.02840.00245627.0388468.919921.6546
540.0724-0.01920.00162855.3842237.948715.4256
550.0771-0.11550.009691453.76527621.147187.2992
560.072-0.02690.00225708.4571475.704821.8107
570.0921-0.12770.010678476.6436539.720280.8685
580.0870.02880.00244487.1476373.92919.3372
590.0799-0.01780.00152015.6611167.971812.9604
600.0838-0.18740.0156204384.961217032.0801130.507

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.079 & 0.02 & 0.0017 & 1972.0475 & 164.3373 & 12.8194 \tabularnewline
50 & 0.0816 & -0.0906 & 0.0075 & 46034.4145 & 3836.2012 & 61.9371 \tabularnewline
51 & 0.0635 & 0.0348 & 0.0029 & 11775.4067 & 981.2839 & 31.3255 \tabularnewline
52 & 0.0709 & -0.181 & 0.0151 & 257356.9863 & 21446.4155 & 146.4459 \tabularnewline
53 & 0.0759 & 0.0284 & 0.0024 & 5627.0388 & 468.9199 & 21.6546 \tabularnewline
54 & 0.0724 & -0.0192 & 0.0016 & 2855.3842 & 237.9487 & 15.4256 \tabularnewline
55 & 0.0771 & -0.1155 & 0.0096 & 91453.7652 & 7621.1471 & 87.2992 \tabularnewline
56 & 0.072 & -0.0269 & 0.0022 & 5708.4571 & 475.7048 & 21.8107 \tabularnewline
57 & 0.0921 & -0.1277 & 0.0106 & 78476.643 & 6539.7202 & 80.8685 \tabularnewline
58 & 0.087 & 0.0288 & 0.0024 & 4487.1476 & 373.929 & 19.3372 \tabularnewline
59 & 0.0799 & -0.0178 & 0.0015 & 2015.6611 & 167.9718 & 12.9604 \tabularnewline
60 & 0.0838 & -0.1874 & 0.0156 & 204384.9612 & 17032.0801 & 130.507 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2512&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.079[/C][C]0.02[/C][C]0.0017[/C][C]1972.0475[/C][C]164.3373[/C][C]12.8194[/C][/ROW]
[ROW][C]50[/C][C]0.0816[/C][C]-0.0906[/C][C]0.0075[/C][C]46034.4145[/C][C]3836.2012[/C][C]61.9371[/C][/ROW]
[ROW][C]51[/C][C]0.0635[/C][C]0.0348[/C][C]0.0029[/C][C]11775.4067[/C][C]981.2839[/C][C]31.3255[/C][/ROW]
[ROW][C]52[/C][C]0.0709[/C][C]-0.181[/C][C]0.0151[/C][C]257356.9863[/C][C]21446.4155[/C][C]146.4459[/C][/ROW]
[ROW][C]53[/C][C]0.0759[/C][C]0.0284[/C][C]0.0024[/C][C]5627.0388[/C][C]468.9199[/C][C]21.6546[/C][/ROW]
[ROW][C]54[/C][C]0.0724[/C][C]-0.0192[/C][C]0.0016[/C][C]2855.3842[/C][C]237.9487[/C][C]15.4256[/C][/ROW]
[ROW][C]55[/C][C]0.0771[/C][C]-0.1155[/C][C]0.0096[/C][C]91453.7652[/C][C]7621.1471[/C][C]87.2992[/C][/ROW]
[ROW][C]56[/C][C]0.072[/C][C]-0.0269[/C][C]0.0022[/C][C]5708.4571[/C][C]475.7048[/C][C]21.8107[/C][/ROW]
[ROW][C]57[/C][C]0.0921[/C][C]-0.1277[/C][C]0.0106[/C][C]78476.643[/C][C]6539.7202[/C][C]80.8685[/C][/ROW]
[ROW][C]58[/C][C]0.087[/C][C]0.0288[/C][C]0.0024[/C][C]4487.1476[/C][C]373.929[/C][C]19.3372[/C][/ROW]
[ROW][C]59[/C][C]0.0799[/C][C]-0.0178[/C][C]0.0015[/C][C]2015.6611[/C][C]167.9718[/C][C]12.9604[/C][/ROW]
[ROW][C]60[/C][C]0.0838[/C][C]-0.1874[/C][C]0.0156[/C][C]204384.9612[/C][C]17032.0801[/C][C]130.507[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2512&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2512&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.0790.020.00171972.0475164.337312.8194
500.0816-0.09060.007546034.41453836.201261.9371
510.06350.03480.002911775.4067981.283931.3255
520.0709-0.1810.0151257356.986321446.4155146.4459
530.07590.02840.00245627.0388468.919921.6546
540.0724-0.01920.00162855.3842237.948715.4256
550.0771-0.11550.009691453.76527621.147187.2992
560.072-0.02690.00225708.4571475.704821.8107
570.0921-0.12770.010678476.6436539.720280.8685
580.0870.02880.00244487.1476373.92919.3372
590.0799-0.01780.00152015.6611167.971812.9604
600.0838-0.18740.0156204384.961217032.0801130.507



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