Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 15 Dec 2007 10:58:31 -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/15/t1197740676q48z509xsnd7n7g.htm/, Retrieved Thu, 02 May 2024 18:41:28 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4089, Retrieved Thu, 02 May 2024 18:41:28 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact251
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [paper forecast re...] [2007-12-15 17:58:31] [fef19078983b9fa83d10cb717d6f9786] [Current]
Feedback Forum

Post a new message
Dataseries X:
120,3
133,4
109,4
93,2
91,2
99,2
108,2
101,5
106,9
104,4
77,9
60
99,5
95
105,6
102,5
93,3
97,3
127
111,7
96,4
133
72,2
95,8
124,1
127,6
110,7
104,6
112,7
115,3
139,4
119
97,4
154
81,5
88,8
127,7
105,1
114,9
106,4
104,5
121,6
141,4
99
126,7
134,1
81,3
88,6
132,7
132,9
134,4
103,7
119,7
115
132,9
108,5
113,9
142,9
95,2
93




Summary of compuational 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 compuational 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=4089&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]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=4089&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4089&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 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[48])
3688.8-------
37127.7-------
38105.1-------
39114.9-------
40106.4-------
41104.5-------
42121.6-------
43141.4-------
4499-------
45126.7-------
46134.1-------
4781.3-------
4888.6-------
49132.7125.011499.3022150.72050.27890.99720.41880.9972
50132.9117.012391.3022142.72240.11290.11590.81810.9848
51134.4111.1983.6682138.71180.04920.0610.39580.9462
52103.7105.197676.6577133.73760.4590.02250.46710.8728
53119.7108.284679.5163137.0530.21840.62260.60170.9101
54115117.715188.3669147.06330.42810.44730.39760.9741
55132.9140.0449110.4765169.61320.31790.95160.46420.9997
56108.5109.271979.523139.02080.47970.05980.75070.9134
57113.9110.835380.9262140.74450.42040.56080.14930.9275
58142.9144.4653114.4675174.46320.45930.97710.75090.9999
5995.281.193751.1194111.26810.180700.49720.3147
609388.540958.4132118.66850.38590.33240.49850.4985

\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 & 88.8 & - & - & - & - & - & - & - \tabularnewline
37 & 127.7 & - & - & - & - & - & - & - \tabularnewline
38 & 105.1 & - & - & - & - & - & - & - \tabularnewline
39 & 114.9 & - & - & - & - & - & - & - \tabularnewline
40 & 106.4 & - & - & - & - & - & - & - \tabularnewline
41 & 104.5 & - & - & - & - & - & - & - \tabularnewline
42 & 121.6 & - & - & - & - & - & - & - \tabularnewline
43 & 141.4 & - & - & - & - & - & - & - \tabularnewline
44 & 99 & - & - & - & - & - & - & - \tabularnewline
45 & 126.7 & - & - & - & - & - & - & - \tabularnewline
46 & 134.1 & - & - & - & - & - & - & - \tabularnewline
47 & 81.3 & - & - & - & - & - & - & - \tabularnewline
48 & 88.6 & - & - & - & - & - & - & - \tabularnewline
49 & 132.7 & 125.0114 & 99.3022 & 150.7205 & 0.2789 & 0.9972 & 0.4188 & 0.9972 \tabularnewline
50 & 132.9 & 117.0123 & 91.3022 & 142.7224 & 0.1129 & 0.1159 & 0.8181 & 0.9848 \tabularnewline
51 & 134.4 & 111.19 & 83.6682 & 138.7118 & 0.0492 & 0.061 & 0.3958 & 0.9462 \tabularnewline
52 & 103.7 & 105.1976 & 76.6577 & 133.7376 & 0.459 & 0.0225 & 0.4671 & 0.8728 \tabularnewline
53 & 119.7 & 108.2846 & 79.5163 & 137.053 & 0.2184 & 0.6226 & 0.6017 & 0.9101 \tabularnewline
54 & 115 & 117.7151 & 88.3669 & 147.0633 & 0.4281 & 0.4473 & 0.3976 & 0.9741 \tabularnewline
55 & 132.9 & 140.0449 & 110.4765 & 169.6132 & 0.3179 & 0.9516 & 0.4642 & 0.9997 \tabularnewline
56 & 108.5 & 109.2719 & 79.523 & 139.0208 & 0.4797 & 0.0598 & 0.7507 & 0.9134 \tabularnewline
57 & 113.9 & 110.8353 & 80.9262 & 140.7445 & 0.4204 & 0.5608 & 0.1493 & 0.9275 \tabularnewline
58 & 142.9 & 144.4653 & 114.4675 & 174.4632 & 0.4593 & 0.9771 & 0.7509 & 0.9999 \tabularnewline
59 & 95.2 & 81.1937 & 51.1194 & 111.2681 & 0.1807 & 0 & 0.4972 & 0.3147 \tabularnewline
60 & 93 & 88.5409 & 58.4132 & 118.6685 & 0.3859 & 0.3324 & 0.4985 & 0.4985 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4089&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]88.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]127.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]105.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]114.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]106.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]104.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]121.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]141.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]126.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]134.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]81.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]88.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]132.7[/C][C]125.0114[/C][C]99.3022[/C][C]150.7205[/C][C]0.2789[/C][C]0.9972[/C][C]0.4188[/C][C]0.9972[/C][/ROW]
[ROW][C]50[/C][C]132.9[/C][C]117.0123[/C][C]91.3022[/C][C]142.7224[/C][C]0.1129[/C][C]0.1159[/C][C]0.8181[/C][C]0.9848[/C][/ROW]
[ROW][C]51[/C][C]134.4[/C][C]111.19[/C][C]83.6682[/C][C]138.7118[/C][C]0.0492[/C][C]0.061[/C][C]0.3958[/C][C]0.9462[/C][/ROW]
[ROW][C]52[/C][C]103.7[/C][C]105.1976[/C][C]76.6577[/C][C]133.7376[/C][C]0.459[/C][C]0.0225[/C][C]0.4671[/C][C]0.8728[/C][/ROW]
[ROW][C]53[/C][C]119.7[/C][C]108.2846[/C][C]79.5163[/C][C]137.053[/C][C]0.2184[/C][C]0.6226[/C][C]0.6017[/C][C]0.9101[/C][/ROW]
[ROW][C]54[/C][C]115[/C][C]117.7151[/C][C]88.3669[/C][C]147.0633[/C][C]0.4281[/C][C]0.4473[/C][C]0.3976[/C][C]0.9741[/C][/ROW]
[ROW][C]55[/C][C]132.9[/C][C]140.0449[/C][C]110.4765[/C][C]169.6132[/C][C]0.3179[/C][C]0.9516[/C][C]0.4642[/C][C]0.9997[/C][/ROW]
[ROW][C]56[/C][C]108.5[/C][C]109.2719[/C][C]79.523[/C][C]139.0208[/C][C]0.4797[/C][C]0.0598[/C][C]0.7507[/C][C]0.9134[/C][/ROW]
[ROW][C]57[/C][C]113.9[/C][C]110.8353[/C][C]80.9262[/C][C]140.7445[/C][C]0.4204[/C][C]0.5608[/C][C]0.1493[/C][C]0.9275[/C][/ROW]
[ROW][C]58[/C][C]142.9[/C][C]144.4653[/C][C]114.4675[/C][C]174.4632[/C][C]0.4593[/C][C]0.9771[/C][C]0.7509[/C][C]0.9999[/C][/ROW]
[ROW][C]59[/C][C]95.2[/C][C]81.1937[/C][C]51.1194[/C][C]111.2681[/C][C]0.1807[/C][C]0[/C][C]0.4972[/C][C]0.3147[/C][/ROW]
[ROW][C]60[/C][C]93[/C][C]88.5409[/C][C]58.4132[/C][C]118.6685[/C][C]0.3859[/C][C]0.3324[/C][C]0.4985[/C][C]0.4985[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4089&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4089&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])
3688.8-------
37127.7-------
38105.1-------
39114.9-------
40106.4-------
41104.5-------
42121.6-------
43141.4-------
4499-------
45126.7-------
46134.1-------
4781.3-------
4888.6-------
49132.7125.011499.3022150.72050.27890.99720.41880.9972
50132.9117.012391.3022142.72240.11290.11590.81810.9848
51134.4111.1983.6682138.71180.04920.0610.39580.9462
52103.7105.197676.6577133.73760.4590.02250.46710.8728
53119.7108.284679.5163137.0530.21840.62260.60170.9101
54115117.715188.3669147.06330.42810.44730.39760.9741
55132.9140.0449110.4765169.61320.31790.95160.46420.9997
56108.5109.271979.523139.02080.47970.05980.75070.9134
57113.9110.835380.9262140.74450.42040.56080.14930.9275
58142.9144.4653114.4675174.46320.45930.97710.75090.9999
5995.281.193751.1194111.26810.180700.49720.3147
609388.540958.4132118.66850.38590.33240.49850.4985







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.10490.06150.005159.1154.92622.2195
500.11210.13580.0113252.419821.0354.5864
510.12630.20870.0174538.703944.8926.7001
520.1384-0.01420.00122.24290.18690.4323
530.13550.10540.0088130.310310.85923.2953
540.1272-0.02310.00197.37170.61430.7838
550.1077-0.0510.004351.04934.25412.0625
560.1389-0.00716e-040.59580.04970.2228
570.13770.02770.00239.39220.78270.8847
580.1059-0.01089e-042.45030.20420.4519
590.1890.17250.0144196.175316.34794.0433
600.17360.05040.004219.88381.6571.2872

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1049 & 0.0615 & 0.0051 & 59.115 & 4.9262 & 2.2195 \tabularnewline
50 & 0.1121 & 0.1358 & 0.0113 & 252.4198 & 21.035 & 4.5864 \tabularnewline
51 & 0.1263 & 0.2087 & 0.0174 & 538.7039 & 44.892 & 6.7001 \tabularnewline
52 & 0.1384 & -0.0142 & 0.0012 & 2.2429 & 0.1869 & 0.4323 \tabularnewline
53 & 0.1355 & 0.1054 & 0.0088 & 130.3103 & 10.8592 & 3.2953 \tabularnewline
54 & 0.1272 & -0.0231 & 0.0019 & 7.3717 & 0.6143 & 0.7838 \tabularnewline
55 & 0.1077 & -0.051 & 0.0043 & 51.0493 & 4.2541 & 2.0625 \tabularnewline
56 & 0.1389 & -0.0071 & 6e-04 & 0.5958 & 0.0497 & 0.2228 \tabularnewline
57 & 0.1377 & 0.0277 & 0.0023 & 9.3922 & 0.7827 & 0.8847 \tabularnewline
58 & 0.1059 & -0.0108 & 9e-04 & 2.4503 & 0.2042 & 0.4519 \tabularnewline
59 & 0.189 & 0.1725 & 0.0144 & 196.1753 & 16.3479 & 4.0433 \tabularnewline
60 & 0.1736 & 0.0504 & 0.0042 & 19.8838 & 1.657 & 1.2872 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4089&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.1049[/C][C]0.0615[/C][C]0.0051[/C][C]59.115[/C][C]4.9262[/C][C]2.2195[/C][/ROW]
[ROW][C]50[/C][C]0.1121[/C][C]0.1358[/C][C]0.0113[/C][C]252.4198[/C][C]21.035[/C][C]4.5864[/C][/ROW]
[ROW][C]51[/C][C]0.1263[/C][C]0.2087[/C][C]0.0174[/C][C]538.7039[/C][C]44.892[/C][C]6.7001[/C][/ROW]
[ROW][C]52[/C][C]0.1384[/C][C]-0.0142[/C][C]0.0012[/C][C]2.2429[/C][C]0.1869[/C][C]0.4323[/C][/ROW]
[ROW][C]53[/C][C]0.1355[/C][C]0.1054[/C][C]0.0088[/C][C]130.3103[/C][C]10.8592[/C][C]3.2953[/C][/ROW]
[ROW][C]54[/C][C]0.1272[/C][C]-0.0231[/C][C]0.0019[/C][C]7.3717[/C][C]0.6143[/C][C]0.7838[/C][/ROW]
[ROW][C]55[/C][C]0.1077[/C][C]-0.051[/C][C]0.0043[/C][C]51.0493[/C][C]4.2541[/C][C]2.0625[/C][/ROW]
[ROW][C]56[/C][C]0.1389[/C][C]-0.0071[/C][C]6e-04[/C][C]0.5958[/C][C]0.0497[/C][C]0.2228[/C][/ROW]
[ROW][C]57[/C][C]0.1377[/C][C]0.0277[/C][C]0.0023[/C][C]9.3922[/C][C]0.7827[/C][C]0.8847[/C][/ROW]
[ROW][C]58[/C][C]0.1059[/C][C]-0.0108[/C][C]9e-04[/C][C]2.4503[/C][C]0.2042[/C][C]0.4519[/C][/ROW]
[ROW][C]59[/C][C]0.189[/C][C]0.1725[/C][C]0.0144[/C][C]196.1753[/C][C]16.3479[/C][C]4.0433[/C][/ROW]
[ROW][C]60[/C][C]0.1736[/C][C]0.0504[/C][C]0.0042[/C][C]19.8838[/C][C]1.657[/C][C]1.2872[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4089&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4089&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.10490.06150.005159.1154.92622.2195
500.11210.13580.0113252.419821.0354.5864
510.12630.20870.0174538.703944.8926.7001
520.1384-0.01420.00122.24290.18690.4323
530.13550.10540.0088130.310310.85923.2953
540.1272-0.02310.00197.37170.61430.7838
550.1077-0.0510.004351.04934.25412.0625
560.1389-0.00716e-040.59580.04970.2228
570.13770.02770.00239.39220.78270.8847
580.1059-0.01089e-042.45030.20420.4519
590.1890.17250.0144196.175316.34794.0433
600.17360.05040.004219.88381.6571.2872



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