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 computationWed, 29 Dec 2010 17:26:03 +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/29/t129364352536ba7twb72irp1l.htm/, Retrieved Fri, 03 May 2024 07:49:22 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116982, Retrieved Fri, 03 May 2024 07:49:22 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact117
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2010-12-29 17:26:03] [95fdfecfb4f2f50e2168e1a971ea5f83] [Current]
Feedback Forum

Post a new message
Dataseries X:
60178
53200
59909
55970
47682
50173
43090
36031
42143
48478
36046
31060
54874
60051
71622
66526
50140
55973
40393
38483
42879
47875
40578
31027
62027
56493
65566
62653
53470
59600
42542
42018
44038
44988
43309
26843
69770
64886
79354
63025
54003
55926
45629
40361
43039
44570
43269
25563
68707
60223
74283
61232
61531
65305
51699
44599
35221
55066
45335
28702
69517
69240
71525
77740
62107
65450
51493
43067
49172
54483
38158
27898
58648
56000
62381
59849
48345
55376
45400
38389
44098
48290
41267
31238




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116982&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116982&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116982&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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])
6028702-------
6169517-------
6269240-------
6371525-------
6477740-------
6562107-------
6665450-------
6751493-------
6843067-------
6949172-------
7054483-------
7138158-------
7227898-------
735864867248.571149844.323127700.90790.39020.8990.47070.899
745600065146.207448891.8395116726.42460.36410.59750.43820.9215
756238170712.579651345.3919150478.27950.41890.64110.4920.8536
765984971013.07851471.723152822.23210.39460.58190.4360.8492
774834558730.009545779.014791261.89130.26580.47310.41940.9684
785537662261.243447531.5427104055.68230.37340.7430.44060.9465
794540049014.211440421.150265412.38340.33290.22350.38350.9942
803838942024.117636038.466151769.47810.23240.24860.41690.9978
814409845832.895738483.829258835.67240.39680.86910.30740.9966
824829052193.734542264.90972758.82140.35490.77980.41360.9897
834126739124.425634082.153546867.83960.29380.01020.59660.9978
843123828063.945425845.497630884.96710.013700.54590.5459

\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 & 28702 & - & - & - & - & - & - & - \tabularnewline
61 & 69517 & - & - & - & - & - & - & - \tabularnewline
62 & 69240 & - & - & - & - & - & - & - \tabularnewline
63 & 71525 & - & - & - & - & - & - & - \tabularnewline
64 & 77740 & - & - & - & - & - & - & - \tabularnewline
65 & 62107 & - & - & - & - & - & - & - \tabularnewline
66 & 65450 & - & - & - & - & - & - & - \tabularnewline
67 & 51493 & - & - & - & - & - & - & - \tabularnewline
68 & 43067 & - & - & - & - & - & - & - \tabularnewline
69 & 49172 & - & - & - & - & - & - & - \tabularnewline
70 & 54483 & - & - & - & - & - & - & - \tabularnewline
71 & 38158 & - & - & - & - & - & - & - \tabularnewline
72 & 27898 & - & - & - & - & - & - & - \tabularnewline
73 & 58648 & 67248.5711 & 49844.323 & 127700.9079 & 0.3902 & 0.899 & 0.4707 & 0.899 \tabularnewline
74 & 56000 & 65146.2074 & 48891.8395 & 116726.4246 & 0.3641 & 0.5975 & 0.4382 & 0.9215 \tabularnewline
75 & 62381 & 70712.5796 & 51345.3919 & 150478.2795 & 0.4189 & 0.6411 & 0.492 & 0.8536 \tabularnewline
76 & 59849 & 71013.078 & 51471.723 & 152822.2321 & 0.3946 & 0.5819 & 0.436 & 0.8492 \tabularnewline
77 & 48345 & 58730.0095 & 45779.0147 & 91261.8913 & 0.2658 & 0.4731 & 0.4194 & 0.9684 \tabularnewline
78 & 55376 & 62261.2434 & 47531.5427 & 104055.6823 & 0.3734 & 0.743 & 0.4406 & 0.9465 \tabularnewline
79 & 45400 & 49014.2114 & 40421.1502 & 65412.3834 & 0.3329 & 0.2235 & 0.3835 & 0.9942 \tabularnewline
80 & 38389 & 42024.1176 & 36038.4661 & 51769.4781 & 0.2324 & 0.2486 & 0.4169 & 0.9978 \tabularnewline
81 & 44098 & 45832.8957 & 38483.8292 & 58835.6724 & 0.3968 & 0.8691 & 0.3074 & 0.9966 \tabularnewline
82 & 48290 & 52193.7345 & 42264.909 & 72758.8214 & 0.3549 & 0.7798 & 0.4136 & 0.9897 \tabularnewline
83 & 41267 & 39124.4256 & 34082.1535 & 46867.8396 & 0.2938 & 0.0102 & 0.5966 & 0.9978 \tabularnewline
84 & 31238 & 28063.9454 & 25845.4976 & 30884.9671 & 0.0137 & 0 & 0.5459 & 0.5459 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116982&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]28702[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]69517[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]69240[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]71525[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]77740[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]62107[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]65450[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]51493[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]43067[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]49172[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]54483[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]38158[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]27898[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]58648[/C][C]67248.5711[/C][C]49844.323[/C][C]127700.9079[/C][C]0.3902[/C][C]0.899[/C][C]0.4707[/C][C]0.899[/C][/ROW]
[ROW][C]74[/C][C]56000[/C][C]65146.2074[/C][C]48891.8395[/C][C]116726.4246[/C][C]0.3641[/C][C]0.5975[/C][C]0.4382[/C][C]0.9215[/C][/ROW]
[ROW][C]75[/C][C]62381[/C][C]70712.5796[/C][C]51345.3919[/C][C]150478.2795[/C][C]0.4189[/C][C]0.6411[/C][C]0.492[/C][C]0.8536[/C][/ROW]
[ROW][C]76[/C][C]59849[/C][C]71013.078[/C][C]51471.723[/C][C]152822.2321[/C][C]0.3946[/C][C]0.5819[/C][C]0.436[/C][C]0.8492[/C][/ROW]
[ROW][C]77[/C][C]48345[/C][C]58730.0095[/C][C]45779.0147[/C][C]91261.8913[/C][C]0.2658[/C][C]0.4731[/C][C]0.4194[/C][C]0.9684[/C][/ROW]
[ROW][C]78[/C][C]55376[/C][C]62261.2434[/C][C]47531.5427[/C][C]104055.6823[/C][C]0.3734[/C][C]0.743[/C][C]0.4406[/C][C]0.9465[/C][/ROW]
[ROW][C]79[/C][C]45400[/C][C]49014.2114[/C][C]40421.1502[/C][C]65412.3834[/C][C]0.3329[/C][C]0.2235[/C][C]0.3835[/C][C]0.9942[/C][/ROW]
[ROW][C]80[/C][C]38389[/C][C]42024.1176[/C][C]36038.4661[/C][C]51769.4781[/C][C]0.2324[/C][C]0.2486[/C][C]0.4169[/C][C]0.9978[/C][/ROW]
[ROW][C]81[/C][C]44098[/C][C]45832.8957[/C][C]38483.8292[/C][C]58835.6724[/C][C]0.3968[/C][C]0.8691[/C][C]0.3074[/C][C]0.9966[/C][/ROW]
[ROW][C]82[/C][C]48290[/C][C]52193.7345[/C][C]42264.909[/C][C]72758.8214[/C][C]0.3549[/C][C]0.7798[/C][C]0.4136[/C][C]0.9897[/C][/ROW]
[ROW][C]83[/C][C]41267[/C][C]39124.4256[/C][C]34082.1535[/C][C]46867.8396[/C][C]0.2938[/C][C]0.0102[/C][C]0.5966[/C][C]0.9978[/C][/ROW]
[ROW][C]84[/C][C]31238[/C][C]28063.9454[/C][C]25845.4976[/C][C]30884.9671[/C][C]0.0137[/C][C]0[/C][C]0.5459[/C][C]0.5459[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116982&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116982&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])
6028702-------
6169517-------
6269240-------
6371525-------
6477740-------
6562107-------
6665450-------
6751493-------
6843067-------
6949172-------
7054483-------
7138158-------
7227898-------
735864867248.571149844.323127700.90790.39020.8990.47070.899
745600065146.207448891.8395116726.42460.36410.59750.43820.9215
756238170712.579651345.3919150478.27950.41890.64110.4920.8536
765984971013.07851471.723152822.23210.39460.58190.4360.8492
774834558730.009545779.014791261.89130.26580.47310.41940.9684
785537662261.243447531.5427104055.68230.37340.7430.44060.9465
794540049014.211440421.150265412.38340.33290.22350.38350.9942
803838942024.117636038.466151769.47810.23240.24860.41690.9978
814409845832.895738483.829258835.67240.39680.86910.30740.9966
824829052193.734542264.90972758.82140.35490.77980.41360.9897
834126739124.425634082.153546867.83960.29380.01020.59660.9978
843123828063.945425845.497630884.96710.013700.54590.5459







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.4586-0.1279073969824.040800
740.404-0.14040.134183653110.148178811467.09448877.5823
750.5755-0.11780.128769415218.69575679384.29468699.3899
760.5878-0.15720.1358124636637.996587918697.72019376.4971
770.2826-0.17680.144107848422.430391904642.66219586.6909
780.3425-0.11060.138547406577.161784488298.41219191.7517
790.1707-0.07370.129213062523.921174284616.34198618.8524
800.1183-0.08650.123913214079.763466650799.26968163.9941
810.1447-0.03790.11433009862.981159579584.12647718.7813
820.201-0.07480.110415239142.73355145539.98717426.0043
830.1010.05480.10534590625.059650549638.637109.8269
840.05130.11310.10610074622.821547176720.6466868.5312

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.4586 & -0.1279 & 0 & 73969824.0408 & 0 & 0 \tabularnewline
74 & 0.404 & -0.1404 & 0.1341 & 83653110.1481 & 78811467.0944 & 8877.5823 \tabularnewline
75 & 0.5755 & -0.1178 & 0.1287 & 69415218.695 & 75679384.2946 & 8699.3899 \tabularnewline
76 & 0.5878 & -0.1572 & 0.1358 & 124636637.9965 & 87918697.7201 & 9376.4971 \tabularnewline
77 & 0.2826 & -0.1768 & 0.144 & 107848422.4303 & 91904642.6621 & 9586.6909 \tabularnewline
78 & 0.3425 & -0.1106 & 0.1385 & 47406577.1617 & 84488298.4121 & 9191.7517 \tabularnewline
79 & 0.1707 & -0.0737 & 0.1292 & 13062523.9211 & 74284616.3419 & 8618.8524 \tabularnewline
80 & 0.1183 & -0.0865 & 0.1239 & 13214079.7634 & 66650799.2696 & 8163.9941 \tabularnewline
81 & 0.1447 & -0.0379 & 0.1143 & 3009862.9811 & 59579584.1264 & 7718.7813 \tabularnewline
82 & 0.201 & -0.0748 & 0.1104 & 15239142.733 & 55145539.9871 & 7426.0043 \tabularnewline
83 & 0.101 & 0.0548 & 0.1053 & 4590625.0596 & 50549638.63 & 7109.8269 \tabularnewline
84 & 0.0513 & 0.1131 & 0.106 & 10074622.8215 & 47176720.646 & 6868.5312 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116982&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.4586[/C][C]-0.1279[/C][C]0[/C][C]73969824.0408[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]0.404[/C][C]-0.1404[/C][C]0.1341[/C][C]83653110.1481[/C][C]78811467.0944[/C][C]8877.5823[/C][/ROW]
[ROW][C]75[/C][C]0.5755[/C][C]-0.1178[/C][C]0.1287[/C][C]69415218.695[/C][C]75679384.2946[/C][C]8699.3899[/C][/ROW]
[ROW][C]76[/C][C]0.5878[/C][C]-0.1572[/C][C]0.1358[/C][C]124636637.9965[/C][C]87918697.7201[/C][C]9376.4971[/C][/ROW]
[ROW][C]77[/C][C]0.2826[/C][C]-0.1768[/C][C]0.144[/C][C]107848422.4303[/C][C]91904642.6621[/C][C]9586.6909[/C][/ROW]
[ROW][C]78[/C][C]0.3425[/C][C]-0.1106[/C][C]0.1385[/C][C]47406577.1617[/C][C]84488298.4121[/C][C]9191.7517[/C][/ROW]
[ROW][C]79[/C][C]0.1707[/C][C]-0.0737[/C][C]0.1292[/C][C]13062523.9211[/C][C]74284616.3419[/C][C]8618.8524[/C][/ROW]
[ROW][C]80[/C][C]0.1183[/C][C]-0.0865[/C][C]0.1239[/C][C]13214079.7634[/C][C]66650799.2696[/C][C]8163.9941[/C][/ROW]
[ROW][C]81[/C][C]0.1447[/C][C]-0.0379[/C][C]0.1143[/C][C]3009862.9811[/C][C]59579584.1264[/C][C]7718.7813[/C][/ROW]
[ROW][C]82[/C][C]0.201[/C][C]-0.0748[/C][C]0.1104[/C][C]15239142.733[/C][C]55145539.9871[/C][C]7426.0043[/C][/ROW]
[ROW][C]83[/C][C]0.101[/C][C]0.0548[/C][C]0.1053[/C][C]4590625.0596[/C][C]50549638.63[/C][C]7109.8269[/C][/ROW]
[ROW][C]84[/C][C]0.0513[/C][C]0.1131[/C][C]0.106[/C][C]10074622.8215[/C][C]47176720.646[/C][C]6868.5312[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116982&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116982&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.4586-0.1279073969824.040800
740.404-0.14040.134183653110.148178811467.09448877.5823
750.5755-0.11780.128769415218.69575679384.29468699.3899
760.5878-0.15720.1358124636637.996587918697.72019376.4971
770.2826-0.17680.144107848422.430391904642.66219586.6909
780.3425-0.11060.138547406577.161784488298.41219191.7517
790.1707-0.07370.129213062523.921174284616.34198618.8524
800.1183-0.08650.123913214079.763466650799.26968163.9941
810.1447-0.03790.11433009862.981159579584.12647718.7813
820.201-0.07480.110415239142.73355145539.98717426.0043
830.1010.05480.10534590625.059650549638.637109.8269
840.05130.11310.10610074622.821547176720.6466868.5312



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