Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 09 Jan 2008 06:46:11 -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/Jan/09/t11998863112jkxb6fmy08dsca.htm/, Retrieved Wed, 15 May 2024 02:45:45 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=7936, Retrieved Wed, 15 May 2024 02:45:45 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact291
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2008-01-09 13:46:11] [ba3202e2798d2e4685d19d988e9c69df] [Current]
Feedback Forum

Post a new message
Dataseries X:
85,6
89
97,5
104
99,4
103,2
103
91,2
85,9
80,7
86,7
80,7
81,5
83,4
83,5
89,5
85,8
77,4
67,5
63,7
59,4
62
62,4
58,1
58
56,3
61,4
59,8
54,3
47
50,5
48,1
58,8
70,4
71,9
73,3
83,5
90,1
101,3
98,3
106,7
109,9
111,1
119
120,7
104,5
121,6
129,6
124,5
130,1
142,3
140
143,3
113,4
113,8
120,7
112,9
115,5
121,9
119,3
111
114,2
113,5
94
83,2
82,8
85,8
88,7
105,3
113,1
113,8
109,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=7936&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=7936&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7936&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[60])
48129.6-------
49124.5-------
50130.1-------
51142.3-------
52140-------
53143.3-------
54113.4-------
55113.8-------
56120.7-------
57112.9-------
58115.5-------
59121.9-------
60119.3-------
61111119.4632105.1928132.2020.09640.510.21920.51
62114.2119.463299.5391136.50960.27250.83470.11070.5075
63113.5119.463294.862139.80020.28270.6940.01390.5063
6494119.463290.6905142.54170.01530.69370.04060.5055
6583.2119.463286.8283144.92670.00260.9750.03330.505
6682.8119.463283.1695147.05690.00460.9950.66660.5046
6785.8119.463279.6483148.99350.01270.99250.64650.5043
6888.7119.463276.2186150.77670.02710.98240.46910.5041
69105.3119.463272.8459152.43480.19990.96630.65180.5039
70113.1119.463269.5018153.98830.3590.78930.5890.5037
71113.8119.463266.1617155.45270.37890.63550.44720.5035
72109.4119.463262.802156.84010.29890.61680.50340.5034

\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[60]) \tabularnewline
48 & 129.6 & - & - & - & - & - & - & - \tabularnewline
49 & 124.5 & - & - & - & - & - & - & - \tabularnewline
50 & 130.1 & - & - & - & - & - & - & - \tabularnewline
51 & 142.3 & - & - & - & - & - & - & - \tabularnewline
52 & 140 & - & - & - & - & - & - & - \tabularnewline
53 & 143.3 & - & - & - & - & - & - & - \tabularnewline
54 & 113.4 & - & - & - & - & - & - & - \tabularnewline
55 & 113.8 & - & - & - & - & - & - & - \tabularnewline
56 & 120.7 & - & - & - & - & - & - & - \tabularnewline
57 & 112.9 & - & - & - & - & - & - & - \tabularnewline
58 & 115.5 & - & - & - & - & - & - & - \tabularnewline
59 & 121.9 & - & - & - & - & - & - & - \tabularnewline
60 & 119.3 & - & - & - & - & - & - & - \tabularnewline
61 & 111 & 119.4632 & 105.1928 & 132.202 & 0.0964 & 0.51 & 0.2192 & 0.51 \tabularnewline
62 & 114.2 & 119.4632 & 99.5391 & 136.5096 & 0.2725 & 0.8347 & 0.1107 & 0.5075 \tabularnewline
63 & 113.5 & 119.4632 & 94.862 & 139.8002 & 0.2827 & 0.694 & 0.0139 & 0.5063 \tabularnewline
64 & 94 & 119.4632 & 90.6905 & 142.5417 & 0.0153 & 0.6937 & 0.0406 & 0.5055 \tabularnewline
65 & 83.2 & 119.4632 & 86.8283 & 144.9267 & 0.0026 & 0.975 & 0.0333 & 0.505 \tabularnewline
66 & 82.8 & 119.4632 & 83.1695 & 147.0569 & 0.0046 & 0.995 & 0.6666 & 0.5046 \tabularnewline
67 & 85.8 & 119.4632 & 79.6483 & 148.9935 & 0.0127 & 0.9925 & 0.6465 & 0.5043 \tabularnewline
68 & 88.7 & 119.4632 & 76.2186 & 150.7767 & 0.0271 & 0.9824 & 0.4691 & 0.5041 \tabularnewline
69 & 105.3 & 119.4632 & 72.8459 & 152.4348 & 0.1999 & 0.9663 & 0.6518 & 0.5039 \tabularnewline
70 & 113.1 & 119.4632 & 69.5018 & 153.9883 & 0.359 & 0.7893 & 0.589 & 0.5037 \tabularnewline
71 & 113.8 & 119.4632 & 66.1617 & 155.4527 & 0.3789 & 0.6355 & 0.4472 & 0.5035 \tabularnewline
72 & 109.4 & 119.4632 & 62.802 & 156.8401 & 0.2989 & 0.6168 & 0.5034 & 0.5034 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7936&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[60])[/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]124.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]130.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]142.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]140[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]143.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]113.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]113.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]120.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]112.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]115.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]121.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]119.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]111[/C][C]119.4632[/C][C]105.1928[/C][C]132.202[/C][C]0.0964[/C][C]0.51[/C][C]0.2192[/C][C]0.51[/C][/ROW]
[ROW][C]62[/C][C]114.2[/C][C]119.4632[/C][C]99.5391[/C][C]136.5096[/C][C]0.2725[/C][C]0.8347[/C][C]0.1107[/C][C]0.5075[/C][/ROW]
[ROW][C]63[/C][C]113.5[/C][C]119.4632[/C][C]94.862[/C][C]139.8002[/C][C]0.2827[/C][C]0.694[/C][C]0.0139[/C][C]0.5063[/C][/ROW]
[ROW][C]64[/C][C]94[/C][C]119.4632[/C][C]90.6905[/C][C]142.5417[/C][C]0.0153[/C][C]0.6937[/C][C]0.0406[/C][C]0.5055[/C][/ROW]
[ROW][C]65[/C][C]83.2[/C][C]119.4632[/C][C]86.8283[/C][C]144.9267[/C][C]0.0026[/C][C]0.975[/C][C]0.0333[/C][C]0.505[/C][/ROW]
[ROW][C]66[/C][C]82.8[/C][C]119.4632[/C][C]83.1695[/C][C]147.0569[/C][C]0.0046[/C][C]0.995[/C][C]0.6666[/C][C]0.5046[/C][/ROW]
[ROW][C]67[/C][C]85.8[/C][C]119.4632[/C][C]79.6483[/C][C]148.9935[/C][C]0.0127[/C][C]0.9925[/C][C]0.6465[/C][C]0.5043[/C][/ROW]
[ROW][C]68[/C][C]88.7[/C][C]119.4632[/C][C]76.2186[/C][C]150.7767[/C][C]0.0271[/C][C]0.9824[/C][C]0.4691[/C][C]0.5041[/C][/ROW]
[ROW][C]69[/C][C]105.3[/C][C]119.4632[/C][C]72.8459[/C][C]152.4348[/C][C]0.1999[/C][C]0.9663[/C][C]0.6518[/C][C]0.5039[/C][/ROW]
[ROW][C]70[/C][C]113.1[/C][C]119.4632[/C][C]69.5018[/C][C]153.9883[/C][C]0.359[/C][C]0.7893[/C][C]0.589[/C][C]0.5037[/C][/ROW]
[ROW][C]71[/C][C]113.8[/C][C]119.4632[/C][C]66.1617[/C][C]155.4527[/C][C]0.3789[/C][C]0.6355[/C][C]0.4472[/C][C]0.5035[/C][/ROW]
[ROW][C]72[/C][C]109.4[/C][C]119.4632[/C][C]62.802[/C][C]156.8401[/C][C]0.2989[/C][C]0.6168[/C][C]0.5034[/C][C]0.5034[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7936&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7936&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[60])
48129.6-------
49124.5-------
50130.1-------
51142.3-------
52140-------
53143.3-------
54113.4-------
55113.8-------
56120.7-------
57112.9-------
58115.5-------
59121.9-------
60119.3-------
61111119.4632105.1928132.2020.09640.510.21920.51
62114.2119.463299.5391136.50960.27250.83470.11070.5075
63113.5119.463294.862139.80020.28270.6940.01390.5063
6494119.463290.6905142.54170.01530.69370.04060.5055
6583.2119.463286.8283144.92670.00260.9750.03330.505
6682.8119.463283.1695147.05690.00460.9950.66660.5046
6785.8119.463279.6483148.99350.01270.99250.64650.5043
6888.7119.463276.2186150.77670.02710.98240.46910.5041
69105.3119.463272.8459152.43480.19990.96630.65180.5039
70113.1119.463269.5018153.98830.3590.78930.5890.5037
71113.8119.463266.1617155.45270.37890.63550.44720.5035
72109.4119.463262.802156.84010.29890.61680.50340.5034







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0544-0.07080.005971.62515.96882.4431
620.0728-0.04410.003727.70092.30841.5193
630.0869-0.04990.004235.55932.96331.7214
640.0986-0.21310.0178648.372654.03117.3506
650.1087-0.30360.02531315.0169109.584710.4683
660.1178-0.30690.02561344.1875112.015610.5837
670.1261-0.28180.02351133.208594.4349.7177
680.1337-0.25750.0215946.372278.86438.8806
690.1408-0.11860.0099200.595216.71634.0886
700.1475-0.05330.004440.48983.37421.8369
710.1537-0.04740.00432.07142.67261.6348
720.1596-0.08420.007101.26728.43892.905

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0544 & -0.0708 & 0.0059 & 71.6251 & 5.9688 & 2.4431 \tabularnewline
62 & 0.0728 & -0.0441 & 0.0037 & 27.7009 & 2.3084 & 1.5193 \tabularnewline
63 & 0.0869 & -0.0499 & 0.0042 & 35.5593 & 2.9633 & 1.7214 \tabularnewline
64 & 0.0986 & -0.2131 & 0.0178 & 648.3726 & 54.0311 & 7.3506 \tabularnewline
65 & 0.1087 & -0.3036 & 0.0253 & 1315.0169 & 109.5847 & 10.4683 \tabularnewline
66 & 0.1178 & -0.3069 & 0.0256 & 1344.1875 & 112.0156 & 10.5837 \tabularnewline
67 & 0.1261 & -0.2818 & 0.0235 & 1133.2085 & 94.434 & 9.7177 \tabularnewline
68 & 0.1337 & -0.2575 & 0.0215 & 946.3722 & 78.8643 & 8.8806 \tabularnewline
69 & 0.1408 & -0.1186 & 0.0099 & 200.5952 & 16.7163 & 4.0886 \tabularnewline
70 & 0.1475 & -0.0533 & 0.0044 & 40.4898 & 3.3742 & 1.8369 \tabularnewline
71 & 0.1537 & -0.0474 & 0.004 & 32.0714 & 2.6726 & 1.6348 \tabularnewline
72 & 0.1596 & -0.0842 & 0.007 & 101.2672 & 8.4389 & 2.905 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7936&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]61[/C][C]0.0544[/C][C]-0.0708[/C][C]0.0059[/C][C]71.6251[/C][C]5.9688[/C][C]2.4431[/C][/ROW]
[ROW][C]62[/C][C]0.0728[/C][C]-0.0441[/C][C]0.0037[/C][C]27.7009[/C][C]2.3084[/C][C]1.5193[/C][/ROW]
[ROW][C]63[/C][C]0.0869[/C][C]-0.0499[/C][C]0.0042[/C][C]35.5593[/C][C]2.9633[/C][C]1.7214[/C][/ROW]
[ROW][C]64[/C][C]0.0986[/C][C]-0.2131[/C][C]0.0178[/C][C]648.3726[/C][C]54.0311[/C][C]7.3506[/C][/ROW]
[ROW][C]65[/C][C]0.1087[/C][C]-0.3036[/C][C]0.0253[/C][C]1315.0169[/C][C]109.5847[/C][C]10.4683[/C][/ROW]
[ROW][C]66[/C][C]0.1178[/C][C]-0.3069[/C][C]0.0256[/C][C]1344.1875[/C][C]112.0156[/C][C]10.5837[/C][/ROW]
[ROW][C]67[/C][C]0.1261[/C][C]-0.2818[/C][C]0.0235[/C][C]1133.2085[/C][C]94.434[/C][C]9.7177[/C][/ROW]
[ROW][C]68[/C][C]0.1337[/C][C]-0.2575[/C][C]0.0215[/C][C]946.3722[/C][C]78.8643[/C][C]8.8806[/C][/ROW]
[ROW][C]69[/C][C]0.1408[/C][C]-0.1186[/C][C]0.0099[/C][C]200.5952[/C][C]16.7163[/C][C]4.0886[/C][/ROW]
[ROW][C]70[/C][C]0.1475[/C][C]-0.0533[/C][C]0.0044[/C][C]40.4898[/C][C]3.3742[/C][C]1.8369[/C][/ROW]
[ROW][C]71[/C][C]0.1537[/C][C]-0.0474[/C][C]0.004[/C][C]32.0714[/C][C]2.6726[/C][C]1.6348[/C][/ROW]
[ROW][C]72[/C][C]0.1596[/C][C]-0.0842[/C][C]0.007[/C][C]101.2672[/C][C]8.4389[/C][C]2.905[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7936&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7936&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
610.0544-0.07080.005971.62515.96882.4431
620.0728-0.04410.003727.70092.30841.5193
630.0869-0.04990.004235.55932.96331.7214
640.0986-0.21310.0178648.372654.03117.3506
650.1087-0.30360.02531315.0169109.584710.4683
660.1178-0.30690.02561344.1875112.015610.5837
670.1261-0.28180.02351133.208594.4349.7177
680.1337-0.25750.0215946.372278.86438.8806
690.1408-0.11860.0099200.595216.71634.0886
700.1475-0.05330.004440.48983.37421.8369
710.1537-0.04740.00432.07142.67261.6348
720.1596-0.08420.007101.26728.43892.905



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