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 computationSun, 19 Dec 2010 21:47:07 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/19/t1292795111oa55kxt5p770bbr.htm/, Retrieved Sun, 05 May 2024 07:20:32 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=112772, Retrieved Sun, 05 May 2024 07:20:32 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact156
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-    D      [ARIMA Forecasting] [WS 9 Forecasting ...] [2010-12-03 22:01:04] [8081b8996d5947580de3eb171e82db4f]
-   PD        [ARIMA Forecasting] [Workshop 9, Forecast] [2010-12-05 20:21:31] [3635fb7041b1998c5a1332cf9de22bce]
-   P           [ARIMA Forecasting] [ARIMA Extrapolati...] [2010-12-06 22:58:10] [3635fb7041b1998c5a1332cf9de22bce]
-   P             [ARIMA Forecasting] [Verbetering WS9] [2010-12-14 19:20:19] [3635fb7041b1998c5a1332cf9de22bce]
-   PD              [ARIMA Forecasting] [Paper Forecast] [2010-12-19 18:06:55] [3635fb7041b1998c5a1332cf9de22bce]
-   PD                  [ARIMA Forecasting] [Paper Forecast 2] [2010-12-19 21:47:07] [23a9b79f355c69a75648521a893cf584] [Current]
-   P                     [ARIMA Forecasting] [Forecast op ons m...] [2010-12-22 09:08:03] [8081b8996d5947580de3eb171e82db4f]
-   P                     [ARIMA Forecasting] [Forecast op ons m...] [2010-12-22 09:08:03] [8081b8996d5947580de3eb171e82db4f]
-                         [ARIMA Forecasting] [Paper ARIMA Forecast] [2010-12-22 14:26:41] [d946de7cca328fbcf207448a112523ab]
- RMPD                    [ARIMA Backward Selection] [ARIMA] [2011-12-16 17:12:33] [c505444e07acba7694d29053ca5d114e]
- R PD                    [ARIMA Forecasting] [ARIMA forecasting] [2011-12-16 17:16:12] [c505444e07acba7694d29053ca5d114e]
Feedback Forum

Post a new message
Dataseries X:
21.454
23.899
24.939
23.580
24.562
24.696
23.785
23.812
21.917
19.713
19.282
18.788
21.453
24.482
27.474
27.264
27.349
30.632
29.429
30.084
26.290
24.379
23.335
21.346
21.106
24.514
28.353
30.805
31.348
34.556
33.855
34.787
32.529
29.998
29.257
28.155
30.466
35.704
39.327
39.351
42.234
43.630
43.722
43.121
37.985
37.135
34.646
33.026
35.087
38.846
42.013
43.908
42.868
44.423
44.167
43.636
44.382
42.142
43.452
36.912
42.413
45.344
44.873
47.510
49.554
47.369
45.998
48.140
48.441
44.928
40.454
38.661
37.246
36.843
36.424
37.594
38.144
38.737
34.560
36.080
33.508
35.462
33.374
32.110




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112772&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 time2 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[72])
6036.912-------
6142.413-------
6245.344-------
6344.873-------
6447.51-------
6549.554-------
6647.369-------
6745.998-------
6848.14-------
6948.441-------
7044.928-------
7140.454-------
7238.661-------
7337.24641.492837.88145.10470.01060.93780.30880.9378
7436.84345.000739.906650.09488e-040.99860.44750.9926
7536.42447.089440.856253.32274e-040.99940.75710.996
7637.59448.378241.183955.57250.00170.99940.59350.9959
7738.14449.379441.338257.42070.00310.9980.4830.9955
7838.73750.146641.339558.95380.00560.99620.73180.9947
7934.5649.406339.894758.91790.00110.9860.75880.9866
8036.0849.986339.81960.15370.00370.99850.63910.9855
8133.50848.455437.672259.23870.00330.98780.5010.9625
8235.46246.095734.729957.46160.03330.9850.57980.9001
8333.37444.469532.549556.38960.0340.93070.74550.8302
8432.1141.911429.461854.36090.06140.91050.69560.6956

\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[72]) \tabularnewline
60 & 36.912 & - & - & - & - & - & - & - \tabularnewline
61 & 42.413 & - & - & - & - & - & - & - \tabularnewline
62 & 45.344 & - & - & - & - & - & - & - \tabularnewline
63 & 44.873 & - & - & - & - & - & - & - \tabularnewline
64 & 47.51 & - & - & - & - & - & - & - \tabularnewline
65 & 49.554 & - & - & - & - & - & - & - \tabularnewline
66 & 47.369 & - & - & - & - & - & - & - \tabularnewline
67 & 45.998 & - & - & - & - & - & - & - \tabularnewline
68 & 48.14 & - & - & - & - & - & - & - \tabularnewline
69 & 48.441 & - & - & - & - & - & - & - \tabularnewline
70 & 44.928 & - & - & - & - & - & - & - \tabularnewline
71 & 40.454 & - & - & - & - & - & - & - \tabularnewline
72 & 38.661 & - & - & - & - & - & - & - \tabularnewline
73 & 37.246 & 41.4928 & 37.881 & 45.1047 & 0.0106 & 0.9378 & 0.3088 & 0.9378 \tabularnewline
74 & 36.843 & 45.0007 & 39.9066 & 50.0948 & 8e-04 & 0.9986 & 0.4475 & 0.9926 \tabularnewline
75 & 36.424 & 47.0894 & 40.8562 & 53.3227 & 4e-04 & 0.9994 & 0.7571 & 0.996 \tabularnewline
76 & 37.594 & 48.3782 & 41.1839 & 55.5725 & 0.0017 & 0.9994 & 0.5935 & 0.9959 \tabularnewline
77 & 38.144 & 49.3794 & 41.3382 & 57.4207 & 0.0031 & 0.998 & 0.483 & 0.9955 \tabularnewline
78 & 38.737 & 50.1466 & 41.3395 & 58.9538 & 0.0056 & 0.9962 & 0.7318 & 0.9947 \tabularnewline
79 & 34.56 & 49.4063 & 39.8947 & 58.9179 & 0.0011 & 0.986 & 0.7588 & 0.9866 \tabularnewline
80 & 36.08 & 49.9863 & 39.819 & 60.1537 & 0.0037 & 0.9985 & 0.6391 & 0.9855 \tabularnewline
81 & 33.508 & 48.4554 & 37.6722 & 59.2387 & 0.0033 & 0.9878 & 0.501 & 0.9625 \tabularnewline
82 & 35.462 & 46.0957 & 34.7299 & 57.4616 & 0.0333 & 0.985 & 0.5798 & 0.9001 \tabularnewline
83 & 33.374 & 44.4695 & 32.5495 & 56.3896 & 0.034 & 0.9307 & 0.7455 & 0.8302 \tabularnewline
84 & 32.11 & 41.9114 & 29.4618 & 54.3609 & 0.0614 & 0.9105 & 0.6956 & 0.6956 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112772&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[72])[/C][/ROW]
[ROW][C]60[/C][C]36.912[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]42.413[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]45.344[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]44.873[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]47.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]49.554[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]47.369[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]45.998[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]48.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]48.441[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]44.928[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]40.454[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]38.661[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]37.246[/C][C]41.4928[/C][C]37.881[/C][C]45.1047[/C][C]0.0106[/C][C]0.9378[/C][C]0.3088[/C][C]0.9378[/C][/ROW]
[ROW][C]74[/C][C]36.843[/C][C]45.0007[/C][C]39.9066[/C][C]50.0948[/C][C]8e-04[/C][C]0.9986[/C][C]0.4475[/C][C]0.9926[/C][/ROW]
[ROW][C]75[/C][C]36.424[/C][C]47.0894[/C][C]40.8562[/C][C]53.3227[/C][C]4e-04[/C][C]0.9994[/C][C]0.7571[/C][C]0.996[/C][/ROW]
[ROW][C]76[/C][C]37.594[/C][C]48.3782[/C][C]41.1839[/C][C]55.5725[/C][C]0.0017[/C][C]0.9994[/C][C]0.5935[/C][C]0.9959[/C][/ROW]
[ROW][C]77[/C][C]38.144[/C][C]49.3794[/C][C]41.3382[/C][C]57.4207[/C][C]0.0031[/C][C]0.998[/C][C]0.483[/C][C]0.9955[/C][/ROW]
[ROW][C]78[/C][C]38.737[/C][C]50.1466[/C][C]41.3395[/C][C]58.9538[/C][C]0.0056[/C][C]0.9962[/C][C]0.7318[/C][C]0.9947[/C][/ROW]
[ROW][C]79[/C][C]34.56[/C][C]49.4063[/C][C]39.8947[/C][C]58.9179[/C][C]0.0011[/C][C]0.986[/C][C]0.7588[/C][C]0.9866[/C][/ROW]
[ROW][C]80[/C][C]36.08[/C][C]49.9863[/C][C]39.819[/C][C]60.1537[/C][C]0.0037[/C][C]0.9985[/C][C]0.6391[/C][C]0.9855[/C][/ROW]
[ROW][C]81[/C][C]33.508[/C][C]48.4554[/C][C]37.6722[/C][C]59.2387[/C][C]0.0033[/C][C]0.9878[/C][C]0.501[/C][C]0.9625[/C][/ROW]
[ROW][C]82[/C][C]35.462[/C][C]46.0957[/C][C]34.7299[/C][C]57.4616[/C][C]0.0333[/C][C]0.985[/C][C]0.5798[/C][C]0.9001[/C][/ROW]
[ROW][C]83[/C][C]33.374[/C][C]44.4695[/C][C]32.5495[/C][C]56.3896[/C][C]0.034[/C][C]0.9307[/C][C]0.7455[/C][C]0.8302[/C][/ROW]
[ROW][C]84[/C][C]32.11[/C][C]41.9114[/C][C]29.4618[/C][C]54.3609[/C][C]0.0614[/C][C]0.9105[/C][C]0.6956[/C][C]0.6956[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112772&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112772&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[72])
6036.912-------
6142.413-------
6245.344-------
6344.873-------
6447.51-------
6549.554-------
6647.369-------
6745.998-------
6848.14-------
6948.441-------
7044.928-------
7140.454-------
7238.661-------
7337.24641.492837.88145.10470.01060.93780.30880.9378
7436.84345.000739.906650.09488e-040.99860.44750.9926
7536.42447.089440.856253.32274e-040.99940.75710.996
7637.59448.378241.183955.57250.00170.99940.59350.9959
7738.14449.379441.338257.42070.00310.9980.4830.9955
7838.73750.146641.339558.95380.00560.99620.73180.9947
7934.5649.406339.894758.91790.00110.9860.75880.9866
8036.0849.986339.81960.15370.00370.99850.63910.9855
8133.50848.455437.672259.23870.00330.98780.5010.9625
8235.46246.095734.729957.46160.03330.9850.57980.9001
8333.37444.469532.549556.38960.0340.93070.74550.8302
8432.1141.911429.461854.36090.06140.91050.69560.6956







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.0444-0.1024018.035400
740.0578-0.18130.141866.548242.29186.5032
750.0675-0.22650.17113.751666.11178.1309
760.0759-0.22290.1833116.299278.65868.869
770.0831-0.22750.1921126.235388.17399.3901
780.0896-0.22750.198130.179695.17499.7558
790.0982-0.30050.2127220.4123113.065910.6332
800.1038-0.27820.2208193.3865123.10611.0953
810.1135-0.30850.2306223.4261134.252711.5867
820.1258-0.23070.2306113.0765132.135111.495
830.1368-0.24950.2323123.1107131.314711.4593
840.1516-0.23390.232496.067128.377411.3304

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.0444 & -0.1024 & 0 & 18.0354 & 0 & 0 \tabularnewline
74 & 0.0578 & -0.1813 & 0.1418 & 66.5482 & 42.2918 & 6.5032 \tabularnewline
75 & 0.0675 & -0.2265 & 0.17 & 113.7516 & 66.1117 & 8.1309 \tabularnewline
76 & 0.0759 & -0.2229 & 0.1833 & 116.2992 & 78.6586 & 8.869 \tabularnewline
77 & 0.0831 & -0.2275 & 0.1921 & 126.2353 & 88.1739 & 9.3901 \tabularnewline
78 & 0.0896 & -0.2275 & 0.198 & 130.1796 & 95.1749 & 9.7558 \tabularnewline
79 & 0.0982 & -0.3005 & 0.2127 & 220.4123 & 113.0659 & 10.6332 \tabularnewline
80 & 0.1038 & -0.2782 & 0.2208 & 193.3865 & 123.106 & 11.0953 \tabularnewline
81 & 0.1135 & -0.3085 & 0.2306 & 223.4261 & 134.2527 & 11.5867 \tabularnewline
82 & 0.1258 & -0.2307 & 0.2306 & 113.0765 & 132.1351 & 11.495 \tabularnewline
83 & 0.1368 & -0.2495 & 0.2323 & 123.1107 & 131.3147 & 11.4593 \tabularnewline
84 & 0.1516 & -0.2339 & 0.2324 & 96.067 & 128.3774 & 11.3304 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112772&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]73[/C][C]0.0444[/C][C]-0.1024[/C][C]0[/C][C]18.0354[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]0.0578[/C][C]-0.1813[/C][C]0.1418[/C][C]66.5482[/C][C]42.2918[/C][C]6.5032[/C][/ROW]
[ROW][C]75[/C][C]0.0675[/C][C]-0.2265[/C][C]0.17[/C][C]113.7516[/C][C]66.1117[/C][C]8.1309[/C][/ROW]
[ROW][C]76[/C][C]0.0759[/C][C]-0.2229[/C][C]0.1833[/C][C]116.2992[/C][C]78.6586[/C][C]8.869[/C][/ROW]
[ROW][C]77[/C][C]0.0831[/C][C]-0.2275[/C][C]0.1921[/C][C]126.2353[/C][C]88.1739[/C][C]9.3901[/C][/ROW]
[ROW][C]78[/C][C]0.0896[/C][C]-0.2275[/C][C]0.198[/C][C]130.1796[/C][C]95.1749[/C][C]9.7558[/C][/ROW]
[ROW][C]79[/C][C]0.0982[/C][C]-0.3005[/C][C]0.2127[/C][C]220.4123[/C][C]113.0659[/C][C]10.6332[/C][/ROW]
[ROW][C]80[/C][C]0.1038[/C][C]-0.2782[/C][C]0.2208[/C][C]193.3865[/C][C]123.106[/C][C]11.0953[/C][/ROW]
[ROW][C]81[/C][C]0.1135[/C][C]-0.3085[/C][C]0.2306[/C][C]223.4261[/C][C]134.2527[/C][C]11.5867[/C][/ROW]
[ROW][C]82[/C][C]0.1258[/C][C]-0.2307[/C][C]0.2306[/C][C]113.0765[/C][C]132.1351[/C][C]11.495[/C][/ROW]
[ROW][C]83[/C][C]0.1368[/C][C]-0.2495[/C][C]0.2323[/C][C]123.1107[/C][C]131.3147[/C][C]11.4593[/C][/ROW]
[ROW][C]84[/C][C]0.1516[/C][C]-0.2339[/C][C]0.2324[/C][C]96.067[/C][C]128.3774[/C][C]11.3304[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112772&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112772&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
730.0444-0.1024018.035400
740.0578-0.18130.141866.548242.29186.5032
750.0675-0.22650.17113.751666.11178.1309
760.0759-0.22290.1833116.299278.65868.869
770.0831-0.22750.1921126.235388.17399.3901
780.0896-0.22750.198130.179695.17499.7558
790.0982-0.30050.2127220.4123113.065910.6332
800.1038-0.27820.2208193.3865123.10611.0953
810.1135-0.30850.2306223.4261134.252711.5867
820.1258-0.23070.2306113.0765132.135111.495
830.1368-0.24950.2323123.1107131.314711.4593
840.1516-0.23390.232496.067128.377411.3304



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