Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 08 Dec 2007 09:36:57 -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/08/t1197131006tm97qcx7k368k9v.htm/, Retrieved Mon, 29 Apr 2024 00:38:00 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2940, Retrieved Mon, 29 Apr 2024 00:38:00 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsExtrapolation Forecasts Q1
Estimated Impact201
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Extrapolation For...] [2007-12-08 16:36:57] [0cecb02636bfe8ebd97a7fef80b2b9e7] [Current]
Feedback Forum

Post a new message
Dataseries X:
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
111,4
113
107,5
95,9
106,3
105,2
117,2
106,9
108,2
113
96,1
100,2
108,1




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2940&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])
36107.9-------
37101.8-------
38104.4-------
3993.4-------
40100.1-------
4198.5-------
42112.9-------
43101.4-------
44107.1-------
45110.8-------
4690.3-------
4795.5-------
48111.4-------
49113104.124294.5775114.63460.04890.08740.66760.0874
50107.5106.057695.8152117.39490.40150.1150.61280.1778
5195.994.443284.6172105.41010.39730.00980.57390.0012
52106.3100.880790.2365112.78040.1860.7940.55120.0416
53105.299.0488.4476110.9010.15440.11510.53560.0206
54117.2113.3332101.1649126.96510.28910.87890.52480.6095
55106.9101.673490.7255113.94230.20190.00660.51740.0601
56108.2107.302395.7364120.26550.4460.52430.51220.2678
57113110.94798.9805124.36030.38210.65590.50860.4736
5896.190.38480.6328101.31450.152700.5061e-04
59100.295.562485.2509107.12110.21580.46370.50420.0036
60108.1111.451199.4244124.93250.31310.94910.5030.503

\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 & 107.9 & - & - & - & - & - & - & - \tabularnewline
37 & 101.8 & - & - & - & - & - & - & - \tabularnewline
38 & 104.4 & - & - & - & - & - & - & - \tabularnewline
39 & 93.4 & - & - & - & - & - & - & - \tabularnewline
40 & 100.1 & - & - & - & - & - & - & - \tabularnewline
41 & 98.5 & - & - & - & - & - & - & - \tabularnewline
42 & 112.9 & - & - & - & - & - & - & - \tabularnewline
43 & 101.4 & - & - & - & - & - & - & - \tabularnewline
44 & 107.1 & - & - & - & - & - & - & - \tabularnewline
45 & 110.8 & - & - & - & - & - & - & - \tabularnewline
46 & 90.3 & - & - & - & - & - & - & - \tabularnewline
47 & 95.5 & - & - & - & - & - & - & - \tabularnewline
48 & 111.4 & - & - & - & - & - & - & - \tabularnewline
49 & 113 & 104.1242 & 94.5775 & 114.6346 & 0.0489 & 0.0874 & 0.6676 & 0.0874 \tabularnewline
50 & 107.5 & 106.0576 & 95.8152 & 117.3949 & 0.4015 & 0.115 & 0.6128 & 0.1778 \tabularnewline
51 & 95.9 & 94.4432 & 84.6172 & 105.4101 & 0.3973 & 0.0098 & 0.5739 & 0.0012 \tabularnewline
52 & 106.3 & 100.8807 & 90.2365 & 112.7804 & 0.186 & 0.794 & 0.5512 & 0.0416 \tabularnewline
53 & 105.2 & 99.04 & 88.4476 & 110.901 & 0.1544 & 0.1151 & 0.5356 & 0.0206 \tabularnewline
54 & 117.2 & 113.3332 & 101.1649 & 126.9651 & 0.2891 & 0.8789 & 0.5248 & 0.6095 \tabularnewline
55 & 106.9 & 101.6734 & 90.7255 & 113.9423 & 0.2019 & 0.0066 & 0.5174 & 0.0601 \tabularnewline
56 & 108.2 & 107.3023 & 95.7364 & 120.2655 & 0.446 & 0.5243 & 0.5122 & 0.2678 \tabularnewline
57 & 113 & 110.947 & 98.9805 & 124.3603 & 0.3821 & 0.6559 & 0.5086 & 0.4736 \tabularnewline
58 & 96.1 & 90.384 & 80.6328 & 101.3145 & 0.1527 & 0 & 0.506 & 1e-04 \tabularnewline
59 & 100.2 & 95.5624 & 85.2509 & 107.1211 & 0.2158 & 0.4637 & 0.5042 & 0.0036 \tabularnewline
60 & 108.1 & 111.4511 & 99.4244 & 124.9325 & 0.3131 & 0.9491 & 0.503 & 0.503 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2940&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]107.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]101.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]104.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]93.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]100.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]98.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]112.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]101.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]107.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]110.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]90.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]95.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]111.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]113[/C][C]104.1242[/C][C]94.5775[/C][C]114.6346[/C][C]0.0489[/C][C]0.0874[/C][C]0.6676[/C][C]0.0874[/C][/ROW]
[ROW][C]50[/C][C]107.5[/C][C]106.0576[/C][C]95.8152[/C][C]117.3949[/C][C]0.4015[/C][C]0.115[/C][C]0.6128[/C][C]0.1778[/C][/ROW]
[ROW][C]51[/C][C]95.9[/C][C]94.4432[/C][C]84.6172[/C][C]105.4101[/C][C]0.3973[/C][C]0.0098[/C][C]0.5739[/C][C]0.0012[/C][/ROW]
[ROW][C]52[/C][C]106.3[/C][C]100.8807[/C][C]90.2365[/C][C]112.7804[/C][C]0.186[/C][C]0.794[/C][C]0.5512[/C][C]0.0416[/C][/ROW]
[ROW][C]53[/C][C]105.2[/C][C]99.04[/C][C]88.4476[/C][C]110.901[/C][C]0.1544[/C][C]0.1151[/C][C]0.5356[/C][C]0.0206[/C][/ROW]
[ROW][C]54[/C][C]117.2[/C][C]113.3332[/C][C]101.1649[/C][C]126.9651[/C][C]0.2891[/C][C]0.8789[/C][C]0.5248[/C][C]0.6095[/C][/ROW]
[ROW][C]55[/C][C]106.9[/C][C]101.6734[/C][C]90.7255[/C][C]113.9423[/C][C]0.2019[/C][C]0.0066[/C][C]0.5174[/C][C]0.0601[/C][/ROW]
[ROW][C]56[/C][C]108.2[/C][C]107.3023[/C][C]95.7364[/C][C]120.2655[/C][C]0.446[/C][C]0.5243[/C][C]0.5122[/C][C]0.2678[/C][/ROW]
[ROW][C]57[/C][C]113[/C][C]110.947[/C][C]98.9805[/C][C]124.3603[/C][C]0.3821[/C][C]0.6559[/C][C]0.5086[/C][C]0.4736[/C][/ROW]
[ROW][C]58[/C][C]96.1[/C][C]90.384[/C][C]80.6328[/C][C]101.3145[/C][C]0.1527[/C][C]0[/C][C]0.506[/C][C]1e-04[/C][/ROW]
[ROW][C]59[/C][C]100.2[/C][C]95.5624[/C][C]85.2509[/C][C]107.1211[/C][C]0.2158[/C][C]0.4637[/C][C]0.5042[/C][C]0.0036[/C][/ROW]
[ROW][C]60[/C][C]108.1[/C][C]111.4511[/C][C]99.4244[/C][C]124.9325[/C][C]0.3131[/C][C]0.9491[/C][C]0.503[/C][C]0.503[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2940&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2940&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])
36107.9-------
37101.8-------
38104.4-------
3993.4-------
40100.1-------
4198.5-------
42112.9-------
43101.4-------
44107.1-------
45110.8-------
4690.3-------
4795.5-------
48111.4-------
49113104.124294.5775114.63460.04890.08740.66760.0874
50107.5106.057695.8152117.39490.40150.1150.61280.1778
5195.994.443284.6172105.41010.39730.00980.57390.0012
52106.3100.880790.2365112.78040.1860.7940.55120.0416
53105.299.0488.4476110.9010.15440.11510.53560.0206
54117.2113.3332101.1649126.96510.28910.87890.52480.6095
55106.9101.673490.7255113.94230.20190.00660.51740.0601
56108.2107.302395.7364120.26550.4460.52430.51220.2678
57113110.94798.9805124.36030.38210.65590.50860.4736
5896.190.38480.6328101.31450.152700.5061e-04
59100.295.562485.2509107.12110.21580.46370.50420.0036
60108.1111.451199.4244124.93250.31310.94910.5030.503







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.05150.08520.007178.77916.56492.5622
500.05450.01360.00112.08040.17340.4164
510.05920.01540.00132.12240.17690.4206
520.06020.05370.004529.36932.44741.5644
530.06110.06220.005237.94543.16211.7782
540.06140.03410.002814.95241.2461.1163
550.06160.05140.004327.31782.27651.5088
560.06160.00847e-040.80580.06720.2591
570.06170.01850.00154.21480.35120.5926
580.06170.06320.005332.67252.72271.6501
590.06170.04850.00421.50741.79231.3388
600.0617-0.03010.002511.22960.93580.9674

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0515 & 0.0852 & 0.0071 & 78.7791 & 6.5649 & 2.5622 \tabularnewline
50 & 0.0545 & 0.0136 & 0.0011 & 2.0804 & 0.1734 & 0.4164 \tabularnewline
51 & 0.0592 & 0.0154 & 0.0013 & 2.1224 & 0.1769 & 0.4206 \tabularnewline
52 & 0.0602 & 0.0537 & 0.0045 & 29.3693 & 2.4474 & 1.5644 \tabularnewline
53 & 0.0611 & 0.0622 & 0.0052 & 37.9454 & 3.1621 & 1.7782 \tabularnewline
54 & 0.0614 & 0.0341 & 0.0028 & 14.9524 & 1.246 & 1.1163 \tabularnewline
55 & 0.0616 & 0.0514 & 0.0043 & 27.3178 & 2.2765 & 1.5088 \tabularnewline
56 & 0.0616 & 0.0084 & 7e-04 & 0.8058 & 0.0672 & 0.2591 \tabularnewline
57 & 0.0617 & 0.0185 & 0.0015 & 4.2148 & 0.3512 & 0.5926 \tabularnewline
58 & 0.0617 & 0.0632 & 0.0053 & 32.6725 & 2.7227 & 1.6501 \tabularnewline
59 & 0.0617 & 0.0485 & 0.004 & 21.5074 & 1.7923 & 1.3388 \tabularnewline
60 & 0.0617 & -0.0301 & 0.0025 & 11.2296 & 0.9358 & 0.9674 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2940&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.0515[/C][C]0.0852[/C][C]0.0071[/C][C]78.7791[/C][C]6.5649[/C][C]2.5622[/C][/ROW]
[ROW][C]50[/C][C]0.0545[/C][C]0.0136[/C][C]0.0011[/C][C]2.0804[/C][C]0.1734[/C][C]0.4164[/C][/ROW]
[ROW][C]51[/C][C]0.0592[/C][C]0.0154[/C][C]0.0013[/C][C]2.1224[/C][C]0.1769[/C][C]0.4206[/C][/ROW]
[ROW][C]52[/C][C]0.0602[/C][C]0.0537[/C][C]0.0045[/C][C]29.3693[/C][C]2.4474[/C][C]1.5644[/C][/ROW]
[ROW][C]53[/C][C]0.0611[/C][C]0.0622[/C][C]0.0052[/C][C]37.9454[/C][C]3.1621[/C][C]1.7782[/C][/ROW]
[ROW][C]54[/C][C]0.0614[/C][C]0.0341[/C][C]0.0028[/C][C]14.9524[/C][C]1.246[/C][C]1.1163[/C][/ROW]
[ROW][C]55[/C][C]0.0616[/C][C]0.0514[/C][C]0.0043[/C][C]27.3178[/C][C]2.2765[/C][C]1.5088[/C][/ROW]
[ROW][C]56[/C][C]0.0616[/C][C]0.0084[/C][C]7e-04[/C][C]0.8058[/C][C]0.0672[/C][C]0.2591[/C][/ROW]
[ROW][C]57[/C][C]0.0617[/C][C]0.0185[/C][C]0.0015[/C][C]4.2148[/C][C]0.3512[/C][C]0.5926[/C][/ROW]
[ROW][C]58[/C][C]0.0617[/C][C]0.0632[/C][C]0.0053[/C][C]32.6725[/C][C]2.7227[/C][C]1.6501[/C][/ROW]
[ROW][C]59[/C][C]0.0617[/C][C]0.0485[/C][C]0.004[/C][C]21.5074[/C][C]1.7923[/C][C]1.3388[/C][/ROW]
[ROW][C]60[/C][C]0.0617[/C][C]-0.0301[/C][C]0.0025[/C][C]11.2296[/C][C]0.9358[/C][C]0.9674[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2940&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2940&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.05150.08520.007178.77916.56492.5622
500.05450.01360.00112.08040.17340.4164
510.05920.01540.00132.12240.17690.4206
520.06020.05370.004529.36932.44741.5644
530.06110.06220.005237.94543.16211.7782
540.06140.03410.002814.95241.2461.1163
550.06160.05140.004327.31782.27651.5088
560.06160.00847e-040.80580.06720.2591
570.06170.01850.00154.21480.35120.5926
580.06170.06320.005332.67252.72271.6501
590.06170.04850.00421.50741.79231.3388
600.0617-0.03010.002511.22960.93580.9674



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