Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 07 Dec 2007 02:08:35 -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/07/t1197017792bdo4ym96erpvg0z.htm/, Retrieved Mon, 29 Apr 2024 01:18:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2721, Retrieved Mon, 29 Apr 2024 01:18:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact240
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [G6 WS 9 Q1] [2007-12-07 09:08:35] [be05d2a6ec818ae782d70be836232bb4] [Current]
Feedback Forum

Post a new message
Dataseries X:
112,6
113,8
107,8
103,2
103,3
101,2
107,7
110,4
101,9
115,9
89,9
88,6
117,2
123,9
100
103,6
94,1
98,7
119,5
112,7
104,4
124,7
89,1
97
121,6
118,8
114
111,5
97,2
102,5
113,4
109,8
104,9
126,1
80
96,8
117,2
112,3
117,3
111,1
102,2
104,3
122,9
107,6
121,3
131,5
89
104,4
128,9
135,9
133,3
121,3
120,5
120,4
137,9
126,1
133,2
146,6
103,4
117,2




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2721&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])
3696.8-------
37117.2-------
38112.3-------
39117.3-------
40111.1-------
41102.2-------
42104.3-------
43122.9-------
44107.6-------
45121.3-------
46131.5-------
4789-------
48104.4-------
49128.9122.6862109.4168137.56490.20650.9920.76510.992
50135.9118.0925105.3007132.43810.00750.06990.78560.9693
51133.3121.399107.7104136.82730.06530.03270.69870.9846
52121.3114.2193100.9385129.24750.17790.00640.65790.8998
53120.5104.649492.4145118.50420.01250.00920.63550.5141
54120.4106.16293.6277120.37430.02480.0240.60130.596
55137.9124.7061109.9154141.4870.06170.69250.58350.9911
56126.1108.865295.921123.55610.01071e-040.5670.7243
57133.2122.419107.8326138.97840.1010.33150.55270.9835
58146.6132.4827116.6798150.42580.06150.46880.54270.9989
59103.489.528178.8411101.66380.012500.5340.0082
60117.2104.893992.3665119.12040.0450.58150.52710.5271

\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 & 96.8 & - & - & - & - & - & - & - \tabularnewline
37 & 117.2 & - & - & - & - & - & - & - \tabularnewline
38 & 112.3 & - & - & - & - & - & - & - \tabularnewline
39 & 117.3 & - & - & - & - & - & - & - \tabularnewline
40 & 111.1 & - & - & - & - & - & - & - \tabularnewline
41 & 102.2 & - & - & - & - & - & - & - \tabularnewline
42 & 104.3 & - & - & - & - & - & - & - \tabularnewline
43 & 122.9 & - & - & - & - & - & - & - \tabularnewline
44 & 107.6 & - & - & - & - & - & - & - \tabularnewline
45 & 121.3 & - & - & - & - & - & - & - \tabularnewline
46 & 131.5 & - & - & - & - & - & - & - \tabularnewline
47 & 89 & - & - & - & - & - & - & - \tabularnewline
48 & 104.4 & - & - & - & - & - & - & - \tabularnewline
49 & 128.9 & 122.6862 & 109.4168 & 137.5649 & 0.2065 & 0.992 & 0.7651 & 0.992 \tabularnewline
50 & 135.9 & 118.0925 & 105.3007 & 132.4381 & 0.0075 & 0.0699 & 0.7856 & 0.9693 \tabularnewline
51 & 133.3 & 121.399 & 107.7104 & 136.8273 & 0.0653 & 0.0327 & 0.6987 & 0.9846 \tabularnewline
52 & 121.3 & 114.2193 & 100.9385 & 129.2475 & 0.1779 & 0.0064 & 0.6579 & 0.8998 \tabularnewline
53 & 120.5 & 104.6494 & 92.4145 & 118.5042 & 0.0125 & 0.0092 & 0.6355 & 0.5141 \tabularnewline
54 & 120.4 & 106.162 & 93.6277 & 120.3743 & 0.0248 & 0.024 & 0.6013 & 0.596 \tabularnewline
55 & 137.9 & 124.7061 & 109.9154 & 141.487 & 0.0617 & 0.6925 & 0.5835 & 0.9911 \tabularnewline
56 & 126.1 & 108.8652 & 95.921 & 123.5561 & 0.0107 & 1e-04 & 0.567 & 0.7243 \tabularnewline
57 & 133.2 & 122.419 & 107.8326 & 138.9784 & 0.101 & 0.3315 & 0.5527 & 0.9835 \tabularnewline
58 & 146.6 & 132.4827 & 116.6798 & 150.4258 & 0.0615 & 0.4688 & 0.5427 & 0.9989 \tabularnewline
59 & 103.4 & 89.5281 & 78.8411 & 101.6638 & 0.0125 & 0 & 0.534 & 0.0082 \tabularnewline
60 & 117.2 & 104.8939 & 92.3665 & 119.1204 & 0.045 & 0.5815 & 0.5271 & 0.5271 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2721&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]96.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]112.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]117.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]111.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]102.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]104.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]122.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]107.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]121.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]131.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]104.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]128.9[/C][C]122.6862[/C][C]109.4168[/C][C]137.5649[/C][C]0.2065[/C][C]0.992[/C][C]0.7651[/C][C]0.992[/C][/ROW]
[ROW][C]50[/C][C]135.9[/C][C]118.0925[/C][C]105.3007[/C][C]132.4381[/C][C]0.0075[/C][C]0.0699[/C][C]0.7856[/C][C]0.9693[/C][/ROW]
[ROW][C]51[/C][C]133.3[/C][C]121.399[/C][C]107.7104[/C][C]136.8273[/C][C]0.0653[/C][C]0.0327[/C][C]0.6987[/C][C]0.9846[/C][/ROW]
[ROW][C]52[/C][C]121.3[/C][C]114.2193[/C][C]100.9385[/C][C]129.2475[/C][C]0.1779[/C][C]0.0064[/C][C]0.6579[/C][C]0.8998[/C][/ROW]
[ROW][C]53[/C][C]120.5[/C][C]104.6494[/C][C]92.4145[/C][C]118.5042[/C][C]0.0125[/C][C]0.0092[/C][C]0.6355[/C][C]0.5141[/C][/ROW]
[ROW][C]54[/C][C]120.4[/C][C]106.162[/C][C]93.6277[/C][C]120.3743[/C][C]0.0248[/C][C]0.024[/C][C]0.6013[/C][C]0.596[/C][/ROW]
[ROW][C]55[/C][C]137.9[/C][C]124.7061[/C][C]109.9154[/C][C]141.487[/C][C]0.0617[/C][C]0.6925[/C][C]0.5835[/C][C]0.9911[/C][/ROW]
[ROW][C]56[/C][C]126.1[/C][C]108.8652[/C][C]95.921[/C][C]123.5561[/C][C]0.0107[/C][C]1e-04[/C][C]0.567[/C][C]0.7243[/C][/ROW]
[ROW][C]57[/C][C]133.2[/C][C]122.419[/C][C]107.8326[/C][C]138.9784[/C][C]0.101[/C][C]0.3315[/C][C]0.5527[/C][C]0.9835[/C][/ROW]
[ROW][C]58[/C][C]146.6[/C][C]132.4827[/C][C]116.6798[/C][C]150.4258[/C][C]0.0615[/C][C]0.4688[/C][C]0.5427[/C][C]0.9989[/C][/ROW]
[ROW][C]59[/C][C]103.4[/C][C]89.5281[/C][C]78.8411[/C][C]101.6638[/C][C]0.0125[/C][C]0[/C][C]0.534[/C][C]0.0082[/C][/ROW]
[ROW][C]60[/C][C]117.2[/C][C]104.8939[/C][C]92.3665[/C][C]119.1204[/C][C]0.045[/C][C]0.5815[/C][C]0.5271[/C][C]0.5271[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2721&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2721&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])
3696.8-------
37117.2-------
38112.3-------
39117.3-------
40111.1-------
41102.2-------
42104.3-------
43122.9-------
44107.6-------
45121.3-------
46131.5-------
4789-------
48104.4-------
49128.9122.6862109.4168137.56490.20650.9920.76510.992
50135.9118.0925105.3007132.43810.00750.06990.78560.9693
51133.3121.399107.7104136.82730.06530.03270.69870.9846
52121.3114.2193100.9385129.24750.17790.00640.65790.8998
53120.5104.649492.4145118.50420.01250.00920.63550.5141
54120.4106.16293.6277120.37430.02480.0240.60130.596
55137.9124.7061109.9154141.4870.06170.69250.58350.9911
56126.1108.865295.921123.55610.01071e-040.5670.7243
57133.2122.419107.8326138.97840.1010.33150.55270.9835
58146.6132.4827116.6798150.42580.06150.46880.54270.9989
59103.489.528178.8411101.66380.012500.5340.0082
60117.2104.893992.3665119.12040.0450.58150.52710.5271







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.06190.05060.004238.61083.21761.7938
500.0620.15080.0126317.108726.42575.1406
510.06480.0980.0082141.633911.80283.4355
520.06710.0620.005250.1364.1782.044
530.06750.15150.0126251.24120.93684.5757
540.06830.13410.0112202.720916.89344.1102
550.06870.10580.0088174.080314.50673.8088
560.06890.15830.0132297.038524.75324.9753
570.0690.08810.0073116.23079.68593.1122
580.06910.10660.0089199.298916.60824.0753
590.06920.15490.0129192.429816.03584.0045
600.06920.11730.0098151.440312.623.5525

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0619 & 0.0506 & 0.0042 & 38.6108 & 3.2176 & 1.7938 \tabularnewline
50 & 0.062 & 0.1508 & 0.0126 & 317.1087 & 26.4257 & 5.1406 \tabularnewline
51 & 0.0648 & 0.098 & 0.0082 & 141.6339 & 11.8028 & 3.4355 \tabularnewline
52 & 0.0671 & 0.062 & 0.0052 & 50.136 & 4.178 & 2.044 \tabularnewline
53 & 0.0675 & 0.1515 & 0.0126 & 251.241 & 20.9368 & 4.5757 \tabularnewline
54 & 0.0683 & 0.1341 & 0.0112 & 202.7209 & 16.8934 & 4.1102 \tabularnewline
55 & 0.0687 & 0.1058 & 0.0088 & 174.0803 & 14.5067 & 3.8088 \tabularnewline
56 & 0.0689 & 0.1583 & 0.0132 & 297.0385 & 24.7532 & 4.9753 \tabularnewline
57 & 0.069 & 0.0881 & 0.0073 & 116.2307 & 9.6859 & 3.1122 \tabularnewline
58 & 0.0691 & 0.1066 & 0.0089 & 199.2989 & 16.6082 & 4.0753 \tabularnewline
59 & 0.0692 & 0.1549 & 0.0129 & 192.4298 & 16.0358 & 4.0045 \tabularnewline
60 & 0.0692 & 0.1173 & 0.0098 & 151.4403 & 12.62 & 3.5525 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2721&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.0619[/C][C]0.0506[/C][C]0.0042[/C][C]38.6108[/C][C]3.2176[/C][C]1.7938[/C][/ROW]
[ROW][C]50[/C][C]0.062[/C][C]0.1508[/C][C]0.0126[/C][C]317.1087[/C][C]26.4257[/C][C]5.1406[/C][/ROW]
[ROW][C]51[/C][C]0.0648[/C][C]0.098[/C][C]0.0082[/C][C]141.6339[/C][C]11.8028[/C][C]3.4355[/C][/ROW]
[ROW][C]52[/C][C]0.0671[/C][C]0.062[/C][C]0.0052[/C][C]50.136[/C][C]4.178[/C][C]2.044[/C][/ROW]
[ROW][C]53[/C][C]0.0675[/C][C]0.1515[/C][C]0.0126[/C][C]251.241[/C][C]20.9368[/C][C]4.5757[/C][/ROW]
[ROW][C]54[/C][C]0.0683[/C][C]0.1341[/C][C]0.0112[/C][C]202.7209[/C][C]16.8934[/C][C]4.1102[/C][/ROW]
[ROW][C]55[/C][C]0.0687[/C][C]0.1058[/C][C]0.0088[/C][C]174.0803[/C][C]14.5067[/C][C]3.8088[/C][/ROW]
[ROW][C]56[/C][C]0.0689[/C][C]0.1583[/C][C]0.0132[/C][C]297.0385[/C][C]24.7532[/C][C]4.9753[/C][/ROW]
[ROW][C]57[/C][C]0.069[/C][C]0.0881[/C][C]0.0073[/C][C]116.2307[/C][C]9.6859[/C][C]3.1122[/C][/ROW]
[ROW][C]58[/C][C]0.0691[/C][C]0.1066[/C][C]0.0089[/C][C]199.2989[/C][C]16.6082[/C][C]4.0753[/C][/ROW]
[ROW][C]59[/C][C]0.0692[/C][C]0.1549[/C][C]0.0129[/C][C]192.4298[/C][C]16.0358[/C][C]4.0045[/C][/ROW]
[ROW][C]60[/C][C]0.0692[/C][C]0.1173[/C][C]0.0098[/C][C]151.4403[/C][C]12.62[/C][C]3.5525[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2721&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2721&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.06190.05060.004238.61083.21761.7938
500.0620.15080.0126317.108726.42575.1406
510.06480.0980.0082141.633911.80283.4355
520.06710.0620.005250.1364.1782.044
530.06750.15150.0126251.24120.93684.5757
540.06830.13410.0112202.720916.89344.1102
550.06870.10580.0088174.080314.50673.8088
560.06890.15830.0132297.038524.75324.9753
570.0690.08810.0073116.23079.68593.1122
580.06910.10660.0089199.298916.60824.0753
590.06920.15490.0129192.429816.03584.0045
600.06920.11730.0098151.440312.623.5525



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