Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 07 Dec 2007 07:47:40 -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/07/t1197038069d5vmd6wqf0ex0v9.htm/, Retrieved Sun, 28 Apr 2024 21:12:34 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2857, Retrieved Sun, 28 Apr 2024 21:12:34 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsWS9, Q1, Intermediaire goederen, marleen
Estimated Impact164
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [WS9 Q1 Intermedia...] [2007-12-07 14:47:40] [87b6915e48e03972eaa4a0940182012f] [Current]
Feedback Forum

Post a new message
Dataseries X:
99
115,4
106,9
107,1
99,3
99,2
108,3
105,6
99,5
107,4
93,1
88,1
110,7
113,1
99,6
93,6
98,6
99,6
114,3
107,8
101,2
112,5
100,5
93,9
116,2
112
106,4
95,7
96
95,8
103
102,2
98,4
111,4
86,6
91,3
107,9
101,8
104,4
93,4
100,1
98,5
112,9
101,4
107,1
110,8
90,3
95,5




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2857&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]2 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=2857&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2857&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 time2 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[36])
2493.9-------
25116.2-------
26112-------
27106.4-------
2895.7-------
2996-------
3095.8-------
31103-------
32102.2-------
3398.4-------
34111.4-------
3586.6-------
3691.3-------
37107.9111.520699.9183124.47010.29180.99890.23940.9989
38101.8111.965299.4178126.09620.07930.71360.49810.9979
39104.4104.262991.9897118.17360.49230.63570.38170.9661
4093.496.330884.9612109.22190.32790.10990.53820.7778
41100.194.831883.5494107.63780.210.58670.4290.7056
4298.596.503585.022109.53550.3820.29430.54210.7831
43112.9102.128389.9525115.95230.06340.69650.45080.9376
44101.4102.860990.5941116.78870.41860.07890.53710.9481
45107.197.776986.1071111.02820.0840.2960.46330.831
46110.8111.992398.6217127.17570.43880.73620.53050.9962
4790.386.175975.883497.86450.244600.47170.1951
4895.591.689680.7359104.12930.27410.58670.52450.5245

\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[36]) \tabularnewline
24 & 93.9 & - & - & - & - & - & - & - \tabularnewline
25 & 116.2 & - & - & - & - & - & - & - \tabularnewline
26 & 112 & - & - & - & - & - & - & - \tabularnewline
27 & 106.4 & - & - & - & - & - & - & - \tabularnewline
28 & 95.7 & - & - & - & - & - & - & - \tabularnewline
29 & 96 & - & - & - & - & - & - & - \tabularnewline
30 & 95.8 & - & - & - & - & - & - & - \tabularnewline
31 & 103 & - & - & - & - & - & - & - \tabularnewline
32 & 102.2 & - & - & - & - & - & - & - \tabularnewline
33 & 98.4 & - & - & - & - & - & - & - \tabularnewline
34 & 111.4 & - & - & - & - & - & - & - \tabularnewline
35 & 86.6 & - & - & - & - & - & - & - \tabularnewline
36 & 91.3 & - & - & - & - & - & - & - \tabularnewline
37 & 107.9 & 111.5206 & 99.9183 & 124.4701 & 0.2918 & 0.9989 & 0.2394 & 0.9989 \tabularnewline
38 & 101.8 & 111.9652 & 99.4178 & 126.0962 & 0.0793 & 0.7136 & 0.4981 & 0.9979 \tabularnewline
39 & 104.4 & 104.2629 & 91.9897 & 118.1736 & 0.4923 & 0.6357 & 0.3817 & 0.9661 \tabularnewline
40 & 93.4 & 96.3308 & 84.9612 & 109.2219 & 0.3279 & 0.1099 & 0.5382 & 0.7778 \tabularnewline
41 & 100.1 & 94.8318 & 83.5494 & 107.6378 & 0.21 & 0.5867 & 0.429 & 0.7056 \tabularnewline
42 & 98.5 & 96.5035 & 85.022 & 109.5355 & 0.382 & 0.2943 & 0.5421 & 0.7831 \tabularnewline
43 & 112.9 & 102.1283 & 89.9525 & 115.9523 & 0.0634 & 0.6965 & 0.4508 & 0.9376 \tabularnewline
44 & 101.4 & 102.8609 & 90.5941 & 116.7887 & 0.4186 & 0.0789 & 0.5371 & 0.9481 \tabularnewline
45 & 107.1 & 97.7769 & 86.1071 & 111.0282 & 0.084 & 0.296 & 0.4633 & 0.831 \tabularnewline
46 & 110.8 & 111.9923 & 98.6217 & 127.1757 & 0.4388 & 0.7362 & 0.5305 & 0.9962 \tabularnewline
47 & 90.3 & 86.1759 & 75.8834 & 97.8645 & 0.2446 & 0 & 0.4717 & 0.1951 \tabularnewline
48 & 95.5 & 91.6896 & 80.7359 & 104.1293 & 0.2741 & 0.5867 & 0.5245 & 0.5245 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2857&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[36])[/C][/ROW]
[ROW][C]24[/C][C]93.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]116.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]26[/C][C]112[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]27[/C][C]106.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]95.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]95.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]103[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]102.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]98.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]111.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]86.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]91.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]107.9[/C][C]111.5206[/C][C]99.9183[/C][C]124.4701[/C][C]0.2918[/C][C]0.9989[/C][C]0.2394[/C][C]0.9989[/C][/ROW]
[ROW][C]38[/C][C]101.8[/C][C]111.9652[/C][C]99.4178[/C][C]126.0962[/C][C]0.0793[/C][C]0.7136[/C][C]0.4981[/C][C]0.9979[/C][/ROW]
[ROW][C]39[/C][C]104.4[/C][C]104.2629[/C][C]91.9897[/C][C]118.1736[/C][C]0.4923[/C][C]0.6357[/C][C]0.3817[/C][C]0.9661[/C][/ROW]
[ROW][C]40[/C][C]93.4[/C][C]96.3308[/C][C]84.9612[/C][C]109.2219[/C][C]0.3279[/C][C]0.1099[/C][C]0.5382[/C][C]0.7778[/C][/ROW]
[ROW][C]41[/C][C]100.1[/C][C]94.8318[/C][C]83.5494[/C][C]107.6378[/C][C]0.21[/C][C]0.5867[/C][C]0.429[/C][C]0.7056[/C][/ROW]
[ROW][C]42[/C][C]98.5[/C][C]96.5035[/C][C]85.022[/C][C]109.5355[/C][C]0.382[/C][C]0.2943[/C][C]0.5421[/C][C]0.7831[/C][/ROW]
[ROW][C]43[/C][C]112.9[/C][C]102.1283[/C][C]89.9525[/C][C]115.9523[/C][C]0.0634[/C][C]0.6965[/C][C]0.4508[/C][C]0.9376[/C][/ROW]
[ROW][C]44[/C][C]101.4[/C][C]102.8609[/C][C]90.5941[/C][C]116.7887[/C][C]0.4186[/C][C]0.0789[/C][C]0.5371[/C][C]0.9481[/C][/ROW]
[ROW][C]45[/C][C]107.1[/C][C]97.7769[/C][C]86.1071[/C][C]111.0282[/C][C]0.084[/C][C]0.296[/C][C]0.4633[/C][C]0.831[/C][/ROW]
[ROW][C]46[/C][C]110.8[/C][C]111.9923[/C][C]98.6217[/C][C]127.1757[/C][C]0.4388[/C][C]0.7362[/C][C]0.5305[/C][C]0.9962[/C][/ROW]
[ROW][C]47[/C][C]90.3[/C][C]86.1759[/C][C]75.8834[/C][C]97.8645[/C][C]0.2446[/C][C]0[/C][C]0.4717[/C][C]0.1951[/C][/ROW]
[ROW][C]48[/C][C]95.5[/C][C]91.6896[/C][C]80.7359[/C][C]104.1293[/C][C]0.2741[/C][C]0.5867[/C][C]0.5245[/C][C]0.5245[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2857&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2857&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[36])
2493.9-------
25116.2-------
26112-------
27106.4-------
2895.7-------
2996-------
3095.8-------
31103-------
32102.2-------
3398.4-------
34111.4-------
3586.6-------
3691.3-------
37107.9111.520699.9183124.47010.29180.99890.23940.9989
38101.8111.965299.4178126.09620.07930.71360.49810.9979
39104.4104.262991.9897118.17360.49230.63570.38170.9661
4093.496.330884.9612109.22190.32790.10990.53820.7778
41100.194.831883.5494107.63780.210.58670.4290.7056
4298.596.503585.022109.53550.3820.29430.54210.7831
43112.9102.128389.9525115.95230.06340.69650.45080.9376
44101.4102.860990.5941116.78870.41860.07890.53710.9481
45107.197.776986.1071111.02820.0840.2960.46330.831
46110.8111.992398.6217127.17570.43880.73620.53050.9962
4790.386.175975.883497.86450.244600.47170.1951
4895.591.689680.7359104.12930.27410.58670.52450.5245







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
370.0592-0.03250.002713.10881.09241.0452
380.0644-0.09080.0076103.33168.6112.9344
390.06810.00131e-040.01880.00160.0396
400.0683-0.03040.00258.58930.71580.846
410.06890.05560.004627.75382.31281.5208
420.06890.02070.00173.98610.33220.5763
430.06910.10550.0088116.02869.66913.1095
440.0691-0.01420.00122.13430.17790.4217
450.06910.09540.007986.92037.24342.6913
460.0692-0.01069e-041.42170.11850.3442
470.06920.04790.00417.0081.41731.1905
480.06920.04160.003514.51941.211.1

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
37 & 0.0592 & -0.0325 & 0.0027 & 13.1088 & 1.0924 & 1.0452 \tabularnewline
38 & 0.0644 & -0.0908 & 0.0076 & 103.3316 & 8.611 & 2.9344 \tabularnewline
39 & 0.0681 & 0.0013 & 1e-04 & 0.0188 & 0.0016 & 0.0396 \tabularnewline
40 & 0.0683 & -0.0304 & 0.0025 & 8.5893 & 0.7158 & 0.846 \tabularnewline
41 & 0.0689 & 0.0556 & 0.0046 & 27.7538 & 2.3128 & 1.5208 \tabularnewline
42 & 0.0689 & 0.0207 & 0.0017 & 3.9861 & 0.3322 & 0.5763 \tabularnewline
43 & 0.0691 & 0.1055 & 0.0088 & 116.0286 & 9.6691 & 3.1095 \tabularnewline
44 & 0.0691 & -0.0142 & 0.0012 & 2.1343 & 0.1779 & 0.4217 \tabularnewline
45 & 0.0691 & 0.0954 & 0.0079 & 86.9203 & 7.2434 & 2.6913 \tabularnewline
46 & 0.0692 & -0.0106 & 9e-04 & 1.4217 & 0.1185 & 0.3442 \tabularnewline
47 & 0.0692 & 0.0479 & 0.004 & 17.008 & 1.4173 & 1.1905 \tabularnewline
48 & 0.0692 & 0.0416 & 0.0035 & 14.5194 & 1.21 & 1.1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2857&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]37[/C][C]0.0592[/C][C]-0.0325[/C][C]0.0027[/C][C]13.1088[/C][C]1.0924[/C][C]1.0452[/C][/ROW]
[ROW][C]38[/C][C]0.0644[/C][C]-0.0908[/C][C]0.0076[/C][C]103.3316[/C][C]8.611[/C][C]2.9344[/C][/ROW]
[ROW][C]39[/C][C]0.0681[/C][C]0.0013[/C][C]1e-04[/C][C]0.0188[/C][C]0.0016[/C][C]0.0396[/C][/ROW]
[ROW][C]40[/C][C]0.0683[/C][C]-0.0304[/C][C]0.0025[/C][C]8.5893[/C][C]0.7158[/C][C]0.846[/C][/ROW]
[ROW][C]41[/C][C]0.0689[/C][C]0.0556[/C][C]0.0046[/C][C]27.7538[/C][C]2.3128[/C][C]1.5208[/C][/ROW]
[ROW][C]42[/C][C]0.0689[/C][C]0.0207[/C][C]0.0017[/C][C]3.9861[/C][C]0.3322[/C][C]0.5763[/C][/ROW]
[ROW][C]43[/C][C]0.0691[/C][C]0.1055[/C][C]0.0088[/C][C]116.0286[/C][C]9.6691[/C][C]3.1095[/C][/ROW]
[ROW][C]44[/C][C]0.0691[/C][C]-0.0142[/C][C]0.0012[/C][C]2.1343[/C][C]0.1779[/C][C]0.4217[/C][/ROW]
[ROW][C]45[/C][C]0.0691[/C][C]0.0954[/C][C]0.0079[/C][C]86.9203[/C][C]7.2434[/C][C]2.6913[/C][/ROW]
[ROW][C]46[/C][C]0.0692[/C][C]-0.0106[/C][C]9e-04[/C][C]1.4217[/C][C]0.1185[/C][C]0.3442[/C][/ROW]
[ROW][C]47[/C][C]0.0692[/C][C]0.0479[/C][C]0.004[/C][C]17.008[/C][C]1.4173[/C][C]1.1905[/C][/ROW]
[ROW][C]48[/C][C]0.0692[/C][C]0.0416[/C][C]0.0035[/C][C]14.5194[/C][C]1.21[/C][C]1.1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2857&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2857&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
370.0592-0.03250.002713.10881.09241.0452
380.0644-0.09080.0076103.33168.6112.9344
390.06810.00131e-040.01880.00160.0396
400.0683-0.03040.00258.58930.71580.846
410.06890.05560.004627.75382.31281.5208
420.06890.02070.00173.98610.33220.5763
430.06910.10550.0088116.02869.66913.1095
440.0691-0.01420.00122.13430.17790.4217
450.06910.09540.007986.92037.24342.6913
460.0692-0.01069e-041.42170.11850.3442
470.06920.04790.00417.0081.41731.1905
480.06920.04160.003514.51941.211.1



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