Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 12 Dec 2007 09:02:56 -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/12/t1197474569y8ovkeh0r2f9o6m.htm/, Retrieved Thu, 02 May 2024 21:26:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3232, Retrieved Thu, 02 May 2024 21:26:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact210
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [t-k+3] [2007-12-12 16:02:56] [dd38921fafddee0dfc20da83e9650a2a] [Current]
Feedback Forum

Post a new message
Dataseries X:
8
8.1
8.3
8.2
8.1
7.7
7.6
7.7
8.2
8.4
8.4
8.6
8.4
8.5
8.7
8.7
8.6
7.4
7.3
7.4
9
9.2
9.2
8.5
8.3
8.3
8.6
8.6
8.5
8.1
8.1
8
8.6
8.7
8.7
8.6
8.4
8.4
8.7
8.7
8.5
8.3
8.3
8.3
8.1
8.2
8.1
8.1
7.9
7.7
8.1
8
7.7
7.8
7.6
7.4
7.7
7.8
7.5
7.2




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3232&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[39])
278.6-------
288.6-------
298.5-------
308.1-------
318.1-------
328-------
338.6-------
348.7-------
358.7-------
368.6-------
378.4-------
388.4-------
398.7-------
408.78.80788.31939.29630.33270.66730.79780.6673
418.58.78278.06059.5050.22140.58880.77860.5888
428.38.66687.76619.56740.21240.64170.89130.4712
438.38.59487.66459.52510.26730.73270.85140.4123
448.38.53287.58549.48030.3150.6850.86480.3647
458.18.62297.66059.58520.14350.74460.51860.4376
468.28.70127.67439.72810.16940.87440.50090.5009
478.18.71437.60899.81970.1380.81910.51010.5101
488.18.75197.56919.93470.140.860.59940.5343
497.98.65057.42939.87160.11420.81150.65620.4683
507.78.64337.39459.89220.06940.87830.64870.4646
518.18.7527.478410.02560.15790.94730.53190.5319

\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[39]) \tabularnewline
27 & 8.6 & - & - & - & - & - & - & - \tabularnewline
28 & 8.6 & - & - & - & - & - & - & - \tabularnewline
29 & 8.5 & - & - & - & - & - & - & - \tabularnewline
30 & 8.1 & - & - & - & - & - & - & - \tabularnewline
31 & 8.1 & - & - & - & - & - & - & - \tabularnewline
32 & 8 & - & - & - & - & - & - & - \tabularnewline
33 & 8.6 & - & - & - & - & - & - & - \tabularnewline
34 & 8.7 & - & - & - & - & - & - & - \tabularnewline
35 & 8.7 & - & - & - & - & - & - & - \tabularnewline
36 & 8.6 & - & - & - & - & - & - & - \tabularnewline
37 & 8.4 & - & - & - & - & - & - & - \tabularnewline
38 & 8.4 & - & - & - & - & - & - & - \tabularnewline
39 & 8.7 & - & - & - & - & - & - & - \tabularnewline
40 & 8.7 & 8.8078 & 8.3193 & 9.2963 & 0.3327 & 0.6673 & 0.7978 & 0.6673 \tabularnewline
41 & 8.5 & 8.7827 & 8.0605 & 9.505 & 0.2214 & 0.5888 & 0.7786 & 0.5888 \tabularnewline
42 & 8.3 & 8.6668 & 7.7661 & 9.5674 & 0.2124 & 0.6417 & 0.8913 & 0.4712 \tabularnewline
43 & 8.3 & 8.5948 & 7.6645 & 9.5251 & 0.2673 & 0.7327 & 0.8514 & 0.4123 \tabularnewline
44 & 8.3 & 8.5328 & 7.5854 & 9.4803 & 0.315 & 0.685 & 0.8648 & 0.3647 \tabularnewline
45 & 8.1 & 8.6229 & 7.6605 & 9.5852 & 0.1435 & 0.7446 & 0.5186 & 0.4376 \tabularnewline
46 & 8.2 & 8.7012 & 7.6743 & 9.7281 & 0.1694 & 0.8744 & 0.5009 & 0.5009 \tabularnewline
47 & 8.1 & 8.7143 & 7.6089 & 9.8197 & 0.138 & 0.8191 & 0.5101 & 0.5101 \tabularnewline
48 & 8.1 & 8.7519 & 7.5691 & 9.9347 & 0.14 & 0.86 & 0.5994 & 0.5343 \tabularnewline
49 & 7.9 & 8.6505 & 7.4293 & 9.8716 & 0.1142 & 0.8115 & 0.6562 & 0.4683 \tabularnewline
50 & 7.7 & 8.6433 & 7.3945 & 9.8922 & 0.0694 & 0.8783 & 0.6487 & 0.4646 \tabularnewline
51 & 8.1 & 8.752 & 7.4784 & 10.0256 & 0.1579 & 0.9473 & 0.5319 & 0.5319 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3232&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[39])[/C][/ROW]
[ROW][C]27[/C][C]8.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]8.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]8.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]8.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]8.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]8.7[/C][C]8.8078[/C][C]8.3193[/C][C]9.2963[/C][C]0.3327[/C][C]0.6673[/C][C]0.7978[/C][C]0.6673[/C][/ROW]
[ROW][C]41[/C][C]8.5[/C][C]8.7827[/C][C]8.0605[/C][C]9.505[/C][C]0.2214[/C][C]0.5888[/C][C]0.7786[/C][C]0.5888[/C][/ROW]
[ROW][C]42[/C][C]8.3[/C][C]8.6668[/C][C]7.7661[/C][C]9.5674[/C][C]0.2124[/C][C]0.6417[/C][C]0.8913[/C][C]0.4712[/C][/ROW]
[ROW][C]43[/C][C]8.3[/C][C]8.5948[/C][C]7.6645[/C][C]9.5251[/C][C]0.2673[/C][C]0.7327[/C][C]0.8514[/C][C]0.4123[/C][/ROW]
[ROW][C]44[/C][C]8.3[/C][C]8.5328[/C][C]7.5854[/C][C]9.4803[/C][C]0.315[/C][C]0.685[/C][C]0.8648[/C][C]0.3647[/C][/ROW]
[ROW][C]45[/C][C]8.1[/C][C]8.6229[/C][C]7.6605[/C][C]9.5852[/C][C]0.1435[/C][C]0.7446[/C][C]0.5186[/C][C]0.4376[/C][/ROW]
[ROW][C]46[/C][C]8.2[/C][C]8.7012[/C][C]7.6743[/C][C]9.7281[/C][C]0.1694[/C][C]0.8744[/C][C]0.5009[/C][C]0.5009[/C][/ROW]
[ROW][C]47[/C][C]8.1[/C][C]8.7143[/C][C]7.6089[/C][C]9.8197[/C][C]0.138[/C][C]0.8191[/C][C]0.5101[/C][C]0.5101[/C][/ROW]
[ROW][C]48[/C][C]8.1[/C][C]8.7519[/C][C]7.5691[/C][C]9.9347[/C][C]0.14[/C][C]0.86[/C][C]0.5994[/C][C]0.5343[/C][/ROW]
[ROW][C]49[/C][C]7.9[/C][C]8.6505[/C][C]7.4293[/C][C]9.8716[/C][C]0.1142[/C][C]0.8115[/C][C]0.6562[/C][C]0.4683[/C][/ROW]
[ROW][C]50[/C][C]7.7[/C][C]8.6433[/C][C]7.3945[/C][C]9.8922[/C][C]0.0694[/C][C]0.8783[/C][C]0.6487[/C][C]0.4646[/C][/ROW]
[ROW][C]51[/C][C]8.1[/C][C]8.752[/C][C]7.4784[/C][C]10.0256[/C][C]0.1579[/C][C]0.9473[/C][C]0.5319[/C][C]0.5319[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3232&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3232&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[39])
278.6-------
288.6-------
298.5-------
308.1-------
318.1-------
328-------
338.6-------
348.7-------
358.7-------
368.6-------
378.4-------
388.4-------
398.7-------
408.78.80788.31939.29630.33270.66730.79780.6673
418.58.78278.06059.5050.22140.58880.77860.5888
428.38.66687.76619.56740.21240.64170.89130.4712
438.38.59487.66459.52510.26730.73270.85140.4123
448.38.53287.58549.48030.3150.6850.86480.3647
458.18.62297.66059.58520.14350.74460.51860.4376
468.28.70127.67439.72810.16940.87440.50090.5009
478.18.71437.60899.81970.1380.81910.51010.5101
488.18.75197.56919.93470.140.860.59940.5343
497.98.65057.42939.87160.11420.81150.65620.4683
507.78.64337.39459.89220.06940.87830.64870.4646
518.18.7527.478410.02560.15790.94730.53190.5319







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
400.0283-0.01220.0010.01160.0010.0311
410.042-0.03220.00270.07990.00670.0816
420.053-0.04230.00350.13450.01120.1059
430.0552-0.03430.00290.08690.00720.0851
440.0566-0.02730.00230.05420.00450.0672
450.0569-0.06060.00510.27340.02280.1509
460.0602-0.05760.00480.25120.02090.1447
470.0647-0.07050.00590.37740.03140.1773
480.069-0.07450.00620.4250.03540.1882
490.072-0.08680.00720.56320.04690.2166
500.0737-0.10910.00910.88990.07420.2723
510.0742-0.07450.00620.4250.03540.1882

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
40 & 0.0283 & -0.0122 & 0.001 & 0.0116 & 0.001 & 0.0311 \tabularnewline
41 & 0.042 & -0.0322 & 0.0027 & 0.0799 & 0.0067 & 0.0816 \tabularnewline
42 & 0.053 & -0.0423 & 0.0035 & 0.1345 & 0.0112 & 0.1059 \tabularnewline
43 & 0.0552 & -0.0343 & 0.0029 & 0.0869 & 0.0072 & 0.0851 \tabularnewline
44 & 0.0566 & -0.0273 & 0.0023 & 0.0542 & 0.0045 & 0.0672 \tabularnewline
45 & 0.0569 & -0.0606 & 0.0051 & 0.2734 & 0.0228 & 0.1509 \tabularnewline
46 & 0.0602 & -0.0576 & 0.0048 & 0.2512 & 0.0209 & 0.1447 \tabularnewline
47 & 0.0647 & -0.0705 & 0.0059 & 0.3774 & 0.0314 & 0.1773 \tabularnewline
48 & 0.069 & -0.0745 & 0.0062 & 0.425 & 0.0354 & 0.1882 \tabularnewline
49 & 0.072 & -0.0868 & 0.0072 & 0.5632 & 0.0469 & 0.2166 \tabularnewline
50 & 0.0737 & -0.1091 & 0.0091 & 0.8899 & 0.0742 & 0.2723 \tabularnewline
51 & 0.0742 & -0.0745 & 0.0062 & 0.425 & 0.0354 & 0.1882 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3232&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]40[/C][C]0.0283[/C][C]-0.0122[/C][C]0.001[/C][C]0.0116[/C][C]0.001[/C][C]0.0311[/C][/ROW]
[ROW][C]41[/C][C]0.042[/C][C]-0.0322[/C][C]0.0027[/C][C]0.0799[/C][C]0.0067[/C][C]0.0816[/C][/ROW]
[ROW][C]42[/C][C]0.053[/C][C]-0.0423[/C][C]0.0035[/C][C]0.1345[/C][C]0.0112[/C][C]0.1059[/C][/ROW]
[ROW][C]43[/C][C]0.0552[/C][C]-0.0343[/C][C]0.0029[/C][C]0.0869[/C][C]0.0072[/C][C]0.0851[/C][/ROW]
[ROW][C]44[/C][C]0.0566[/C][C]-0.0273[/C][C]0.0023[/C][C]0.0542[/C][C]0.0045[/C][C]0.0672[/C][/ROW]
[ROW][C]45[/C][C]0.0569[/C][C]-0.0606[/C][C]0.0051[/C][C]0.2734[/C][C]0.0228[/C][C]0.1509[/C][/ROW]
[ROW][C]46[/C][C]0.0602[/C][C]-0.0576[/C][C]0.0048[/C][C]0.2512[/C][C]0.0209[/C][C]0.1447[/C][/ROW]
[ROW][C]47[/C][C]0.0647[/C][C]-0.0705[/C][C]0.0059[/C][C]0.3774[/C][C]0.0314[/C][C]0.1773[/C][/ROW]
[ROW][C]48[/C][C]0.069[/C][C]-0.0745[/C][C]0.0062[/C][C]0.425[/C][C]0.0354[/C][C]0.1882[/C][/ROW]
[ROW][C]49[/C][C]0.072[/C][C]-0.0868[/C][C]0.0072[/C][C]0.5632[/C][C]0.0469[/C][C]0.2166[/C][/ROW]
[ROW][C]50[/C][C]0.0737[/C][C]-0.1091[/C][C]0.0091[/C][C]0.8899[/C][C]0.0742[/C][C]0.2723[/C][/ROW]
[ROW][C]51[/C][C]0.0742[/C][C]-0.0745[/C][C]0.0062[/C][C]0.425[/C][C]0.0354[/C][C]0.1882[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3232&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3232&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
400.0283-0.01220.0010.01160.0010.0311
410.042-0.03220.00270.07990.00670.0816
420.053-0.04230.00350.13450.01120.1059
430.0552-0.03430.00290.08690.00720.0851
440.0566-0.02730.00230.05420.00450.0672
450.0569-0.06060.00510.27340.02280.1509
460.0602-0.05760.00480.25120.02090.1447
470.0647-0.07050.00590.37740.03140.1773
480.069-0.07450.00620.4250.03540.1882
490.072-0.08680.00720.56320.04690.2166
500.0737-0.10910.00910.88990.07420.2723
510.0742-0.07450.00620.4250.03540.1882



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