Free Statistics

of Irreproducible Research!

Author's title

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

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact201
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-11 16:04:04] [7259c5d851fac60b56aa6e45a0791cb0] [Current]
Feedback Forum

Post a new message
Dataseries X:
105,3
103
103,8
103,4
105,8
101,4
97
94,3
96,6
97,1
95,7
96,9
97,4
95,3
93,6
91,5
93,1
91,7
94,3
93,9
90,9
88,3
91,3
91,7
92,4
92
95,6
95,8
96,4
99
107
109,7
116,2
115,9
113,8
112,6
113,7
115,9
110,3
111,3
113,4
108,2
104,8
106
110,9
115
118,4
121,4
128,8
131,7
141,7
142,9
139,4
134,7
125
113,6
111,5
108,5
112,3
116,6




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3127&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[48])
36112.6-------
37113.7-------
38115.9-------
39110.3-------
40111.3-------
41113.4-------
42108.2-------
43104.8-------
44106-------
45110.9-------
46115-------
47118.4-------
48121.4-------
49128.8122.925116.4738129.73350.04540.66970.9960.6697
50131.7124.0867113.5481135.60330.09750.21120.91820.6763
51141.7125.1647111.22140.85790.01950.20720.96830.6809
52142.9126.2288109.2515145.84420.04790.06110.93210.6853
53139.4127.2961107.5006150.73670.15580.0960.87740.689
54134.7128.3709105.8857155.63110.32450.21390.92650.6919
55125129.4545104.3587160.58540.38960.37060.93970.694
56113.6130.5472102.8903165.63830.17190.62170.91480.6953
57111.5131.649101.4617170.81790.15670.81680.85040.696
58108.5132.7602100.0603176.14650.13650.83160.78880.6961
59112.3133.880798.6776181.64250.18790.85120.73740.6957
60116.6135.010797.3076187.32230.24520.80260.6950.695

\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 & 112.6 & - & - & - & - & - & - & - \tabularnewline
37 & 113.7 & - & - & - & - & - & - & - \tabularnewline
38 & 115.9 & - & - & - & - & - & - & - \tabularnewline
39 & 110.3 & - & - & - & - & - & - & - \tabularnewline
40 & 111.3 & - & - & - & - & - & - & - \tabularnewline
41 & 113.4 & - & - & - & - & - & - & - \tabularnewline
42 & 108.2 & - & - & - & - & - & - & - \tabularnewline
43 & 104.8 & - & - & - & - & - & - & - \tabularnewline
44 & 106 & - & - & - & - & - & - & - \tabularnewline
45 & 110.9 & - & - & - & - & - & - & - \tabularnewline
46 & 115 & - & - & - & - & - & - & - \tabularnewline
47 & 118.4 & - & - & - & - & - & - & - \tabularnewline
48 & 121.4 & - & - & - & - & - & - & - \tabularnewline
49 & 128.8 & 122.925 & 116.4738 & 129.7335 & 0.0454 & 0.6697 & 0.996 & 0.6697 \tabularnewline
50 & 131.7 & 124.0867 & 113.5481 & 135.6033 & 0.0975 & 0.2112 & 0.9182 & 0.6763 \tabularnewline
51 & 141.7 & 125.1647 & 111.22 & 140.8579 & 0.0195 & 0.2072 & 0.9683 & 0.6809 \tabularnewline
52 & 142.9 & 126.2288 & 109.2515 & 145.8442 & 0.0479 & 0.0611 & 0.9321 & 0.6853 \tabularnewline
53 & 139.4 & 127.2961 & 107.5006 & 150.7367 & 0.1558 & 0.096 & 0.8774 & 0.689 \tabularnewline
54 & 134.7 & 128.3709 & 105.8857 & 155.6311 & 0.3245 & 0.2139 & 0.9265 & 0.6919 \tabularnewline
55 & 125 & 129.4545 & 104.3587 & 160.5854 & 0.3896 & 0.3706 & 0.9397 & 0.694 \tabularnewline
56 & 113.6 & 130.5472 & 102.8903 & 165.6383 & 0.1719 & 0.6217 & 0.9148 & 0.6953 \tabularnewline
57 & 111.5 & 131.649 & 101.4617 & 170.8179 & 0.1567 & 0.8168 & 0.8504 & 0.696 \tabularnewline
58 & 108.5 & 132.7602 & 100.0603 & 176.1465 & 0.1365 & 0.8316 & 0.7888 & 0.6961 \tabularnewline
59 & 112.3 & 133.8807 & 98.6776 & 181.6425 & 0.1879 & 0.8512 & 0.7374 & 0.6957 \tabularnewline
60 & 116.6 & 135.0107 & 97.3076 & 187.3223 & 0.2452 & 0.8026 & 0.695 & 0.695 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3127&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]112.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]113.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]115.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]110.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]111.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]113.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]108.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]104.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]106[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]110.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]115[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]118.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]121.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]128.8[/C][C]122.925[/C][C]116.4738[/C][C]129.7335[/C][C]0.0454[/C][C]0.6697[/C][C]0.996[/C][C]0.6697[/C][/ROW]
[ROW][C]50[/C][C]131.7[/C][C]124.0867[/C][C]113.5481[/C][C]135.6033[/C][C]0.0975[/C][C]0.2112[/C][C]0.9182[/C][C]0.6763[/C][/ROW]
[ROW][C]51[/C][C]141.7[/C][C]125.1647[/C][C]111.22[/C][C]140.8579[/C][C]0.0195[/C][C]0.2072[/C][C]0.9683[/C][C]0.6809[/C][/ROW]
[ROW][C]52[/C][C]142.9[/C][C]126.2288[/C][C]109.2515[/C][C]145.8442[/C][C]0.0479[/C][C]0.0611[/C][C]0.9321[/C][C]0.6853[/C][/ROW]
[ROW][C]53[/C][C]139.4[/C][C]127.2961[/C][C]107.5006[/C][C]150.7367[/C][C]0.1558[/C][C]0.096[/C][C]0.8774[/C][C]0.689[/C][/ROW]
[ROW][C]54[/C][C]134.7[/C][C]128.3709[/C][C]105.8857[/C][C]155.6311[/C][C]0.3245[/C][C]0.2139[/C][C]0.9265[/C][C]0.6919[/C][/ROW]
[ROW][C]55[/C][C]125[/C][C]129.4545[/C][C]104.3587[/C][C]160.5854[/C][C]0.3896[/C][C]0.3706[/C][C]0.9397[/C][C]0.694[/C][/ROW]
[ROW][C]56[/C][C]113.6[/C][C]130.5472[/C][C]102.8903[/C][C]165.6383[/C][C]0.1719[/C][C]0.6217[/C][C]0.9148[/C][C]0.6953[/C][/ROW]
[ROW][C]57[/C][C]111.5[/C][C]131.649[/C][C]101.4617[/C][C]170.8179[/C][C]0.1567[/C][C]0.8168[/C][C]0.8504[/C][C]0.696[/C][/ROW]
[ROW][C]58[/C][C]108.5[/C][C]132.7602[/C][C]100.0603[/C][C]176.1465[/C][C]0.1365[/C][C]0.8316[/C][C]0.7888[/C][C]0.6961[/C][/ROW]
[ROW][C]59[/C][C]112.3[/C][C]133.8807[/C][C]98.6776[/C][C]181.6425[/C][C]0.1879[/C][C]0.8512[/C][C]0.7374[/C][C]0.6957[/C][/ROW]
[ROW][C]60[/C][C]116.6[/C][C]135.0107[/C][C]97.3076[/C][C]187.3223[/C][C]0.2452[/C][C]0.8026[/C][C]0.695[/C][C]0.695[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3127&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3127&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])
36112.6-------
37113.7-------
38115.9-------
39110.3-------
40111.3-------
41113.4-------
42108.2-------
43104.8-------
44106-------
45110.9-------
46115-------
47118.4-------
48121.4-------
49128.8122.925116.4738129.73350.04540.66970.9960.6697
50131.7124.0867113.5481135.60330.09750.21120.91820.6763
51141.7125.1647111.22140.85790.01950.20720.96830.6809
52142.9126.2288109.2515145.84420.04790.06110.93210.6853
53139.4127.2961107.5006150.73670.15580.0960.87740.689
54134.7128.3709105.8857155.63110.32450.21390.92650.6919
55125129.4545104.3587160.58540.38960.37060.93970.694
56113.6130.5472102.8903165.63830.17190.62170.91480.6953
57111.5131.649101.4617170.81790.15670.81680.85040.696
58108.5132.7602100.0603176.14650.13650.83160.78880.6961
59112.3133.880798.6776181.64250.18790.85120.73740.6957
60116.6135.010797.3076187.32230.24520.80260.6950.695







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.02830.04780.00434.51572.87631.696
500.04740.06140.005157.96284.83022.1978
510.0640.13210.011273.414822.78464.7733
520.07930.13210.011277.929823.16084.8126
530.0940.09510.0079146.505412.20883.4941
540.10830.04930.004140.05713.33811.827
550.1227-0.03440.002919.84281.65361.2859
560.1371-0.12980.0108287.207123.93394.8922
570.1518-0.15310.0128405.983933.8325.8165
580.1667-0.18270.0152588.55749.04647.0033
590.182-0.16120.0134465.727638.81066.2298
600.1977-0.13640.0114338.954128.24625.3147

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0283 & 0.0478 & 0.004 & 34.5157 & 2.8763 & 1.696 \tabularnewline
50 & 0.0474 & 0.0614 & 0.0051 & 57.9628 & 4.8302 & 2.1978 \tabularnewline
51 & 0.064 & 0.1321 & 0.011 & 273.4148 & 22.7846 & 4.7733 \tabularnewline
52 & 0.0793 & 0.1321 & 0.011 & 277.9298 & 23.1608 & 4.8126 \tabularnewline
53 & 0.094 & 0.0951 & 0.0079 & 146.5054 & 12.2088 & 3.4941 \tabularnewline
54 & 0.1083 & 0.0493 & 0.0041 & 40.0571 & 3.3381 & 1.827 \tabularnewline
55 & 0.1227 & -0.0344 & 0.0029 & 19.8428 & 1.6536 & 1.2859 \tabularnewline
56 & 0.1371 & -0.1298 & 0.0108 & 287.2071 & 23.9339 & 4.8922 \tabularnewline
57 & 0.1518 & -0.1531 & 0.0128 & 405.9839 & 33.832 & 5.8165 \tabularnewline
58 & 0.1667 & -0.1827 & 0.0152 & 588.557 & 49.0464 & 7.0033 \tabularnewline
59 & 0.182 & -0.1612 & 0.0134 & 465.7276 & 38.8106 & 6.2298 \tabularnewline
60 & 0.1977 & -0.1364 & 0.0114 & 338.9541 & 28.2462 & 5.3147 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3127&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.0283[/C][C]0.0478[/C][C]0.004[/C][C]34.5157[/C][C]2.8763[/C][C]1.696[/C][/ROW]
[ROW][C]50[/C][C]0.0474[/C][C]0.0614[/C][C]0.0051[/C][C]57.9628[/C][C]4.8302[/C][C]2.1978[/C][/ROW]
[ROW][C]51[/C][C]0.064[/C][C]0.1321[/C][C]0.011[/C][C]273.4148[/C][C]22.7846[/C][C]4.7733[/C][/ROW]
[ROW][C]52[/C][C]0.0793[/C][C]0.1321[/C][C]0.011[/C][C]277.9298[/C][C]23.1608[/C][C]4.8126[/C][/ROW]
[ROW][C]53[/C][C]0.094[/C][C]0.0951[/C][C]0.0079[/C][C]146.5054[/C][C]12.2088[/C][C]3.4941[/C][/ROW]
[ROW][C]54[/C][C]0.1083[/C][C]0.0493[/C][C]0.0041[/C][C]40.0571[/C][C]3.3381[/C][C]1.827[/C][/ROW]
[ROW][C]55[/C][C]0.1227[/C][C]-0.0344[/C][C]0.0029[/C][C]19.8428[/C][C]1.6536[/C][C]1.2859[/C][/ROW]
[ROW][C]56[/C][C]0.1371[/C][C]-0.1298[/C][C]0.0108[/C][C]287.2071[/C][C]23.9339[/C][C]4.8922[/C][/ROW]
[ROW][C]57[/C][C]0.1518[/C][C]-0.1531[/C][C]0.0128[/C][C]405.9839[/C][C]33.832[/C][C]5.8165[/C][/ROW]
[ROW][C]58[/C][C]0.1667[/C][C]-0.1827[/C][C]0.0152[/C][C]588.557[/C][C]49.0464[/C][C]7.0033[/C][/ROW]
[ROW][C]59[/C][C]0.182[/C][C]-0.1612[/C][C]0.0134[/C][C]465.7276[/C][C]38.8106[/C][C]6.2298[/C][/ROW]
[ROW][C]60[/C][C]0.1977[/C][C]-0.1364[/C][C]0.0114[/C][C]338.9541[/C][C]28.2462[/C][C]5.3147[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3127&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3127&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.02830.04780.00434.51572.87631.696
500.04740.06140.005157.96284.83022.1978
510.0640.13210.011273.414822.78464.7733
520.07930.13210.011277.929823.16084.8126
530.0940.09510.0079146.505412.20883.4941
540.10830.04930.004140.05713.33811.827
550.1227-0.03440.002919.84281.65361.2859
560.1371-0.12980.0108287.207123.93394.8922
570.1518-0.15310.0128405.983933.8325.8165
580.1667-0.18270.0152588.55749.04647.0033
590.182-0.16120.0134465.727638.81066.2298
600.1977-0.13640.0114338.954128.24625.3147



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