Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 17 Dec 2007 03:32:01 -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/17/t1197886506rfqdx5itq9ozyy6.htm/, Retrieved Fri, 03 May 2024 16:20:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4324, Retrieved Fri, 03 May 2024 16:20:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact190
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-17 10:32:01] [d9ccf6bb4f7743d5d52b9a9a992ccbd5] [Current]
Feedback Forum

Post a new message
Dataseries X:
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 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=4324&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=4324&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4324&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.9-------
37115.9-------
38104.2-------
39113.4-------
40112.2-------
41100.8-------
42107.3-------
43126.6-------
44102.9-------
45117.9-------
46128.8-------
4787.5-------
4893.8-------
49122.7117.0699105.755128.38480.164710.58031
50126.2110.521199.205121.83720.00330.01750.86320.9981
51124.6112.7826100.9281124.63710.02540.01330.45930.9992
52116.7111.938498.7249125.15190.240.03020.48450.9964
53115.2100.647387.4031113.89150.01560.00880.4910.8445
54111.1106.464992.7208120.2090.25430.10640.45260.9645
55129.9123.5178109.3832137.65240.18810.95750.33451
56113.3106.418892.1979120.63980.17156e-040.68620.959
57118.5111.797.1778126.22210.17940.41450.20140.9922
58133.5127.8808113.1967142.56490.22660.89470.45121
59102.188.592473.8095103.37540.036700.55760.245
60102.492.780277.8341107.72630.10360.11080.44680.4468

\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.9 & - & - & - & - & - & - & - \tabularnewline
37 & 115.9 & - & - & - & - & - & - & - \tabularnewline
38 & 104.2 & - & - & - & - & - & - & - \tabularnewline
39 & 113.4 & - & - & - & - & - & - & - \tabularnewline
40 & 112.2 & - & - & - & - & - & - & - \tabularnewline
41 & 100.8 & - & - & - & - & - & - & - \tabularnewline
42 & 107.3 & - & - & - & - & - & - & - \tabularnewline
43 & 126.6 & - & - & - & - & - & - & - \tabularnewline
44 & 102.9 & - & - & - & - & - & - & - \tabularnewline
45 & 117.9 & - & - & - & - & - & - & - \tabularnewline
46 & 128.8 & - & - & - & - & - & - & - \tabularnewline
47 & 87.5 & - & - & - & - & - & - & - \tabularnewline
48 & 93.8 & - & - & - & - & - & - & - \tabularnewline
49 & 122.7 & 117.0699 & 105.755 & 128.3848 & 0.1647 & 1 & 0.5803 & 1 \tabularnewline
50 & 126.2 & 110.5211 & 99.205 & 121.8372 & 0.0033 & 0.0175 & 0.8632 & 0.9981 \tabularnewline
51 & 124.6 & 112.7826 & 100.9281 & 124.6371 & 0.0254 & 0.0133 & 0.4593 & 0.9992 \tabularnewline
52 & 116.7 & 111.9384 & 98.7249 & 125.1519 & 0.24 & 0.0302 & 0.4845 & 0.9964 \tabularnewline
53 & 115.2 & 100.6473 & 87.4031 & 113.8915 & 0.0156 & 0.0088 & 0.491 & 0.8445 \tabularnewline
54 & 111.1 & 106.4649 & 92.7208 & 120.209 & 0.2543 & 0.1064 & 0.4526 & 0.9645 \tabularnewline
55 & 129.9 & 123.5178 & 109.3832 & 137.6524 & 0.1881 & 0.9575 & 0.3345 & 1 \tabularnewline
56 & 113.3 & 106.4188 & 92.1979 & 120.6398 & 0.1715 & 6e-04 & 0.6862 & 0.959 \tabularnewline
57 & 118.5 & 111.7 & 97.1778 & 126.2221 & 0.1794 & 0.4145 & 0.2014 & 0.9922 \tabularnewline
58 & 133.5 & 127.8808 & 113.1967 & 142.5649 & 0.2266 & 0.8947 & 0.4512 & 1 \tabularnewline
59 & 102.1 & 88.5924 & 73.8095 & 103.3754 & 0.0367 & 0 & 0.5576 & 0.245 \tabularnewline
60 & 102.4 & 92.7802 & 77.8341 & 107.7263 & 0.1036 & 0.1108 & 0.4468 & 0.4468 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4324&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.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]115.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]104.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]113.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]112.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]100.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]107.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]126.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]102.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]117.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]128.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]87.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]93.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]122.7[/C][C]117.0699[/C][C]105.755[/C][C]128.3848[/C][C]0.1647[/C][C]1[/C][C]0.5803[/C][C]1[/C][/ROW]
[ROW][C]50[/C][C]126.2[/C][C]110.5211[/C][C]99.205[/C][C]121.8372[/C][C]0.0033[/C][C]0.0175[/C][C]0.8632[/C][C]0.9981[/C][/ROW]
[ROW][C]51[/C][C]124.6[/C][C]112.7826[/C][C]100.9281[/C][C]124.6371[/C][C]0.0254[/C][C]0.0133[/C][C]0.4593[/C][C]0.9992[/C][/ROW]
[ROW][C]52[/C][C]116.7[/C][C]111.9384[/C][C]98.7249[/C][C]125.1519[/C][C]0.24[/C][C]0.0302[/C][C]0.4845[/C][C]0.9964[/C][/ROW]
[ROW][C]53[/C][C]115.2[/C][C]100.6473[/C][C]87.4031[/C][C]113.8915[/C][C]0.0156[/C][C]0.0088[/C][C]0.491[/C][C]0.8445[/C][/ROW]
[ROW][C]54[/C][C]111.1[/C][C]106.4649[/C][C]92.7208[/C][C]120.209[/C][C]0.2543[/C][C]0.1064[/C][C]0.4526[/C][C]0.9645[/C][/ROW]
[ROW][C]55[/C][C]129.9[/C][C]123.5178[/C][C]109.3832[/C][C]137.6524[/C][C]0.1881[/C][C]0.9575[/C][C]0.3345[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]113.3[/C][C]106.4188[/C][C]92.1979[/C][C]120.6398[/C][C]0.1715[/C][C]6e-04[/C][C]0.6862[/C][C]0.959[/C][/ROW]
[ROW][C]57[/C][C]118.5[/C][C]111.7[/C][C]97.1778[/C][C]126.2221[/C][C]0.1794[/C][C]0.4145[/C][C]0.2014[/C][C]0.9922[/C][/ROW]
[ROW][C]58[/C][C]133.5[/C][C]127.8808[/C][C]113.1967[/C][C]142.5649[/C][C]0.2266[/C][C]0.8947[/C][C]0.4512[/C][C]1[/C][/ROW]
[ROW][C]59[/C][C]102.1[/C][C]88.5924[/C][C]73.8095[/C][C]103.3754[/C][C]0.0367[/C][C]0[/C][C]0.5576[/C][C]0.245[/C][/ROW]
[ROW][C]60[/C][C]102.4[/C][C]92.7802[/C][C]77.8341[/C][C]107.7263[/C][C]0.1036[/C][C]0.1108[/C][C]0.4468[/C][C]0.4468[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4324&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4324&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.9-------
37115.9-------
38104.2-------
39113.4-------
40112.2-------
41100.8-------
42107.3-------
43126.6-------
44102.9-------
45117.9-------
46128.8-------
4787.5-------
4893.8-------
49122.7117.0699105.755128.38480.164710.58031
50126.2110.521199.205121.83720.00330.01750.86320.9981
51124.6112.7826100.9281124.63710.02540.01330.45930.9992
52116.7111.938498.7249125.15190.240.03020.48450.9964
53115.2100.647387.4031113.89150.01560.00880.4910.8445
54111.1106.464992.7208120.2090.25430.10640.45260.9645
55129.9123.5178109.3832137.65240.18810.95750.33451
56113.3106.418892.1979120.63980.17156e-040.68620.959
57118.5111.797.1778126.22210.17940.41450.20140.9922
58133.5127.8808113.1967142.56490.22660.89470.45121
59102.188.592473.8095103.37540.036700.55760.245
60102.492.780277.8341107.72630.10360.11080.44680.4468







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.04930.04810.00431.6982.64151.6253
500.05220.14190.0118245.827520.48564.5261
510.05360.10480.0087139.650811.63763.4114
520.06020.04250.003522.67281.88941.3746
530.06710.14460.012211.78117.64844.201
540.06590.04350.003621.48441.79041.338
550.05840.05170.004340.73273.39441.8424
560.06820.06470.005447.35063.94591.9864
570.06630.06090.005146.24043.85341.963
580.05860.04390.003731.57522.63131.6221
590.08510.15250.0127182.454615.20463.8993
600.08220.10370.008692.54027.71172.777

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0493 & 0.0481 & 0.004 & 31.698 & 2.6415 & 1.6253 \tabularnewline
50 & 0.0522 & 0.1419 & 0.0118 & 245.8275 & 20.4856 & 4.5261 \tabularnewline
51 & 0.0536 & 0.1048 & 0.0087 & 139.6508 & 11.6376 & 3.4114 \tabularnewline
52 & 0.0602 & 0.0425 & 0.0035 & 22.6728 & 1.8894 & 1.3746 \tabularnewline
53 & 0.0671 & 0.1446 & 0.012 & 211.781 & 17.6484 & 4.201 \tabularnewline
54 & 0.0659 & 0.0435 & 0.0036 & 21.4844 & 1.7904 & 1.338 \tabularnewline
55 & 0.0584 & 0.0517 & 0.0043 & 40.7327 & 3.3944 & 1.8424 \tabularnewline
56 & 0.0682 & 0.0647 & 0.0054 & 47.3506 & 3.9459 & 1.9864 \tabularnewline
57 & 0.0663 & 0.0609 & 0.0051 & 46.2404 & 3.8534 & 1.963 \tabularnewline
58 & 0.0586 & 0.0439 & 0.0037 & 31.5752 & 2.6313 & 1.6221 \tabularnewline
59 & 0.0851 & 0.1525 & 0.0127 & 182.4546 & 15.2046 & 3.8993 \tabularnewline
60 & 0.0822 & 0.1037 & 0.0086 & 92.5402 & 7.7117 & 2.777 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4324&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.0493[/C][C]0.0481[/C][C]0.004[/C][C]31.698[/C][C]2.6415[/C][C]1.6253[/C][/ROW]
[ROW][C]50[/C][C]0.0522[/C][C]0.1419[/C][C]0.0118[/C][C]245.8275[/C][C]20.4856[/C][C]4.5261[/C][/ROW]
[ROW][C]51[/C][C]0.0536[/C][C]0.1048[/C][C]0.0087[/C][C]139.6508[/C][C]11.6376[/C][C]3.4114[/C][/ROW]
[ROW][C]52[/C][C]0.0602[/C][C]0.0425[/C][C]0.0035[/C][C]22.6728[/C][C]1.8894[/C][C]1.3746[/C][/ROW]
[ROW][C]53[/C][C]0.0671[/C][C]0.1446[/C][C]0.012[/C][C]211.781[/C][C]17.6484[/C][C]4.201[/C][/ROW]
[ROW][C]54[/C][C]0.0659[/C][C]0.0435[/C][C]0.0036[/C][C]21.4844[/C][C]1.7904[/C][C]1.338[/C][/ROW]
[ROW][C]55[/C][C]0.0584[/C][C]0.0517[/C][C]0.0043[/C][C]40.7327[/C][C]3.3944[/C][C]1.8424[/C][/ROW]
[ROW][C]56[/C][C]0.0682[/C][C]0.0647[/C][C]0.0054[/C][C]47.3506[/C][C]3.9459[/C][C]1.9864[/C][/ROW]
[ROW][C]57[/C][C]0.0663[/C][C]0.0609[/C][C]0.0051[/C][C]46.2404[/C][C]3.8534[/C][C]1.963[/C][/ROW]
[ROW][C]58[/C][C]0.0586[/C][C]0.0439[/C][C]0.0037[/C][C]31.5752[/C][C]2.6313[/C][C]1.6221[/C][/ROW]
[ROW][C]59[/C][C]0.0851[/C][C]0.1525[/C][C]0.0127[/C][C]182.4546[/C][C]15.2046[/C][C]3.8993[/C][/ROW]
[ROW][C]60[/C][C]0.0822[/C][C]0.1037[/C][C]0.0086[/C][C]92.5402[/C][C]7.7117[/C][C]2.777[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4324&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4324&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.04930.04810.00431.6982.64151.6253
500.05220.14190.0118245.827520.48564.5261
510.05360.10480.0087139.650811.63763.4114
520.06020.04250.003522.67281.88941.3746
530.06710.14460.012211.78117.64844.201
540.06590.04350.003621.48441.79041.338
550.05840.05170.004340.73273.39441.8424
560.06820.06470.005447.35063.94591.9864
570.06630.06090.005146.24043.85341.963
580.05860.04390.003731.57522.63131.6221
590.08510.15250.0127182.454615.20463.8993
600.08220.10370.008692.54027.71172.777



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')