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 computationMon, 15 Dec 2008 11:49: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/15/t12293670759x2dxt4b7lp7l03.htm/, Retrieved Wed, 15 May 2024 12:31:30 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33782, Retrieved Wed, 15 May 2024 12:31:30 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact196
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [Airline data] [2007-10-18 09:58:47] [42daae401fd3def69a25014f2252b4c2]
F RMPD  [Variance Reduction Matrix] [] [2008-12-01 21:17:37] [cb714085b233acee8e8acd879ea442b6]
- RMPD      [ARIMA Forecasting] [] [2008-12-15 18:49:55] [787873b6436f665b5b192a0bdb2e43c9] [Current]
Feedback Forum

Post a new message
Dataseries X:
13.92
13.22
13.31
12.91
13.19
12.92
13.43
13.72
13.97
14.91
14.46
14.12
14.23
15.04
14.80
14.49
15.14
14.34
15.12
15.14
14.34
14.36
14.91
15.56
16.50
15.57
15.14
15.19
15.07
14.48
14.27
14.72
14.65
14.38
13.95
14.85
14.87
14.83
15.03
15.47
16.21
16.55
17.04
17.22
17.47
17.75
17.84
18.47
18.38
18.55
18.39
18.88
20.21
19.67
20.09
18.78
19.74
20.64
20.34
21.75
22.10
22.81
22.91
22.46
21.78
25.05
23.70
23.02
24.34
24.15
25.85
26.42
26.54
26.36
26.99
27.52
26.63
26.26
24.86
26.84
26.57
24.67
27.24
27.77
27.61
27.27
28.46
26.97
29.95
29.88
29.67
31.19
30.24
30.03
31.02
30.45
31.70
32.10
32.32
32.18
33.43
33.07
35.32
35.17
35.29
37.89
38.32
37.07
39.77
39.20
40.46
44.95
41.69
41.88
45.86




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33782&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33782&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33782&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[103])
9129.67-------
9231.19-------
9330.24-------
9430.03-------
9531.02-------
9630.45-------
9731.7-------
9832.1-------
9932.32-------
10032.18-------
10133.43-------
10233.07-------
10335.32-------
10435.1737.7533.704442.45040.1410.84450.99690.8445
10535.2936.870831.478643.52810.32080.69170.97450.676
10637.8935.448529.301543.38280.27320.51560.90960.5127
10738.3237.888530.308348.12980.46710.49990.90570.6885
10837.0737.802729.486449.44470.45090.46530.89210.662
10939.7738.636729.40852.01310.43410.59080.84530.6865
11039.238.704528.845153.43340.47370.44360.81030.6738
11140.4639.658428.925456.19990.46220.52170.80770.6964
11244.9538.559927.690455.69570.23240.4140.76720.6445
11341.6941.469329.064961.73460.49150.36820.78160.724
11441.8841.150228.394862.47590.47330.48020.77110.704
11545.8642.691728.886166.4590.39690.52670.72840.7284

\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[103]) \tabularnewline
91 & 29.67 & - & - & - & - & - & - & - \tabularnewline
92 & 31.19 & - & - & - & - & - & - & - \tabularnewline
93 & 30.24 & - & - & - & - & - & - & - \tabularnewline
94 & 30.03 & - & - & - & - & - & - & - \tabularnewline
95 & 31.02 & - & - & - & - & - & - & - \tabularnewline
96 & 30.45 & - & - & - & - & - & - & - \tabularnewline
97 & 31.7 & - & - & - & - & - & - & - \tabularnewline
98 & 32.1 & - & - & - & - & - & - & - \tabularnewline
99 & 32.32 & - & - & - & - & - & - & - \tabularnewline
100 & 32.18 & - & - & - & - & - & - & - \tabularnewline
101 & 33.43 & - & - & - & - & - & - & - \tabularnewline
102 & 33.07 & - & - & - & - & - & - & - \tabularnewline
103 & 35.32 & - & - & - & - & - & - & - \tabularnewline
104 & 35.17 & 37.75 & 33.7044 & 42.4504 & 0.141 & 0.8445 & 0.9969 & 0.8445 \tabularnewline
105 & 35.29 & 36.8708 & 31.4786 & 43.5281 & 0.3208 & 0.6917 & 0.9745 & 0.676 \tabularnewline
106 & 37.89 & 35.4485 & 29.3015 & 43.3828 & 0.2732 & 0.5156 & 0.9096 & 0.5127 \tabularnewline
107 & 38.32 & 37.8885 & 30.3083 & 48.1298 & 0.4671 & 0.4999 & 0.9057 & 0.6885 \tabularnewline
108 & 37.07 & 37.8027 & 29.4864 & 49.4447 & 0.4509 & 0.4653 & 0.8921 & 0.662 \tabularnewline
109 & 39.77 & 38.6367 & 29.408 & 52.0131 & 0.4341 & 0.5908 & 0.8453 & 0.6865 \tabularnewline
110 & 39.2 & 38.7045 & 28.8451 & 53.4334 & 0.4737 & 0.4436 & 0.8103 & 0.6738 \tabularnewline
111 & 40.46 & 39.6584 & 28.9254 & 56.1999 & 0.4622 & 0.5217 & 0.8077 & 0.6964 \tabularnewline
112 & 44.95 & 38.5599 & 27.6904 & 55.6957 & 0.2324 & 0.414 & 0.7672 & 0.6445 \tabularnewline
113 & 41.69 & 41.4693 & 29.0649 & 61.7346 & 0.4915 & 0.3682 & 0.7816 & 0.724 \tabularnewline
114 & 41.88 & 41.1502 & 28.3948 & 62.4759 & 0.4733 & 0.4802 & 0.7711 & 0.704 \tabularnewline
115 & 45.86 & 42.6917 & 28.8861 & 66.459 & 0.3969 & 0.5267 & 0.7284 & 0.7284 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33782&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[103])[/C][/ROW]
[ROW][C]91[/C][C]29.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]31.19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]30.24[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]30.03[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]31.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]30.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]31.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]32.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]32.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]32.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]33.43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]33.07[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]35.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]35.17[/C][C]37.75[/C][C]33.7044[/C][C]42.4504[/C][C]0.141[/C][C]0.8445[/C][C]0.9969[/C][C]0.8445[/C][/ROW]
[ROW][C]105[/C][C]35.29[/C][C]36.8708[/C][C]31.4786[/C][C]43.5281[/C][C]0.3208[/C][C]0.6917[/C][C]0.9745[/C][C]0.676[/C][/ROW]
[ROW][C]106[/C][C]37.89[/C][C]35.4485[/C][C]29.3015[/C][C]43.3828[/C][C]0.2732[/C][C]0.5156[/C][C]0.9096[/C][C]0.5127[/C][/ROW]
[ROW][C]107[/C][C]38.32[/C][C]37.8885[/C][C]30.3083[/C][C]48.1298[/C][C]0.4671[/C][C]0.4999[/C][C]0.9057[/C][C]0.6885[/C][/ROW]
[ROW][C]108[/C][C]37.07[/C][C]37.8027[/C][C]29.4864[/C][C]49.4447[/C][C]0.4509[/C][C]0.4653[/C][C]0.8921[/C][C]0.662[/C][/ROW]
[ROW][C]109[/C][C]39.77[/C][C]38.6367[/C][C]29.408[/C][C]52.0131[/C][C]0.4341[/C][C]0.5908[/C][C]0.8453[/C][C]0.6865[/C][/ROW]
[ROW][C]110[/C][C]39.2[/C][C]38.7045[/C][C]28.8451[/C][C]53.4334[/C][C]0.4737[/C][C]0.4436[/C][C]0.8103[/C][C]0.6738[/C][/ROW]
[ROW][C]111[/C][C]40.46[/C][C]39.6584[/C][C]28.9254[/C][C]56.1999[/C][C]0.4622[/C][C]0.5217[/C][C]0.8077[/C][C]0.6964[/C][/ROW]
[ROW][C]112[/C][C]44.95[/C][C]38.5599[/C][C]27.6904[/C][C]55.6957[/C][C]0.2324[/C][C]0.414[/C][C]0.7672[/C][C]0.6445[/C][/ROW]
[ROW][C]113[/C][C]41.69[/C][C]41.4693[/C][C]29.0649[/C][C]61.7346[/C][C]0.4915[/C][C]0.3682[/C][C]0.7816[/C][C]0.724[/C][/ROW]
[ROW][C]114[/C][C]41.88[/C][C]41.1502[/C][C]28.3948[/C][C]62.4759[/C][C]0.4733[/C][C]0.4802[/C][C]0.7711[/C][C]0.704[/C][/ROW]
[ROW][C]115[/C][C]45.86[/C][C]42.6917[/C][C]28.8861[/C][C]66.459[/C][C]0.3969[/C][C]0.5267[/C][C]0.7284[/C][C]0.7284[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33782&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33782&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[103])
9129.67-------
9231.19-------
9330.24-------
9430.03-------
9531.02-------
9630.45-------
9731.7-------
9832.1-------
9932.32-------
10032.18-------
10133.43-------
10233.07-------
10335.32-------
10435.1737.7533.704442.45040.1410.84450.99690.8445
10535.2936.870831.478643.52810.32080.69170.97450.676
10637.8935.448529.301543.38280.27320.51560.90960.5127
10738.3237.888530.308348.12980.46710.49990.90570.6885
10837.0737.802729.486449.44470.45090.46530.89210.662
10939.7738.636729.40852.01310.43410.59080.84530.6865
11039.238.704528.845153.43340.47370.44360.81030.6738
11140.4639.658428.925456.19990.46220.52170.80770.6964
11244.9538.559927.690455.69570.23240.4140.76720.6445
11341.6941.469329.064961.73460.49150.36820.78160.724
11441.8841.150228.394862.47590.47330.48020.77110.704
11545.8642.691728.886166.4590.39690.52670.72840.7284







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1040.0635-0.06830.00576.65650.55470.7448
1050.0921-0.04290.00362.49890.20820.4563
1060.11420.06890.00575.96110.49680.7048
1070.13790.01149e-040.18620.01550.1246
1080.1571-0.01940.00160.53690.04470.2115
1090.17660.02930.00241.28430.1070.3271
1100.19420.01280.00110.24550.02050.143
1110.21280.02020.00170.64260.05360.2314
1120.22670.16570.013840.83283.40271.8446
1130.24930.00534e-040.04870.00410.0637
1140.26440.01770.00150.53260.04440.2107
1150.2840.07420.006210.0380.83650.9146

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
104 & 0.0635 & -0.0683 & 0.0057 & 6.6565 & 0.5547 & 0.7448 \tabularnewline
105 & 0.0921 & -0.0429 & 0.0036 & 2.4989 & 0.2082 & 0.4563 \tabularnewline
106 & 0.1142 & 0.0689 & 0.0057 & 5.9611 & 0.4968 & 0.7048 \tabularnewline
107 & 0.1379 & 0.0114 & 9e-04 & 0.1862 & 0.0155 & 0.1246 \tabularnewline
108 & 0.1571 & -0.0194 & 0.0016 & 0.5369 & 0.0447 & 0.2115 \tabularnewline
109 & 0.1766 & 0.0293 & 0.0024 & 1.2843 & 0.107 & 0.3271 \tabularnewline
110 & 0.1942 & 0.0128 & 0.0011 & 0.2455 & 0.0205 & 0.143 \tabularnewline
111 & 0.2128 & 0.0202 & 0.0017 & 0.6426 & 0.0536 & 0.2314 \tabularnewline
112 & 0.2267 & 0.1657 & 0.0138 & 40.8328 & 3.4027 & 1.8446 \tabularnewline
113 & 0.2493 & 0.0053 & 4e-04 & 0.0487 & 0.0041 & 0.0637 \tabularnewline
114 & 0.2644 & 0.0177 & 0.0015 & 0.5326 & 0.0444 & 0.2107 \tabularnewline
115 & 0.284 & 0.0742 & 0.0062 & 10.038 & 0.8365 & 0.9146 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33782&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]104[/C][C]0.0635[/C][C]-0.0683[/C][C]0.0057[/C][C]6.6565[/C][C]0.5547[/C][C]0.7448[/C][/ROW]
[ROW][C]105[/C][C]0.0921[/C][C]-0.0429[/C][C]0.0036[/C][C]2.4989[/C][C]0.2082[/C][C]0.4563[/C][/ROW]
[ROW][C]106[/C][C]0.1142[/C][C]0.0689[/C][C]0.0057[/C][C]5.9611[/C][C]0.4968[/C][C]0.7048[/C][/ROW]
[ROW][C]107[/C][C]0.1379[/C][C]0.0114[/C][C]9e-04[/C][C]0.1862[/C][C]0.0155[/C][C]0.1246[/C][/ROW]
[ROW][C]108[/C][C]0.1571[/C][C]-0.0194[/C][C]0.0016[/C][C]0.5369[/C][C]0.0447[/C][C]0.2115[/C][/ROW]
[ROW][C]109[/C][C]0.1766[/C][C]0.0293[/C][C]0.0024[/C][C]1.2843[/C][C]0.107[/C][C]0.3271[/C][/ROW]
[ROW][C]110[/C][C]0.1942[/C][C]0.0128[/C][C]0.0011[/C][C]0.2455[/C][C]0.0205[/C][C]0.143[/C][/ROW]
[ROW][C]111[/C][C]0.2128[/C][C]0.0202[/C][C]0.0017[/C][C]0.6426[/C][C]0.0536[/C][C]0.2314[/C][/ROW]
[ROW][C]112[/C][C]0.2267[/C][C]0.1657[/C][C]0.0138[/C][C]40.8328[/C][C]3.4027[/C][C]1.8446[/C][/ROW]
[ROW][C]113[/C][C]0.2493[/C][C]0.0053[/C][C]4e-04[/C][C]0.0487[/C][C]0.0041[/C][C]0.0637[/C][/ROW]
[ROW][C]114[/C][C]0.2644[/C][C]0.0177[/C][C]0.0015[/C][C]0.5326[/C][C]0.0444[/C][C]0.2107[/C][/ROW]
[ROW][C]115[/C][C]0.284[/C][C]0.0742[/C][C]0.0062[/C][C]10.038[/C][C]0.8365[/C][C]0.9146[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33782&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33782&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
1040.0635-0.06830.00576.65650.55470.7448
1050.0921-0.04290.00362.49890.20820.4563
1060.11420.06890.00575.96110.49680.7048
1070.13790.01149e-040.18620.01550.1246
1080.1571-0.01940.00160.53690.04470.2115
1090.17660.02930.00241.28430.1070.3271
1100.19420.01280.00110.24550.02050.143
1110.21280.02020.00170.64260.05360.2314
1120.22670.16570.013840.83283.40271.8446
1130.24930.00534e-040.04870.00410.0637
1140.26440.01770.00150.53260.04440.2107
1150.2840.07420.006210.0380.83650.9146



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