Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 20 Dec 2007 08:31:56 -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/20/t1198163637dmc7mim73htzgk3.htm/, Retrieved Mon, 29 Apr 2024 11:04:16 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4737, Retrieved Mon, 29 Apr 2024 11:04:16 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact218
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA forecast to...] [2007-12-20 15:31:56] [7c5f7a910a5108d789a748f71ee8daf4] [Current]
Feedback Forum

Post a new message
Dataseries X:
103,8
100,8
110,6
104,0
112,6
107,3
98,9
109,8
104,9
102,2
123,9
124,9
112,7
121,9
100,6
104,3
120,4
107,5
102,9
125,6
107,5
108,8
128,4
121,1
119,5
128,7
108,7
105,5
119,8
111,3
110,6
120,1
97,5
107,7
127,3
117,2
119,8
116,2
111,0
112,4
130,6
109,1
118,8
123,9
101,6
112,8
128,0
129,6
125,8
119,5
115,7
113,6
129,7
112,0
116,8
127,0
112,1
113,3
120,5
127,7




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=4737&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=4737&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4737&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])
36117.2-------
37119.8-------
38116.2-------
39111-------
40112.4-------
41130.6-------
42109.1-------
43118.8-------
44123.9-------
45101.6-------
46112.8-------
47128-------
48129.6-------
49125.8124.3669110.0703137.18160.41330.21170.75760.2117
50119.5114.516397.357129.42020.25610.06890.41240.0236
51115.7108.640890.3727124.25150.18770.08640.38350.0043
52113.6112.056694.4514127.24890.42110.31920.48230.0118
53129.7131.253116.5836144.44010.40870.99570.53870.597
54112107.441488.9273123.20420.28540.00280.41830.0029
55116.8118.2247101.6931132.71280.42360.80010.4690.0619
56127124.9993109.4953138.78190.3880.87820.56210.2565
57112.1102.366982.7247118.80480.12290.00170.53646e-04
58113.3112.967495.5303128.05170.48280.54490.50870.0153
59120.5127.3729112.1974140.92360.16010.97910.46390.3737
60127.7129.9252115.0939143.22880.37150.91750.51910.5191

\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 & 117.2 & - & - & - & - & - & - & - \tabularnewline
37 & 119.8 & - & - & - & - & - & - & - \tabularnewline
38 & 116.2 & - & - & - & - & - & - & - \tabularnewline
39 & 111 & - & - & - & - & - & - & - \tabularnewline
40 & 112.4 & - & - & - & - & - & - & - \tabularnewline
41 & 130.6 & - & - & - & - & - & - & - \tabularnewline
42 & 109.1 & - & - & - & - & - & - & - \tabularnewline
43 & 118.8 & - & - & - & - & - & - & - \tabularnewline
44 & 123.9 & - & - & - & - & - & - & - \tabularnewline
45 & 101.6 & - & - & - & - & - & - & - \tabularnewline
46 & 112.8 & - & - & - & - & - & - & - \tabularnewline
47 & 128 & - & - & - & - & - & - & - \tabularnewline
48 & 129.6 & - & - & - & - & - & - & - \tabularnewline
49 & 125.8 & 124.3669 & 110.0703 & 137.1816 & 0.4133 & 0.2117 & 0.7576 & 0.2117 \tabularnewline
50 & 119.5 & 114.5163 & 97.357 & 129.4202 & 0.2561 & 0.0689 & 0.4124 & 0.0236 \tabularnewline
51 & 115.7 & 108.6408 & 90.3727 & 124.2515 & 0.1877 & 0.0864 & 0.3835 & 0.0043 \tabularnewline
52 & 113.6 & 112.0566 & 94.4514 & 127.2489 & 0.4211 & 0.3192 & 0.4823 & 0.0118 \tabularnewline
53 & 129.7 & 131.253 & 116.5836 & 144.4401 & 0.4087 & 0.9957 & 0.5387 & 0.597 \tabularnewline
54 & 112 & 107.4414 & 88.9273 & 123.2042 & 0.2854 & 0.0028 & 0.4183 & 0.0029 \tabularnewline
55 & 116.8 & 118.2247 & 101.6931 & 132.7128 & 0.4236 & 0.8001 & 0.469 & 0.0619 \tabularnewline
56 & 127 & 124.9993 & 109.4953 & 138.7819 & 0.388 & 0.8782 & 0.5621 & 0.2565 \tabularnewline
57 & 112.1 & 102.3669 & 82.7247 & 118.8048 & 0.1229 & 0.0017 & 0.5364 & 6e-04 \tabularnewline
58 & 113.3 & 112.9674 & 95.5303 & 128.0517 & 0.4828 & 0.5449 & 0.5087 & 0.0153 \tabularnewline
59 & 120.5 & 127.3729 & 112.1974 & 140.9236 & 0.1601 & 0.9791 & 0.4639 & 0.3737 \tabularnewline
60 & 127.7 & 129.9252 & 115.0939 & 143.2288 & 0.3715 & 0.9175 & 0.5191 & 0.5191 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4737&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]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]119.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]116.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]111[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]112.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]130.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]109.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]118.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]123.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]101.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]112.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]128[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]129.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]125.8[/C][C]124.3669[/C][C]110.0703[/C][C]137.1816[/C][C]0.4133[/C][C]0.2117[/C][C]0.7576[/C][C]0.2117[/C][/ROW]
[ROW][C]50[/C][C]119.5[/C][C]114.5163[/C][C]97.357[/C][C]129.4202[/C][C]0.2561[/C][C]0.0689[/C][C]0.4124[/C][C]0.0236[/C][/ROW]
[ROW][C]51[/C][C]115.7[/C][C]108.6408[/C][C]90.3727[/C][C]124.2515[/C][C]0.1877[/C][C]0.0864[/C][C]0.3835[/C][C]0.0043[/C][/ROW]
[ROW][C]52[/C][C]113.6[/C][C]112.0566[/C][C]94.4514[/C][C]127.2489[/C][C]0.4211[/C][C]0.3192[/C][C]0.4823[/C][C]0.0118[/C][/ROW]
[ROW][C]53[/C][C]129.7[/C][C]131.253[/C][C]116.5836[/C][C]144.4401[/C][C]0.4087[/C][C]0.9957[/C][C]0.5387[/C][C]0.597[/C][/ROW]
[ROW][C]54[/C][C]112[/C][C]107.4414[/C][C]88.9273[/C][C]123.2042[/C][C]0.2854[/C][C]0.0028[/C][C]0.4183[/C][C]0.0029[/C][/ROW]
[ROW][C]55[/C][C]116.8[/C][C]118.2247[/C][C]101.6931[/C][C]132.7128[/C][C]0.4236[/C][C]0.8001[/C][C]0.469[/C][C]0.0619[/C][/ROW]
[ROW][C]56[/C][C]127[/C][C]124.9993[/C][C]109.4953[/C][C]138.7819[/C][C]0.388[/C][C]0.8782[/C][C]0.5621[/C][C]0.2565[/C][/ROW]
[ROW][C]57[/C][C]112.1[/C][C]102.3669[/C][C]82.7247[/C][C]118.8048[/C][C]0.1229[/C][C]0.0017[/C][C]0.5364[/C][C]6e-04[/C][/ROW]
[ROW][C]58[/C][C]113.3[/C][C]112.9674[/C][C]95.5303[/C][C]128.0517[/C][C]0.4828[/C][C]0.5449[/C][C]0.5087[/C][C]0.0153[/C][/ROW]
[ROW][C]59[/C][C]120.5[/C][C]127.3729[/C][C]112.1974[/C][C]140.9236[/C][C]0.1601[/C][C]0.9791[/C][C]0.4639[/C][C]0.3737[/C][/ROW]
[ROW][C]60[/C][C]127.7[/C][C]129.9252[/C][C]115.0939[/C][C]143.2288[/C][C]0.3715[/C][C]0.9175[/C][C]0.5191[/C][C]0.5191[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4737&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4737&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])
36117.2-------
37119.8-------
38116.2-------
39111-------
40112.4-------
41130.6-------
42109.1-------
43118.8-------
44123.9-------
45101.6-------
46112.8-------
47128-------
48129.6-------
49125.8124.3669110.0703137.18160.41330.21170.75760.2117
50119.5114.516397.357129.42020.25610.06890.41240.0236
51115.7108.640890.3727124.25150.18770.08640.38350.0043
52113.6112.056694.4514127.24890.42110.31920.48230.0118
53129.7131.253116.5836144.44010.40870.99570.53870.597
54112107.441488.9273123.20420.28540.00280.41830.0029
55116.8118.2247101.6931132.71280.42360.80010.4690.0619
56127124.9993109.4953138.78190.3880.87820.56210.2565
57112.1102.366982.7247118.80480.12290.00170.53646e-04
58113.3112.967495.5303128.05170.48280.54490.50870.0153
59120.5127.3729112.1974140.92360.16010.97910.46390.3737
60127.7129.9252115.0939143.22880.37150.91750.51910.5191







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.05260.01150.0012.05370.17110.4137
500.06640.04350.003624.83712.06981.4387
510.07330.0650.005449.83224.15272.0378
520.06920.01380.00112.38220.19850.4456
530.0513-0.01180.0012.41180.2010.4483
540.07490.04240.003520.78061.73171.3159
550.0625-0.01210.0012.02990.16920.4113
560.05630.0160.00134.00280.33360.5776
570.08190.09510.007994.7347.89452.8097
580.06810.00292e-040.11060.00920.096
590.0543-0.0540.004547.23693.93641.984
600.0522-0.01710.00144.95130.41260.6423

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0526 & 0.0115 & 0.001 & 2.0537 & 0.1711 & 0.4137 \tabularnewline
50 & 0.0664 & 0.0435 & 0.0036 & 24.8371 & 2.0698 & 1.4387 \tabularnewline
51 & 0.0733 & 0.065 & 0.0054 & 49.8322 & 4.1527 & 2.0378 \tabularnewline
52 & 0.0692 & 0.0138 & 0.0011 & 2.3822 & 0.1985 & 0.4456 \tabularnewline
53 & 0.0513 & -0.0118 & 0.001 & 2.4118 & 0.201 & 0.4483 \tabularnewline
54 & 0.0749 & 0.0424 & 0.0035 & 20.7806 & 1.7317 & 1.3159 \tabularnewline
55 & 0.0625 & -0.0121 & 0.001 & 2.0299 & 0.1692 & 0.4113 \tabularnewline
56 & 0.0563 & 0.016 & 0.0013 & 4.0028 & 0.3336 & 0.5776 \tabularnewline
57 & 0.0819 & 0.0951 & 0.0079 & 94.734 & 7.8945 & 2.8097 \tabularnewline
58 & 0.0681 & 0.0029 & 2e-04 & 0.1106 & 0.0092 & 0.096 \tabularnewline
59 & 0.0543 & -0.054 & 0.0045 & 47.2369 & 3.9364 & 1.984 \tabularnewline
60 & 0.0522 & -0.0171 & 0.0014 & 4.9513 & 0.4126 & 0.6423 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4737&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.0526[/C][C]0.0115[/C][C]0.001[/C][C]2.0537[/C][C]0.1711[/C][C]0.4137[/C][/ROW]
[ROW][C]50[/C][C]0.0664[/C][C]0.0435[/C][C]0.0036[/C][C]24.8371[/C][C]2.0698[/C][C]1.4387[/C][/ROW]
[ROW][C]51[/C][C]0.0733[/C][C]0.065[/C][C]0.0054[/C][C]49.8322[/C][C]4.1527[/C][C]2.0378[/C][/ROW]
[ROW][C]52[/C][C]0.0692[/C][C]0.0138[/C][C]0.0011[/C][C]2.3822[/C][C]0.1985[/C][C]0.4456[/C][/ROW]
[ROW][C]53[/C][C]0.0513[/C][C]-0.0118[/C][C]0.001[/C][C]2.4118[/C][C]0.201[/C][C]0.4483[/C][/ROW]
[ROW][C]54[/C][C]0.0749[/C][C]0.0424[/C][C]0.0035[/C][C]20.7806[/C][C]1.7317[/C][C]1.3159[/C][/ROW]
[ROW][C]55[/C][C]0.0625[/C][C]-0.0121[/C][C]0.001[/C][C]2.0299[/C][C]0.1692[/C][C]0.4113[/C][/ROW]
[ROW][C]56[/C][C]0.0563[/C][C]0.016[/C][C]0.0013[/C][C]4.0028[/C][C]0.3336[/C][C]0.5776[/C][/ROW]
[ROW][C]57[/C][C]0.0819[/C][C]0.0951[/C][C]0.0079[/C][C]94.734[/C][C]7.8945[/C][C]2.8097[/C][/ROW]
[ROW][C]58[/C][C]0.0681[/C][C]0.0029[/C][C]2e-04[/C][C]0.1106[/C][C]0.0092[/C][C]0.096[/C][/ROW]
[ROW][C]59[/C][C]0.0543[/C][C]-0.054[/C][C]0.0045[/C][C]47.2369[/C][C]3.9364[/C][C]1.984[/C][/ROW]
[ROW][C]60[/C][C]0.0522[/C][C]-0.0171[/C][C]0.0014[/C][C]4.9513[/C][C]0.4126[/C][C]0.6423[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4737&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4737&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.05260.01150.0012.05370.17110.4137
500.06640.04350.003624.83712.06981.4387
510.07330.0650.005449.83224.15272.0378
520.06920.01380.00112.38220.19850.4456
530.0513-0.01180.0012.41180.2010.4483
540.07490.04240.003520.78061.73171.3159
550.0625-0.01210.0012.02990.16920.4113
560.05630.0160.00134.00280.33360.5776
570.08190.09510.007994.7347.89452.8097
580.06810.00292e-040.11060.00920.096
590.0543-0.0540.004547.23693.93641.984
600.0522-0.01710.00144.95130.41260.6423



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