Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 13 Dec 2007 05:02:28 -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/13/t11975464779fre0x3wzu9ni0y.htm/, Retrieved Sun, 05 May 2024 13:04:11 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3462, Retrieved Sun, 05 May 2024 13:04:11 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsforecast
Estimated Impact191
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [paper forecast] [2007-12-13 12:02:28] [8ce1ad2ac57e06e10fb37a1292ae8cb6] [Current]
Feedback Forum

Post a new message
Dataseries X:
98.6
98
106.8
96.6
100.1
107.7
91.5
97.8
107.4
117.5
105.6
97.4
99.5
98
104.3
100.6
101.1
103.9
96.9
95.5
108.4
117
103.8
100.8
110.6
104
112.6
107.3
98.9
109.8
104.9
102.2
123.9
124.9
112.7
121.9
100.6
104.3
120.4
107.5
102.9
125.6
107.5
108.8
128.4
121.1
119.5
128.7
108.7
105.5
119.8
111.3
110.6
120.1
97.5
107.7
127.3
117.2
119.8
116.2
111
112.4
130.6
109.1
118.8
123.9
101.6
112.8
128
129.6
125.8
119.5
115.7
113.6
129.7
112
116.8
126.3
112.9
115.9




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 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 & 4 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=3462&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]4 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=3462&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3462&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 time4 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[68])
56107.7-------
57127.3-------
58117.2-------
59119.8-------
60116.2-------
61111-------
62112.4-------
63130.6-------
64109.1-------
65118.8-------
66123.9-------
67101.6-------
68112.8-------
69128132.3057122.1949142.41650.2020.99990.83410.9999
70129.6123.5803113.3006133.86010.12550.19970.88810.9801
71125.8121.9752111.5828132.36760.23530.07520.65920.9582
72119.5123.2813111.2274135.33530.26930.34110.87520.9558
73115.7109.119696.8426121.39660.14670.04870.3820.2784
74113.6113.2032100.766125.64040.47510.3470.55040.5253
75129.7130.3085117.2357143.38130.46370.99390.48260.9957
76112111.142497.8749124.410.44960.00310.61860.4033
77116.8114.8677101.4515128.28390.38890.66240.28280.6187
78126.3128.2551114.5364141.97380.390.94910.73310.9864
79112.9107.53193.665121.39710.2240.0040.79910.2282
80115.9113.946499.9626127.93020.39210.55830.56380.5638

\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[68]) \tabularnewline
56 & 107.7 & - & - & - & - & - & - & - \tabularnewline
57 & 127.3 & - & - & - & - & - & - & - \tabularnewline
58 & 117.2 & - & - & - & - & - & - & - \tabularnewline
59 & 119.8 & - & - & - & - & - & - & - \tabularnewline
60 & 116.2 & - & - & - & - & - & - & - \tabularnewline
61 & 111 & - & - & - & - & - & - & - \tabularnewline
62 & 112.4 & - & - & - & - & - & - & - \tabularnewline
63 & 130.6 & - & - & - & - & - & - & - \tabularnewline
64 & 109.1 & - & - & - & - & - & - & - \tabularnewline
65 & 118.8 & - & - & - & - & - & - & - \tabularnewline
66 & 123.9 & - & - & - & - & - & - & - \tabularnewline
67 & 101.6 & - & - & - & - & - & - & - \tabularnewline
68 & 112.8 & - & - & - & - & - & - & - \tabularnewline
69 & 128 & 132.3057 & 122.1949 & 142.4165 & 0.202 & 0.9999 & 0.8341 & 0.9999 \tabularnewline
70 & 129.6 & 123.5803 & 113.3006 & 133.8601 & 0.1255 & 0.1997 & 0.8881 & 0.9801 \tabularnewline
71 & 125.8 & 121.9752 & 111.5828 & 132.3676 & 0.2353 & 0.0752 & 0.6592 & 0.9582 \tabularnewline
72 & 119.5 & 123.2813 & 111.2274 & 135.3353 & 0.2693 & 0.3411 & 0.8752 & 0.9558 \tabularnewline
73 & 115.7 & 109.1196 & 96.8426 & 121.3966 & 0.1467 & 0.0487 & 0.382 & 0.2784 \tabularnewline
74 & 113.6 & 113.2032 & 100.766 & 125.6404 & 0.4751 & 0.347 & 0.5504 & 0.5253 \tabularnewline
75 & 129.7 & 130.3085 & 117.2357 & 143.3813 & 0.4637 & 0.9939 & 0.4826 & 0.9957 \tabularnewline
76 & 112 & 111.1424 & 97.8749 & 124.41 & 0.4496 & 0.0031 & 0.6186 & 0.4033 \tabularnewline
77 & 116.8 & 114.8677 & 101.4515 & 128.2839 & 0.3889 & 0.6624 & 0.2828 & 0.6187 \tabularnewline
78 & 126.3 & 128.2551 & 114.5364 & 141.9738 & 0.39 & 0.9491 & 0.7331 & 0.9864 \tabularnewline
79 & 112.9 & 107.531 & 93.665 & 121.3971 & 0.224 & 0.004 & 0.7991 & 0.2282 \tabularnewline
80 & 115.9 & 113.9464 & 99.9626 & 127.9302 & 0.3921 & 0.5583 & 0.5638 & 0.5638 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3462&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[68])[/C][/ROW]
[ROW][C]56[/C][C]107.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]127.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]119.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]116.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]111[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]112.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]130.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]109.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]118.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]123.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]101.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]112.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]128[/C][C]132.3057[/C][C]122.1949[/C][C]142.4165[/C][C]0.202[/C][C]0.9999[/C][C]0.8341[/C][C]0.9999[/C][/ROW]
[ROW][C]70[/C][C]129.6[/C][C]123.5803[/C][C]113.3006[/C][C]133.8601[/C][C]0.1255[/C][C]0.1997[/C][C]0.8881[/C][C]0.9801[/C][/ROW]
[ROW][C]71[/C][C]125.8[/C][C]121.9752[/C][C]111.5828[/C][C]132.3676[/C][C]0.2353[/C][C]0.0752[/C][C]0.6592[/C][C]0.9582[/C][/ROW]
[ROW][C]72[/C][C]119.5[/C][C]123.2813[/C][C]111.2274[/C][C]135.3353[/C][C]0.2693[/C][C]0.3411[/C][C]0.8752[/C][C]0.9558[/C][/ROW]
[ROW][C]73[/C][C]115.7[/C][C]109.1196[/C][C]96.8426[/C][C]121.3966[/C][C]0.1467[/C][C]0.0487[/C][C]0.382[/C][C]0.2784[/C][/ROW]
[ROW][C]74[/C][C]113.6[/C][C]113.2032[/C][C]100.766[/C][C]125.6404[/C][C]0.4751[/C][C]0.347[/C][C]0.5504[/C][C]0.5253[/C][/ROW]
[ROW][C]75[/C][C]129.7[/C][C]130.3085[/C][C]117.2357[/C][C]143.3813[/C][C]0.4637[/C][C]0.9939[/C][C]0.4826[/C][C]0.9957[/C][/ROW]
[ROW][C]76[/C][C]112[/C][C]111.1424[/C][C]97.8749[/C][C]124.41[/C][C]0.4496[/C][C]0.0031[/C][C]0.6186[/C][C]0.4033[/C][/ROW]
[ROW][C]77[/C][C]116.8[/C][C]114.8677[/C][C]101.4515[/C][C]128.2839[/C][C]0.3889[/C][C]0.6624[/C][C]0.2828[/C][C]0.6187[/C][/ROW]
[ROW][C]78[/C][C]126.3[/C][C]128.2551[/C][C]114.5364[/C][C]141.9738[/C][C]0.39[/C][C]0.9491[/C][C]0.7331[/C][C]0.9864[/C][/ROW]
[ROW][C]79[/C][C]112.9[/C][C]107.531[/C][C]93.665[/C][C]121.3971[/C][C]0.224[/C][C]0.004[/C][C]0.7991[/C][C]0.2282[/C][/ROW]
[ROW][C]80[/C][C]115.9[/C][C]113.9464[/C][C]99.9626[/C][C]127.9302[/C][C]0.3921[/C][C]0.5583[/C][C]0.5638[/C][C]0.5638[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3462&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3462&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[68])
56107.7-------
57127.3-------
58117.2-------
59119.8-------
60116.2-------
61111-------
62112.4-------
63130.6-------
64109.1-------
65118.8-------
66123.9-------
67101.6-------
68112.8-------
69128132.3057122.1949142.41650.2020.99990.83410.9999
70129.6123.5803113.3006133.86010.12550.19970.88810.9801
71125.8121.9752111.5828132.36760.23530.07520.65920.9582
72119.5123.2813111.2274135.33530.26930.34110.87520.9558
73115.7109.119696.8426121.39660.14670.04870.3820.2784
74113.6113.2032100.766125.64040.47510.3470.55040.5253
75129.7130.3085117.2357143.38130.46370.99390.48260.9957
76112111.142497.8749124.410.44960.00310.61860.4033
77116.8114.8677101.4515128.28390.38890.66240.28280.6187
78126.3128.2551114.5364141.97380.390.94910.73310.9864
79112.9107.53193.665121.39710.2240.0040.79910.2282
80115.9113.946499.9626127.93020.39210.55830.56380.5638







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.039-0.03250.002718.53921.54491.243
700.04240.04870.004136.23633.01971.7377
710.04350.03140.002614.6291.21911.1041
720.0499-0.03070.002614.29851.19151.0916
730.05740.06030.00543.30133.60841.8996
740.05610.00353e-040.15740.01310.1145
750.0512-0.00474e-040.37030.03090.1757
760.06090.00776e-040.73540.06130.2476
770.05960.01680.00143.73390.31120.5578
780.0546-0.01520.00133.82230.31850.5644
790.06580.04990.004228.82582.40221.5499
800.06260.01710.00143.81640.3180.5639

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.039 & -0.0325 & 0.0027 & 18.5392 & 1.5449 & 1.243 \tabularnewline
70 & 0.0424 & 0.0487 & 0.0041 & 36.2363 & 3.0197 & 1.7377 \tabularnewline
71 & 0.0435 & 0.0314 & 0.0026 & 14.629 & 1.2191 & 1.1041 \tabularnewline
72 & 0.0499 & -0.0307 & 0.0026 & 14.2985 & 1.1915 & 1.0916 \tabularnewline
73 & 0.0574 & 0.0603 & 0.005 & 43.3013 & 3.6084 & 1.8996 \tabularnewline
74 & 0.0561 & 0.0035 & 3e-04 & 0.1574 & 0.0131 & 0.1145 \tabularnewline
75 & 0.0512 & -0.0047 & 4e-04 & 0.3703 & 0.0309 & 0.1757 \tabularnewline
76 & 0.0609 & 0.0077 & 6e-04 & 0.7354 & 0.0613 & 0.2476 \tabularnewline
77 & 0.0596 & 0.0168 & 0.0014 & 3.7339 & 0.3112 & 0.5578 \tabularnewline
78 & 0.0546 & -0.0152 & 0.0013 & 3.8223 & 0.3185 & 0.5644 \tabularnewline
79 & 0.0658 & 0.0499 & 0.0042 & 28.8258 & 2.4022 & 1.5499 \tabularnewline
80 & 0.0626 & 0.0171 & 0.0014 & 3.8164 & 0.318 & 0.5639 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3462&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]69[/C][C]0.039[/C][C]-0.0325[/C][C]0.0027[/C][C]18.5392[/C][C]1.5449[/C][C]1.243[/C][/ROW]
[ROW][C]70[/C][C]0.0424[/C][C]0.0487[/C][C]0.0041[/C][C]36.2363[/C][C]3.0197[/C][C]1.7377[/C][/ROW]
[ROW][C]71[/C][C]0.0435[/C][C]0.0314[/C][C]0.0026[/C][C]14.629[/C][C]1.2191[/C][C]1.1041[/C][/ROW]
[ROW][C]72[/C][C]0.0499[/C][C]-0.0307[/C][C]0.0026[/C][C]14.2985[/C][C]1.1915[/C][C]1.0916[/C][/ROW]
[ROW][C]73[/C][C]0.0574[/C][C]0.0603[/C][C]0.005[/C][C]43.3013[/C][C]3.6084[/C][C]1.8996[/C][/ROW]
[ROW][C]74[/C][C]0.0561[/C][C]0.0035[/C][C]3e-04[/C][C]0.1574[/C][C]0.0131[/C][C]0.1145[/C][/ROW]
[ROW][C]75[/C][C]0.0512[/C][C]-0.0047[/C][C]4e-04[/C][C]0.3703[/C][C]0.0309[/C][C]0.1757[/C][/ROW]
[ROW][C]76[/C][C]0.0609[/C][C]0.0077[/C][C]6e-04[/C][C]0.7354[/C][C]0.0613[/C][C]0.2476[/C][/ROW]
[ROW][C]77[/C][C]0.0596[/C][C]0.0168[/C][C]0.0014[/C][C]3.7339[/C][C]0.3112[/C][C]0.5578[/C][/ROW]
[ROW][C]78[/C][C]0.0546[/C][C]-0.0152[/C][C]0.0013[/C][C]3.8223[/C][C]0.3185[/C][C]0.5644[/C][/ROW]
[ROW][C]79[/C][C]0.0658[/C][C]0.0499[/C][C]0.0042[/C][C]28.8258[/C][C]2.4022[/C][C]1.5499[/C][/ROW]
[ROW][C]80[/C][C]0.0626[/C][C]0.0171[/C][C]0.0014[/C][C]3.8164[/C][C]0.318[/C][C]0.5639[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3462&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3462&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
690.039-0.03250.002718.53921.54491.243
700.04240.04870.004136.23633.01971.7377
710.04350.03140.002614.6291.21911.1041
720.0499-0.03070.002614.29851.19151.0916
730.05740.06030.00543.30133.60841.8996
740.05610.00353e-040.15740.01310.1145
750.0512-0.00474e-040.37030.03090.1757
760.06090.00776e-040.73540.06130.2476
770.05960.01680.00143.73390.31120.5578
780.0546-0.01520.00133.82230.31850.5644
790.06580.04990.004228.82582.40221.5499
800.06260.01710.00143.81640.3180.5639



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