Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 24 Dec 2010 13:24:15 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/24/t1293196930qudxlznt63p1qcw.htm/, Retrieved Tue, 30 Apr 2024 02:07:58 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114915, Retrieved Tue, 30 Apr 2024 02:07:58 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact118
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [paperFOR_uit] [2010-12-24 12:00:28] [7e261c986c934df955dd3ac53e9d45c6]
-   PD    [ARIMA Forecasting] [paperFOR_uit] [2010-12-24 13:24:15] [13dfa60174f50d862e8699db2153bfc5] [Current]
-   P       [ARIMA Forecasting] [paperFOR_uit] [2010-12-24 14:18:13] [7e261c986c934df955dd3ac53e9d45c6]
-   P         [ARIMA Forecasting] [Kristof Nagels] [2010-12-24 15:18:48] [8441f95c4a5787a301bc621ebc7904ca]
Feedback Forum

Post a new message
Dataseries X:
15
14.4
13
13.7
13.6
15.2
12.9
14
14.1
13.2
11.3
13.3
14.4
13.3
11.6
13.2
13.1
14.6
14
14.3
13.8
13.7
11
14.4
15.6
13.7
12.6
13.2
13.3
14.3
14
13.4
13.9
13.7
10.5
14.5
15
13.5
13.5
13.2
13.8
16.2
14.7
13.9
16
14.4
12.3
15.9
15.9
15.5
15.1
14.5
15.1
17.4
16.2
15.6
17.2
14.9
13.8
17.5
16.2
17.5
16.6
16.2
16.6
19.6
15.9
18
18.3
16.3
14.9
18.2
18.4
18.5
16
17.4
17.2
19.6
17.2
18.3
19.3
18.1
16.2
18.4
20.5
19
16.5
18.7
19
19.2
20.5
19.3
20.6
20.1
16.1
20.4
19.7
15.6
14.4
13.7
14.1
15
14.2
13.6
15.4
14.8
12.5
16.2
16.1
16
15.8
15.2
15.7
18.9
17.4
17
19.8
17.7
16
19.6
19.7




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 5 seconds \tabularnewline
R Server & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114915&T=0

[TABLE]
[ROW][C]Summary of computational 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]5 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114915&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114915&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 computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk







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[109])
9719.7-------
9815.6-------
9914.4-------
10013.7-------
10114.1-------
10215-------
10314.2-------
10413.6-------
10515.4-------
10614.8-------
10712.5-------
10816.2-------
10916.1-------
1101614.009912.615.41980.00280.00180.01350.0018
11115.813.083811.472314.69525e-042e-040.05471e-04
11215.212.738710.784714.69260.00680.00110.16744e-04
11315.712.845810.36415.32760.01210.03150.1610.0051
11418.914.864312.154317.57440.00180.27280.46090.1858
11517.412.83599.768715.90310.00181e-040.19170.0185
1161713.03769.647416.42770.0110.00580.37250.0383
11719.814.27610.657617.89450.00140.070.27130.1616
11817.713.16249.24817.07680.01154e-040.20610.0707
1191611.52217.369815.67440.01730.00180.32220.0154
12019.614.692110.322219.06210.01390.27870.24940.2639
12119.715.206710.596519.8170.0280.03090.35210.3521

\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[109]) \tabularnewline
97 & 19.7 & - & - & - & - & - & - & - \tabularnewline
98 & 15.6 & - & - & - & - & - & - & - \tabularnewline
99 & 14.4 & - & - & - & - & - & - & - \tabularnewline
100 & 13.7 & - & - & - & - & - & - & - \tabularnewline
101 & 14.1 & - & - & - & - & - & - & - \tabularnewline
102 & 15 & - & - & - & - & - & - & - \tabularnewline
103 & 14.2 & - & - & - & - & - & - & - \tabularnewline
104 & 13.6 & - & - & - & - & - & - & - \tabularnewline
105 & 15.4 & - & - & - & - & - & - & - \tabularnewline
106 & 14.8 & - & - & - & - & - & - & - \tabularnewline
107 & 12.5 & - & - & - & - & - & - & - \tabularnewline
108 & 16.2 & - & - & - & - & - & - & - \tabularnewline
109 & 16.1 & - & - & - & - & - & - & - \tabularnewline
110 & 16 & 14.0099 & 12.6 & 15.4198 & 0.0028 & 0.0018 & 0.0135 & 0.0018 \tabularnewline
111 & 15.8 & 13.0838 & 11.4723 & 14.6952 & 5e-04 & 2e-04 & 0.0547 & 1e-04 \tabularnewline
112 & 15.2 & 12.7387 & 10.7847 & 14.6926 & 0.0068 & 0.0011 & 0.1674 & 4e-04 \tabularnewline
113 & 15.7 & 12.8458 & 10.364 & 15.3276 & 0.0121 & 0.0315 & 0.161 & 0.0051 \tabularnewline
114 & 18.9 & 14.8643 & 12.1543 & 17.5744 & 0.0018 & 0.2728 & 0.4609 & 0.1858 \tabularnewline
115 & 17.4 & 12.8359 & 9.7687 & 15.9031 & 0.0018 & 1e-04 & 0.1917 & 0.0185 \tabularnewline
116 & 17 & 13.0376 & 9.6474 & 16.4277 & 0.011 & 0.0058 & 0.3725 & 0.0383 \tabularnewline
117 & 19.8 & 14.276 & 10.6576 & 17.8945 & 0.0014 & 0.07 & 0.2713 & 0.1616 \tabularnewline
118 & 17.7 & 13.1624 & 9.248 & 17.0768 & 0.0115 & 4e-04 & 0.2061 & 0.0707 \tabularnewline
119 & 16 & 11.5221 & 7.3698 & 15.6744 & 0.0173 & 0.0018 & 0.3222 & 0.0154 \tabularnewline
120 & 19.6 & 14.6921 & 10.3222 & 19.0621 & 0.0139 & 0.2787 & 0.2494 & 0.2639 \tabularnewline
121 & 19.7 & 15.2067 & 10.5965 & 19.817 & 0.028 & 0.0309 & 0.3521 & 0.3521 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114915&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[109])[/C][/ROW]
[ROW][C]97[/C][C]19.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]15.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]14.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]13.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]14.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]14.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]13.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]15.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]14.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]12.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]16.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]16.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]16[/C][C]14.0099[/C][C]12.6[/C][C]15.4198[/C][C]0.0028[/C][C]0.0018[/C][C]0.0135[/C][C]0.0018[/C][/ROW]
[ROW][C]111[/C][C]15.8[/C][C]13.0838[/C][C]11.4723[/C][C]14.6952[/C][C]5e-04[/C][C]2e-04[/C][C]0.0547[/C][C]1e-04[/C][/ROW]
[ROW][C]112[/C][C]15.2[/C][C]12.7387[/C][C]10.7847[/C][C]14.6926[/C][C]0.0068[/C][C]0.0011[/C][C]0.1674[/C][C]4e-04[/C][/ROW]
[ROW][C]113[/C][C]15.7[/C][C]12.8458[/C][C]10.364[/C][C]15.3276[/C][C]0.0121[/C][C]0.0315[/C][C]0.161[/C][C]0.0051[/C][/ROW]
[ROW][C]114[/C][C]18.9[/C][C]14.8643[/C][C]12.1543[/C][C]17.5744[/C][C]0.0018[/C][C]0.2728[/C][C]0.4609[/C][C]0.1858[/C][/ROW]
[ROW][C]115[/C][C]17.4[/C][C]12.8359[/C][C]9.7687[/C][C]15.9031[/C][C]0.0018[/C][C]1e-04[/C][C]0.1917[/C][C]0.0185[/C][/ROW]
[ROW][C]116[/C][C]17[/C][C]13.0376[/C][C]9.6474[/C][C]16.4277[/C][C]0.011[/C][C]0.0058[/C][C]0.3725[/C][C]0.0383[/C][/ROW]
[ROW][C]117[/C][C]19.8[/C][C]14.276[/C][C]10.6576[/C][C]17.8945[/C][C]0.0014[/C][C]0.07[/C][C]0.2713[/C][C]0.1616[/C][/ROW]
[ROW][C]118[/C][C]17.7[/C][C]13.1624[/C][C]9.248[/C][C]17.0768[/C][C]0.0115[/C][C]4e-04[/C][C]0.2061[/C][C]0.0707[/C][/ROW]
[ROW][C]119[/C][C]16[/C][C]11.5221[/C][C]7.3698[/C][C]15.6744[/C][C]0.0173[/C][C]0.0018[/C][C]0.3222[/C][C]0.0154[/C][/ROW]
[ROW][C]120[/C][C]19.6[/C][C]14.6921[/C][C]10.3222[/C][C]19.0621[/C][C]0.0139[/C][C]0.2787[/C][C]0.2494[/C][C]0.2639[/C][/ROW]
[ROW][C]121[/C][C]19.7[/C][C]15.2067[/C][C]10.5965[/C][C]19.817[/C][C]0.028[/C][C]0.0309[/C][C]0.3521[/C][C]0.3521[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114915&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114915&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[109])
9719.7-------
9815.6-------
9914.4-------
10013.7-------
10114.1-------
10215-------
10314.2-------
10413.6-------
10515.4-------
10614.8-------
10712.5-------
10816.2-------
10916.1-------
1101614.009912.615.41980.00280.00180.01350.0018
11115.813.083811.472314.69525e-042e-040.05471e-04
11215.212.738710.784714.69260.00680.00110.16744e-04
11315.712.845810.36415.32760.01210.03150.1610.0051
11418.914.864312.154317.57440.00180.27280.46090.1858
11517.412.83599.768715.90310.00181e-040.19170.0185
1161713.03769.647416.42770.0110.00580.37250.0383
11719.814.27610.657617.89450.00140.070.27130.1616
11817.713.16249.24817.07680.01154e-040.20610.0707
1191611.52217.369815.67440.01730.00180.32220.0154
12019.614.692110.322219.06210.01390.27870.24940.2639
12119.715.206710.596519.8170.0280.03090.35210.3521







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1100.05130.142103.960500
1110.06280.20760.17487.37795.66922.381
1120.07830.19320.1816.05825.79892.4081
1130.09860.22220.19138.14636.38572.527
1140.0930.27150.207316.28668.36592.8924
1150.12190.35560.23220.830810.44343.2316
1160.13270.30390.242315.700711.19443.3458
1170.12930.38690.260430.514213.60943.6891
1180.15170.34470.269720.590214.3853.7928
1190.18390.38860.281620.051514.95173.8667
1200.15180.3340.286424.087115.78223.9727
1210.15470.29550.287220.189616.14954.0186

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
110 & 0.0513 & 0.1421 & 0 & 3.9605 & 0 & 0 \tabularnewline
111 & 0.0628 & 0.2076 & 0.1748 & 7.3779 & 5.6692 & 2.381 \tabularnewline
112 & 0.0783 & 0.1932 & 0.181 & 6.0582 & 5.7989 & 2.4081 \tabularnewline
113 & 0.0986 & 0.2222 & 0.1913 & 8.1463 & 6.3857 & 2.527 \tabularnewline
114 & 0.093 & 0.2715 & 0.2073 & 16.2866 & 8.3659 & 2.8924 \tabularnewline
115 & 0.1219 & 0.3556 & 0.232 & 20.8308 & 10.4434 & 3.2316 \tabularnewline
116 & 0.1327 & 0.3039 & 0.2423 & 15.7007 & 11.1944 & 3.3458 \tabularnewline
117 & 0.1293 & 0.3869 & 0.2604 & 30.5142 & 13.6094 & 3.6891 \tabularnewline
118 & 0.1517 & 0.3447 & 0.2697 & 20.5902 & 14.385 & 3.7928 \tabularnewline
119 & 0.1839 & 0.3886 & 0.2816 & 20.0515 & 14.9517 & 3.8667 \tabularnewline
120 & 0.1518 & 0.334 & 0.2864 & 24.0871 & 15.7822 & 3.9727 \tabularnewline
121 & 0.1547 & 0.2955 & 0.2872 & 20.1896 & 16.1495 & 4.0186 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114915&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]110[/C][C]0.0513[/C][C]0.1421[/C][C]0[/C][C]3.9605[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]111[/C][C]0.0628[/C][C]0.2076[/C][C]0.1748[/C][C]7.3779[/C][C]5.6692[/C][C]2.381[/C][/ROW]
[ROW][C]112[/C][C]0.0783[/C][C]0.1932[/C][C]0.181[/C][C]6.0582[/C][C]5.7989[/C][C]2.4081[/C][/ROW]
[ROW][C]113[/C][C]0.0986[/C][C]0.2222[/C][C]0.1913[/C][C]8.1463[/C][C]6.3857[/C][C]2.527[/C][/ROW]
[ROW][C]114[/C][C]0.093[/C][C]0.2715[/C][C]0.2073[/C][C]16.2866[/C][C]8.3659[/C][C]2.8924[/C][/ROW]
[ROW][C]115[/C][C]0.1219[/C][C]0.3556[/C][C]0.232[/C][C]20.8308[/C][C]10.4434[/C][C]3.2316[/C][/ROW]
[ROW][C]116[/C][C]0.1327[/C][C]0.3039[/C][C]0.2423[/C][C]15.7007[/C][C]11.1944[/C][C]3.3458[/C][/ROW]
[ROW][C]117[/C][C]0.1293[/C][C]0.3869[/C][C]0.2604[/C][C]30.5142[/C][C]13.6094[/C][C]3.6891[/C][/ROW]
[ROW][C]118[/C][C]0.1517[/C][C]0.3447[/C][C]0.2697[/C][C]20.5902[/C][C]14.385[/C][C]3.7928[/C][/ROW]
[ROW][C]119[/C][C]0.1839[/C][C]0.3886[/C][C]0.2816[/C][C]20.0515[/C][C]14.9517[/C][C]3.8667[/C][/ROW]
[ROW][C]120[/C][C]0.1518[/C][C]0.334[/C][C]0.2864[/C][C]24.0871[/C][C]15.7822[/C][C]3.9727[/C][/ROW]
[ROW][C]121[/C][C]0.1547[/C][C]0.2955[/C][C]0.2872[/C][C]20.1896[/C][C]16.1495[/C][C]4.0186[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114915&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114915&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
1100.05130.142103.960500
1110.06280.20760.17487.37795.66922.381
1120.07830.19320.1816.05825.79892.4081
1130.09860.22220.19138.14636.38572.527
1140.0930.27150.207316.28668.36592.8924
1150.12190.35560.23220.830810.44343.2316
1160.13270.30390.242315.700711.19443.3458
1170.12930.38690.260430.514213.60943.6891
1180.15170.34470.269720.590214.3853.7928
1190.18390.38860.281620.051514.95173.8667
1200.15180.3340.286424.087115.78223.9727
1210.15470.29550.287220.189616.14954.0186



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 2 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')