Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSun, 09 Dec 2007 08:40:58 -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/09/t1197214010y87zdebp7i4acyz.htm/, Retrieved Wed, 08 May 2024 14:00:01 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2965, Retrieved Wed, 08 May 2024 14:00:01 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact203
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [pap 1] [2007-12-09 15:40:58] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
106,7
110,2
125,9
100,1
106,4
114,8
81,3
87
104,2
108
105
94,5
92
95,9
108,8
103,4
102,1
110,1
83,2
82,7
106,8
113,7
102,5
96,6
92,1
95,6
102,3
98,6
98,2
104,5
84
73,8
103,9
106
97,2
102,6
89
93,8
116,7
106,8
98,5
118,7
90
91,9
113,3
113,1
104,1
108,7
96,7
101
116,9
105,8
99
129,4
83
88,9
115,9
104,2
113,4
112,2
100,8
107,3
126,6
102,9
117,9
128,8
87,5
93,8
122,7
126,2
124,6
116,7
115,2
111,1
129,9
113,3
118,5
133,5
102,1
102,4




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2965&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2965&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2965&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 time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[68])
5688.9-------
57115.9-------
58104.2-------
59113.4-------
60112.2-------
61100.8-------
62107.3-------
63126.6-------
64102.9-------
65117.9-------
66128.8-------
6787.5-------
6893.8-------
69122.7118.1292138.9684104.02280.73734e-040.37844e-04
70126.2120.2821142.8941105.29470.78050.62410.01773e-04
71124.6116.648138.7711102.02850.85680.89980.33160.0011
72116.7110.2037131.752796.11240.81690.97740.60940.0113
73115.2101.7673118.717490.08190.98790.99390.43560.0907
74111.1106.6783127.482793.06130.73780.890.53570.0319
75129.9123.3379158.3494103.55480.74220.11270.62670.0017
76113.3109.373133.388194.31240.69530.99620.19980.0213
77118.5109.0729133.686593.79580.88680.70620.87130.025
78133.5124.7814164.2488103.54340.78950.28110.64460.0021
79102.188.0664101.078778.7690.998510.45250.8866
80102.488.8367102.412679.23060.99720.99660.84440.8444

\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[68]) \tabularnewline
56 & 88.9 & - & - & - & - & - & - & - \tabularnewline
57 & 115.9 & - & - & - & - & - & - & - \tabularnewline
58 & 104.2 & - & - & - & - & - & - & - \tabularnewline
59 & 113.4 & - & - & - & - & - & - & - \tabularnewline
60 & 112.2 & - & - & - & - & - & - & - \tabularnewline
61 & 100.8 & - & - & - & - & - & - & - \tabularnewline
62 & 107.3 & - & - & - & - & - & - & - \tabularnewline
63 & 126.6 & - & - & - & - & - & - & - \tabularnewline
64 & 102.9 & - & - & - & - & - & - & - \tabularnewline
65 & 117.9 & - & - & - & - & - & - & - \tabularnewline
66 & 128.8 & - & - & - & - & - & - & - \tabularnewline
67 & 87.5 & - & - & - & - & - & - & - \tabularnewline
68 & 93.8 & - & - & - & - & - & - & - \tabularnewline
69 & 122.7 & 118.1292 & 138.9684 & 104.0228 & 0.7373 & 4e-04 & 0.3784 & 4e-04 \tabularnewline
70 & 126.2 & 120.2821 & 142.8941 & 105.2947 & 0.7805 & 0.6241 & 0.0177 & 3e-04 \tabularnewline
71 & 124.6 & 116.648 & 138.7711 & 102.0285 & 0.8568 & 0.8998 & 0.3316 & 0.0011 \tabularnewline
72 & 116.7 & 110.2037 & 131.7527 & 96.1124 & 0.8169 & 0.9774 & 0.6094 & 0.0113 \tabularnewline
73 & 115.2 & 101.7673 & 118.7174 & 90.0819 & 0.9879 & 0.9939 & 0.4356 & 0.0907 \tabularnewline
74 & 111.1 & 106.6783 & 127.4827 & 93.0613 & 0.7378 & 0.89 & 0.5357 & 0.0319 \tabularnewline
75 & 129.9 & 123.3379 & 158.3494 & 103.5548 & 0.7422 & 0.1127 & 0.6267 & 0.0017 \tabularnewline
76 & 113.3 & 109.373 & 133.3881 & 94.3124 & 0.6953 & 0.9962 & 0.1998 & 0.0213 \tabularnewline
77 & 118.5 & 109.0729 & 133.6865 & 93.7958 & 0.8868 & 0.7062 & 0.8713 & 0.025 \tabularnewline
78 & 133.5 & 124.7814 & 164.2488 & 103.5434 & 0.7895 & 0.2811 & 0.6446 & 0.0021 \tabularnewline
79 & 102.1 & 88.0664 & 101.0787 & 78.769 & 0.9985 & 1 & 0.4525 & 0.8866 \tabularnewline
80 & 102.4 & 88.8367 & 102.4126 & 79.2306 & 0.9972 & 0.9966 & 0.8444 & 0.8444 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2965&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[68])[/C][/ROW]
[ROW][C]56[/C][C]88.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]115.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]104.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]113.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]112.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]100.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]107.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]126.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]102.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]117.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]128.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]87.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]93.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]122.7[/C][C]118.1292[/C][C]138.9684[/C][C]104.0228[/C][C]0.7373[/C][C]4e-04[/C][C]0.3784[/C][C]4e-04[/C][/ROW]
[ROW][C]70[/C][C]126.2[/C][C]120.2821[/C][C]142.8941[/C][C]105.2947[/C][C]0.7805[/C][C]0.6241[/C][C]0.0177[/C][C]3e-04[/C][/ROW]
[ROW][C]71[/C][C]124.6[/C][C]116.648[/C][C]138.7711[/C][C]102.0285[/C][C]0.8568[/C][C]0.8998[/C][C]0.3316[/C][C]0.0011[/C][/ROW]
[ROW][C]72[/C][C]116.7[/C][C]110.2037[/C][C]131.7527[/C][C]96.1124[/C][C]0.8169[/C][C]0.9774[/C][C]0.6094[/C][C]0.0113[/C][/ROW]
[ROW][C]73[/C][C]115.2[/C][C]101.7673[/C][C]118.7174[/C][C]90.0819[/C][C]0.9879[/C][C]0.9939[/C][C]0.4356[/C][C]0.0907[/C][/ROW]
[ROW][C]74[/C][C]111.1[/C][C]106.6783[/C][C]127.4827[/C][C]93.0613[/C][C]0.7378[/C][C]0.89[/C][C]0.5357[/C][C]0.0319[/C][/ROW]
[ROW][C]75[/C][C]129.9[/C][C]123.3379[/C][C]158.3494[/C][C]103.5548[/C][C]0.7422[/C][C]0.1127[/C][C]0.6267[/C][C]0.0017[/C][/ROW]
[ROW][C]76[/C][C]113.3[/C][C]109.373[/C][C]133.3881[/C][C]94.3124[/C][C]0.6953[/C][C]0.9962[/C][C]0.1998[/C][C]0.0213[/C][/ROW]
[ROW][C]77[/C][C]118.5[/C][C]109.0729[/C][C]133.6865[/C][C]93.7958[/C][C]0.8868[/C][C]0.7062[/C][C]0.8713[/C][C]0.025[/C][/ROW]
[ROW][C]78[/C][C]133.5[/C][C]124.7814[/C][C]164.2488[/C][C]103.5434[/C][C]0.7895[/C][C]0.2811[/C][C]0.6446[/C][C]0.0021[/C][/ROW]
[ROW][C]79[/C][C]102.1[/C][C]88.0664[/C][C]101.0787[/C][C]78.769[/C][C]0.9985[/C][C]1[/C][C]0.4525[/C][C]0.8866[/C][/ROW]
[ROW][C]80[/C][C]102.4[/C][C]88.8367[/C][C]102.4126[/C][C]79.2306[/C][C]0.9972[/C][C]0.9966[/C][C]0.8444[/C][C]0.8444[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2965&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2965&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[68])
5688.9-------
57115.9-------
58104.2-------
59113.4-------
60112.2-------
61100.8-------
62107.3-------
63126.6-------
64102.9-------
65117.9-------
66128.8-------
6787.5-------
6893.8-------
69122.7118.1292138.9684104.02280.73734e-040.37844e-04
70126.2120.2821142.8941105.29470.78050.62410.01773e-04
71124.6116.648138.7711102.02850.85680.89980.33160.0011
72116.7110.2037131.752796.11240.81690.97740.60940.0113
73115.2101.7673118.717490.08190.98790.99390.43560.0907
74111.1106.6783127.482793.06130.73780.890.53570.0319
75129.9123.3379158.3494103.55480.74220.11270.62670.0017
76113.3109.373133.388194.31240.69530.99620.19980.0213
77118.5109.0729133.686593.79580.88680.70620.87130.025
78133.5124.7814164.2488103.54340.78950.28110.64460.0021
79102.188.0664101.078778.7690.998510.45250.8866
80102.488.8367102.412679.23060.99720.99660.84440.8444







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
69-0.06090.03870.003220.89231.7411.3195
70-0.06360.04920.004135.02142.91851.7083
71-0.06390.06820.005763.23375.26952.2955
72-0.06520.05890.004942.20163.51681.8753
73-0.05860.1320.011180.438515.03653.8777
74-0.06510.04140.003519.55131.62931.2764
75-0.08180.05320.004443.06073.58841.8943
76-0.07030.03590.00315.42141.28511.1336
77-0.07150.08640.007288.877.40582.7214
78-0.08680.06990.005876.01396.33452.5168
79-0.05390.15940.0133196.941216.41184.0511
80-0.05520.15270.0127183.964315.33043.9154

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & -0.0609 & 0.0387 & 0.0032 & 20.8923 & 1.741 & 1.3195 \tabularnewline
70 & -0.0636 & 0.0492 & 0.0041 & 35.0214 & 2.9185 & 1.7083 \tabularnewline
71 & -0.0639 & 0.0682 & 0.0057 & 63.2337 & 5.2695 & 2.2955 \tabularnewline
72 & -0.0652 & 0.0589 & 0.0049 & 42.2016 & 3.5168 & 1.8753 \tabularnewline
73 & -0.0586 & 0.132 & 0.011 & 180.4385 & 15.0365 & 3.8777 \tabularnewline
74 & -0.0651 & 0.0414 & 0.0035 & 19.5513 & 1.6293 & 1.2764 \tabularnewline
75 & -0.0818 & 0.0532 & 0.0044 & 43.0607 & 3.5884 & 1.8943 \tabularnewline
76 & -0.0703 & 0.0359 & 0.003 & 15.4214 & 1.2851 & 1.1336 \tabularnewline
77 & -0.0715 & 0.0864 & 0.0072 & 88.87 & 7.4058 & 2.7214 \tabularnewline
78 & -0.0868 & 0.0699 & 0.0058 & 76.0139 & 6.3345 & 2.5168 \tabularnewline
79 & -0.0539 & 0.1594 & 0.0133 & 196.9412 & 16.4118 & 4.0511 \tabularnewline
80 & -0.0552 & 0.1527 & 0.0127 & 183.9643 & 15.3304 & 3.9154 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2965&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]69[/C][C]-0.0609[/C][C]0.0387[/C][C]0.0032[/C][C]20.8923[/C][C]1.741[/C][C]1.3195[/C][/ROW]
[ROW][C]70[/C][C]-0.0636[/C][C]0.0492[/C][C]0.0041[/C][C]35.0214[/C][C]2.9185[/C][C]1.7083[/C][/ROW]
[ROW][C]71[/C][C]-0.0639[/C][C]0.0682[/C][C]0.0057[/C][C]63.2337[/C][C]5.2695[/C][C]2.2955[/C][/ROW]
[ROW][C]72[/C][C]-0.0652[/C][C]0.0589[/C][C]0.0049[/C][C]42.2016[/C][C]3.5168[/C][C]1.8753[/C][/ROW]
[ROW][C]73[/C][C]-0.0586[/C][C]0.132[/C][C]0.011[/C][C]180.4385[/C][C]15.0365[/C][C]3.8777[/C][/ROW]
[ROW][C]74[/C][C]-0.0651[/C][C]0.0414[/C][C]0.0035[/C][C]19.5513[/C][C]1.6293[/C][C]1.2764[/C][/ROW]
[ROW][C]75[/C][C]-0.0818[/C][C]0.0532[/C][C]0.0044[/C][C]43.0607[/C][C]3.5884[/C][C]1.8943[/C][/ROW]
[ROW][C]76[/C][C]-0.0703[/C][C]0.0359[/C][C]0.003[/C][C]15.4214[/C][C]1.2851[/C][C]1.1336[/C][/ROW]
[ROW][C]77[/C][C]-0.0715[/C][C]0.0864[/C][C]0.0072[/C][C]88.87[/C][C]7.4058[/C][C]2.7214[/C][/ROW]
[ROW][C]78[/C][C]-0.0868[/C][C]0.0699[/C][C]0.0058[/C][C]76.0139[/C][C]6.3345[/C][C]2.5168[/C][/ROW]
[ROW][C]79[/C][C]-0.0539[/C][C]0.1594[/C][C]0.0133[/C][C]196.9412[/C][C]16.4118[/C][C]4.0511[/C][/ROW]
[ROW][C]80[/C][C]-0.0552[/C][C]0.1527[/C][C]0.0127[/C][C]183.9643[/C][C]15.3304[/C][C]3.9154[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2965&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2965&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
69-0.06090.03870.003220.89231.7411.3195
70-0.06360.04920.004135.02142.91851.7083
71-0.06390.06820.005763.23375.26952.2955
72-0.06520.05890.004942.20163.51681.8753
73-0.05860.1320.011180.438515.03653.8777
74-0.06510.04140.003519.55131.62931.2764
75-0.08180.05320.004443.06073.58841.8943
76-0.07030.03590.00315.42141.28511.1336
77-0.07150.08640.007288.877.40582.7214
78-0.08680.06990.005876.01396.33452.5168
79-0.05390.15940.0133196.941216.41184.0511
80-0.05520.15270.0127183.964315.33043.9154



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