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, 17 Dec 2008 06:46:26 -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/17/t1229521864smtmxer8j7u35ho.htm/, Retrieved Sun, 19 May 2024 05:41:17 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34346, Retrieved Sun, 19 May 2024 05:41:17 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact193
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Arima Forecasting...] [2008-12-17 13:46:26] [c0a347e3519123f7eef62b705326dad9] [Current]
Feedback Forum

Post a new message
Dataseries X:
101.5
100.7
110.6
96.8
100.0
104.8
86.8
92.0
100.2
106.6
102.1
93.7
97.6
96.9
105.6
102.8
101.7
104.2
92.7
91.9
106.5
112.3
102.8
96.5
101.0
98.9
105.1
103.0
99.0
104.3
94.6
90.4
108.9
111.4
100.8
102.5
98.2
98.7
113.3
104.6
99.3
111.8
97.3
97.7
115.6
111.9
107.0
107.1
100.6
99.2
108.4
103.0
99.8
115.0
90.8
95.9
114.4
108.2
112.6
109.1
105.0
105.0
118.5
103.7
112.5
116.6
96.6
101.9
116.5
119.3
115.4
108.5
111.5
108.8
121.8
109.6
112.2
119.6
104.1
105.3
115.0
124.1
116.8
107.5
115.6
116.2
116.3
119.0
111.9
118.6
106.9
103.2




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34346&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]1 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=34346&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34346&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 time1 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[80])
68101.9-------
69116.5-------
70119.3-------
71115.4-------
72108.5-------
73111.5-------
74108.8-------
75121.8-------
76109.6-------
77112.2-------
78119.6-------
79104.1-------
80105.3-------
81115120.4871114.7103126.26390.031310.91191
82124.1122.022116.2436127.80030.24040.99140.82211
83116.8116.7982110.7353122.86110.49980.00910.67440.9999
84107.5112.8142105.7138119.91460.07120.13560.88320.981
85115.6112.271105.1373119.40470.18020.9050.58390.9723
86116.2110.9543103.4515118.45710.08530.11240.71320.9302
87116.3121.696113.7421129.64980.09180.91220.48981
88119113.0373104.9592121.11540.0740.21430.79790.9698
89111.9113.044104.6364121.45150.39490.08250.5780.9645
90118.6120.4157111.7329129.09850.3410.97270.5730.9997
91106.9104.070695.2219112.91930.26546e-040.49740.3927
92103.2105.716196.5991114.83320.29430.39960.53560.5356

\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[80]) \tabularnewline
68 & 101.9 & - & - & - & - & - & - & - \tabularnewline
69 & 116.5 & - & - & - & - & - & - & - \tabularnewline
70 & 119.3 & - & - & - & - & - & - & - \tabularnewline
71 & 115.4 & - & - & - & - & - & - & - \tabularnewline
72 & 108.5 & - & - & - & - & - & - & - \tabularnewline
73 & 111.5 & - & - & - & - & - & - & - \tabularnewline
74 & 108.8 & - & - & - & - & - & - & - \tabularnewline
75 & 121.8 & - & - & - & - & - & - & - \tabularnewline
76 & 109.6 & - & - & - & - & - & - & - \tabularnewline
77 & 112.2 & - & - & - & - & - & - & - \tabularnewline
78 & 119.6 & - & - & - & - & - & - & - \tabularnewline
79 & 104.1 & - & - & - & - & - & - & - \tabularnewline
80 & 105.3 & - & - & - & - & - & - & - \tabularnewline
81 & 115 & 120.4871 & 114.7103 & 126.2639 & 0.0313 & 1 & 0.9119 & 1 \tabularnewline
82 & 124.1 & 122.022 & 116.2436 & 127.8003 & 0.2404 & 0.9914 & 0.8221 & 1 \tabularnewline
83 & 116.8 & 116.7982 & 110.7353 & 122.8611 & 0.4998 & 0.0091 & 0.6744 & 0.9999 \tabularnewline
84 & 107.5 & 112.8142 & 105.7138 & 119.9146 & 0.0712 & 0.1356 & 0.8832 & 0.981 \tabularnewline
85 & 115.6 & 112.271 & 105.1373 & 119.4047 & 0.1802 & 0.905 & 0.5839 & 0.9723 \tabularnewline
86 & 116.2 & 110.9543 & 103.4515 & 118.4571 & 0.0853 & 0.1124 & 0.7132 & 0.9302 \tabularnewline
87 & 116.3 & 121.696 & 113.7421 & 129.6498 & 0.0918 & 0.9122 & 0.4898 & 1 \tabularnewline
88 & 119 & 113.0373 & 104.9592 & 121.1154 & 0.074 & 0.2143 & 0.7979 & 0.9698 \tabularnewline
89 & 111.9 & 113.044 & 104.6364 & 121.4515 & 0.3949 & 0.0825 & 0.578 & 0.9645 \tabularnewline
90 & 118.6 & 120.4157 & 111.7329 & 129.0985 & 0.341 & 0.9727 & 0.573 & 0.9997 \tabularnewline
91 & 106.9 & 104.0706 & 95.2219 & 112.9193 & 0.2654 & 6e-04 & 0.4974 & 0.3927 \tabularnewline
92 & 103.2 & 105.7161 & 96.5991 & 114.8332 & 0.2943 & 0.3996 & 0.5356 & 0.5356 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34346&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[80])[/C][/ROW]
[ROW][C]68[/C][C]101.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]116.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]119.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]115.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]108.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]111.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]108.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]121.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]109.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]112.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]119.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]104.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]105.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]115[/C][C]120.4871[/C][C]114.7103[/C][C]126.2639[/C][C]0.0313[/C][C]1[/C][C]0.9119[/C][C]1[/C][/ROW]
[ROW][C]82[/C][C]124.1[/C][C]122.022[/C][C]116.2436[/C][C]127.8003[/C][C]0.2404[/C][C]0.9914[/C][C]0.8221[/C][C]1[/C][/ROW]
[ROW][C]83[/C][C]116.8[/C][C]116.7982[/C][C]110.7353[/C][C]122.8611[/C][C]0.4998[/C][C]0.0091[/C][C]0.6744[/C][C]0.9999[/C][/ROW]
[ROW][C]84[/C][C]107.5[/C][C]112.8142[/C][C]105.7138[/C][C]119.9146[/C][C]0.0712[/C][C]0.1356[/C][C]0.8832[/C][C]0.981[/C][/ROW]
[ROW][C]85[/C][C]115.6[/C][C]112.271[/C][C]105.1373[/C][C]119.4047[/C][C]0.1802[/C][C]0.905[/C][C]0.5839[/C][C]0.9723[/C][/ROW]
[ROW][C]86[/C][C]116.2[/C][C]110.9543[/C][C]103.4515[/C][C]118.4571[/C][C]0.0853[/C][C]0.1124[/C][C]0.7132[/C][C]0.9302[/C][/ROW]
[ROW][C]87[/C][C]116.3[/C][C]121.696[/C][C]113.7421[/C][C]129.6498[/C][C]0.0918[/C][C]0.9122[/C][C]0.4898[/C][C]1[/C][/ROW]
[ROW][C]88[/C][C]119[/C][C]113.0373[/C][C]104.9592[/C][C]121.1154[/C][C]0.074[/C][C]0.2143[/C][C]0.7979[/C][C]0.9698[/C][/ROW]
[ROW][C]89[/C][C]111.9[/C][C]113.044[/C][C]104.6364[/C][C]121.4515[/C][C]0.3949[/C][C]0.0825[/C][C]0.578[/C][C]0.9645[/C][/ROW]
[ROW][C]90[/C][C]118.6[/C][C]120.4157[/C][C]111.7329[/C][C]129.0985[/C][C]0.341[/C][C]0.9727[/C][C]0.573[/C][C]0.9997[/C][/ROW]
[ROW][C]91[/C][C]106.9[/C][C]104.0706[/C][C]95.2219[/C][C]112.9193[/C][C]0.2654[/C][C]6e-04[/C][C]0.4974[/C][C]0.3927[/C][/ROW]
[ROW][C]92[/C][C]103.2[/C][C]105.7161[/C][C]96.5991[/C][C]114.8332[/C][C]0.2943[/C][C]0.3996[/C][C]0.5356[/C][C]0.5356[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34346&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34346&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[80])
68101.9-------
69116.5-------
70119.3-------
71115.4-------
72108.5-------
73111.5-------
74108.8-------
75121.8-------
76109.6-------
77112.2-------
78119.6-------
79104.1-------
80105.3-------
81115120.4871114.7103126.26390.031310.91191
82124.1122.022116.2436127.80030.24040.99140.82211
83116.8116.7982110.7353122.86110.49980.00910.67440.9999
84107.5112.8142105.7138119.91460.07120.13560.88320.981
85115.6112.271105.1373119.40470.18020.9050.58390.9723
86116.2110.9543103.4515118.45710.08530.11240.71320.9302
87116.3121.696113.7421129.64980.09180.91220.48981
88119113.0373104.9592121.11540.0740.21430.79790.9698
89111.9113.044104.6364121.45150.39490.08250.5780.9645
90118.6120.4157111.7329129.09850.3410.97270.5730.9997
91106.9104.070695.2219112.91930.26546e-040.49740.3927
92103.2105.716196.5991114.83320.29430.39960.53560.5356







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
810.0245-0.04550.003830.10852.5091.584
820.02420.0170.00144.31820.35980.5999
830.026500005e-04
840.0321-0.04710.003928.24042.35341.5341
850.03240.02970.002511.08210.92350.961
860.03450.04730.003927.51742.29311.5143
870.0333-0.04430.003729.11632.42641.5577
880.03650.05270.004435.5542.96281.7213
890.0379-0.01018e-041.30870.10910.3302
900.0368-0.01510.00133.29670.27470.5241
910.04340.02720.00238.00560.66710.8168
920.044-0.02380.0026.3310.52760.7263

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
81 & 0.0245 & -0.0455 & 0.0038 & 30.1085 & 2.509 & 1.584 \tabularnewline
82 & 0.0242 & 0.017 & 0.0014 & 4.3182 & 0.3598 & 0.5999 \tabularnewline
83 & 0.0265 & 0 & 0 & 0 & 0 & 5e-04 \tabularnewline
84 & 0.0321 & -0.0471 & 0.0039 & 28.2404 & 2.3534 & 1.5341 \tabularnewline
85 & 0.0324 & 0.0297 & 0.0025 & 11.0821 & 0.9235 & 0.961 \tabularnewline
86 & 0.0345 & 0.0473 & 0.0039 & 27.5174 & 2.2931 & 1.5143 \tabularnewline
87 & 0.0333 & -0.0443 & 0.0037 & 29.1163 & 2.4264 & 1.5577 \tabularnewline
88 & 0.0365 & 0.0527 & 0.0044 & 35.554 & 2.9628 & 1.7213 \tabularnewline
89 & 0.0379 & -0.0101 & 8e-04 & 1.3087 & 0.1091 & 0.3302 \tabularnewline
90 & 0.0368 & -0.0151 & 0.0013 & 3.2967 & 0.2747 & 0.5241 \tabularnewline
91 & 0.0434 & 0.0272 & 0.0023 & 8.0056 & 0.6671 & 0.8168 \tabularnewline
92 & 0.044 & -0.0238 & 0.002 & 6.331 & 0.5276 & 0.7263 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34346&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]81[/C][C]0.0245[/C][C]-0.0455[/C][C]0.0038[/C][C]30.1085[/C][C]2.509[/C][C]1.584[/C][/ROW]
[ROW][C]82[/C][C]0.0242[/C][C]0.017[/C][C]0.0014[/C][C]4.3182[/C][C]0.3598[/C][C]0.5999[/C][/ROW]
[ROW][C]83[/C][C]0.0265[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]5e-04[/C][/ROW]
[ROW][C]84[/C][C]0.0321[/C][C]-0.0471[/C][C]0.0039[/C][C]28.2404[/C][C]2.3534[/C][C]1.5341[/C][/ROW]
[ROW][C]85[/C][C]0.0324[/C][C]0.0297[/C][C]0.0025[/C][C]11.0821[/C][C]0.9235[/C][C]0.961[/C][/ROW]
[ROW][C]86[/C][C]0.0345[/C][C]0.0473[/C][C]0.0039[/C][C]27.5174[/C][C]2.2931[/C][C]1.5143[/C][/ROW]
[ROW][C]87[/C][C]0.0333[/C][C]-0.0443[/C][C]0.0037[/C][C]29.1163[/C][C]2.4264[/C][C]1.5577[/C][/ROW]
[ROW][C]88[/C][C]0.0365[/C][C]0.0527[/C][C]0.0044[/C][C]35.554[/C][C]2.9628[/C][C]1.7213[/C][/ROW]
[ROW][C]89[/C][C]0.0379[/C][C]-0.0101[/C][C]8e-04[/C][C]1.3087[/C][C]0.1091[/C][C]0.3302[/C][/ROW]
[ROW][C]90[/C][C]0.0368[/C][C]-0.0151[/C][C]0.0013[/C][C]3.2967[/C][C]0.2747[/C][C]0.5241[/C][/ROW]
[ROW][C]91[/C][C]0.0434[/C][C]0.0272[/C][C]0.0023[/C][C]8.0056[/C][C]0.6671[/C][C]0.8168[/C][/ROW]
[ROW][C]92[/C][C]0.044[/C][C]-0.0238[/C][C]0.002[/C][C]6.331[/C][C]0.5276[/C][C]0.7263[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34346&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34346&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
810.0245-0.04550.003830.10852.5091.584
820.02420.0170.00144.31820.35980.5999
830.026500005e-04
840.0321-0.04710.003928.24042.35341.5341
850.03240.02970.002511.08210.92350.961
860.03450.04730.003927.51742.29311.5143
870.0333-0.04430.003729.11632.42641.5577
880.03650.05270.004435.5542.96281.7213
890.0379-0.01018e-041.30870.10910.3302
900.0368-0.01510.00133.29670.27470.5241
910.04340.02720.00238.00560.66710.8168
920.044-0.02380.0026.3310.52760.7263



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