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 computationWed, 17 Dec 2008 04:52:44 -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/2008/Dec/17/t12295148836zef03vz4zgluag.htm/, Retrieved Sat, 18 May 2024 13:18:26 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34306, Retrieved Sat, 18 May 2024 13:18:26 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact196
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [(Partial) Autocorrelation Function] [paper] [2008-12-17 08:04:31] [3a9fc6d5b5e0e816787b7dbace57e7cd]
- RMP   [Spectral Analysis] [paper] [2008-12-17 08:10:31] [3a9fc6d5b5e0e816787b7dbace57e7cd]
-   P     [Spectral Analysis] [paper] [2008-12-17 08:14:49] [3a9fc6d5b5e0e816787b7dbace57e7cd]
- RMP         [ARIMA Forecasting] [] [2008-12-17 11:52:44] [821c4b3d195be8e737cf8c9dc649d3cf] [Current]
Feedback Forum

Post a new message
Dataseries X:
31.58
27.88
27.32
28.89
28.05
28.73
32.00
34.53
33.47
34.09
35.47
34.59
34.32
32.78
28.38
29.18
28.62
28.20
29.33
29.72
26.29
26.82
27.64
27.10
27.05
26.02
25.76
25.94
24.97
21.74
18.16
16.95
16.46
16.44
18.20
16.44
15.70
13.94
12.23
14.75
14.62
15.04
15.50
16.10
15.44
15.14
15.42
15.69
17.57
18.42
17.96
18.39
17.63
17.95
17.79
17.73
18.99
19.83
20.23
20.24
21.12
21.25
21.80
21.84
22.21
22.64
23.54
23.78
23.65
23.93
24.77
26.26
27.69
29.54
29.31
29.26
28.69
26.16
27.12
29.40
30.99
32.96
32.20
31.67
32.49
33.66
32.44
34.38
32.36
30.73
30.31
27.26
25.05
22.33
18.26
18.30
16.00
14.36
14.98
16.88
16.56
13.31
9.61
9.34
7.89
1.71
0.81
0.71




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34306&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]1 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=34306&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34306&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 time1 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[96])
8431.67-------
8532.49-------
8633.66-------
8732.44-------
8834.38-------
8932.36-------
9030.73-------
9130.31-------
9227.26-------
9325.05-------
9422.33-------
9518.26-------
9618.3-------
971618.014615.976520.31270.04290.403800.4038
9814.3617.532414.454421.2660.04790.789400.3435
9914.9817.409713.539322.38670.16930.885100.3629
10016.8817.339512.742923.59430.44280.770200.3817
10116.5617.265712.04824.74290.42660.540300.3931
10213.3117.231611.47425.87850.1870.56050.00110.4043
1039.6117.213710.97726.99380.06380.7830.00430.4138
1049.3417.200110.53728.07670.07830.91430.03490.4214
1057.8917.192410.145529.13390.06340.90130.09860.4279
1061.7117.18829.792830.16830.00970.91980.21880.4333
1070.8117.18549.471631.18120.01090.98490.44020.438
1080.7117.18379.17732.17590.01560.98380.4420.442

\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[96]) \tabularnewline
84 & 31.67 & - & - & - & - & - & - & - \tabularnewline
85 & 32.49 & - & - & - & - & - & - & - \tabularnewline
86 & 33.66 & - & - & - & - & - & - & - \tabularnewline
87 & 32.44 & - & - & - & - & - & - & - \tabularnewline
88 & 34.38 & - & - & - & - & - & - & - \tabularnewline
89 & 32.36 & - & - & - & - & - & - & - \tabularnewline
90 & 30.73 & - & - & - & - & - & - & - \tabularnewline
91 & 30.31 & - & - & - & - & - & - & - \tabularnewline
92 & 27.26 & - & - & - & - & - & - & - \tabularnewline
93 & 25.05 & - & - & - & - & - & - & - \tabularnewline
94 & 22.33 & - & - & - & - & - & - & - \tabularnewline
95 & 18.26 & - & - & - & - & - & - & - \tabularnewline
96 & 18.3 & - & - & - & - & - & - & - \tabularnewline
97 & 16 & 18.0146 & 15.9765 & 20.3127 & 0.0429 & 0.4038 & 0 & 0.4038 \tabularnewline
98 & 14.36 & 17.5324 & 14.4544 & 21.266 & 0.0479 & 0.7894 & 0 & 0.3435 \tabularnewline
99 & 14.98 & 17.4097 & 13.5393 & 22.3867 & 0.1693 & 0.8851 & 0 & 0.3629 \tabularnewline
100 & 16.88 & 17.3395 & 12.7429 & 23.5943 & 0.4428 & 0.7702 & 0 & 0.3817 \tabularnewline
101 & 16.56 & 17.2657 & 12.048 & 24.7429 & 0.4266 & 0.5403 & 0 & 0.3931 \tabularnewline
102 & 13.31 & 17.2316 & 11.474 & 25.8785 & 0.187 & 0.5605 & 0.0011 & 0.4043 \tabularnewline
103 & 9.61 & 17.2137 & 10.977 & 26.9938 & 0.0638 & 0.783 & 0.0043 & 0.4138 \tabularnewline
104 & 9.34 & 17.2001 & 10.537 & 28.0767 & 0.0783 & 0.9143 & 0.0349 & 0.4214 \tabularnewline
105 & 7.89 & 17.1924 & 10.1455 & 29.1339 & 0.0634 & 0.9013 & 0.0986 & 0.4279 \tabularnewline
106 & 1.71 & 17.1882 & 9.7928 & 30.1683 & 0.0097 & 0.9198 & 0.2188 & 0.4333 \tabularnewline
107 & 0.81 & 17.1854 & 9.4716 & 31.1812 & 0.0109 & 0.9849 & 0.4402 & 0.438 \tabularnewline
108 & 0.71 & 17.1837 & 9.177 & 32.1759 & 0.0156 & 0.9838 & 0.442 & 0.442 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34306&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[96])[/C][/ROW]
[ROW][C]84[/C][C]31.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]32.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]33.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]32.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]34.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]32.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]30.73[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]30.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]27.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]25.05[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]22.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]18.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]18.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]16[/C][C]18.0146[/C][C]15.9765[/C][C]20.3127[/C][C]0.0429[/C][C]0.4038[/C][C]0[/C][C]0.4038[/C][/ROW]
[ROW][C]98[/C][C]14.36[/C][C]17.5324[/C][C]14.4544[/C][C]21.266[/C][C]0.0479[/C][C]0.7894[/C][C]0[/C][C]0.3435[/C][/ROW]
[ROW][C]99[/C][C]14.98[/C][C]17.4097[/C][C]13.5393[/C][C]22.3867[/C][C]0.1693[/C][C]0.8851[/C][C]0[/C][C]0.3629[/C][/ROW]
[ROW][C]100[/C][C]16.88[/C][C]17.3395[/C][C]12.7429[/C][C]23.5943[/C][C]0.4428[/C][C]0.7702[/C][C]0[/C][C]0.3817[/C][/ROW]
[ROW][C]101[/C][C]16.56[/C][C]17.2657[/C][C]12.048[/C][C]24.7429[/C][C]0.4266[/C][C]0.5403[/C][C]0[/C][C]0.3931[/C][/ROW]
[ROW][C]102[/C][C]13.31[/C][C]17.2316[/C][C]11.474[/C][C]25.8785[/C][C]0.187[/C][C]0.5605[/C][C]0.0011[/C][C]0.4043[/C][/ROW]
[ROW][C]103[/C][C]9.61[/C][C]17.2137[/C][C]10.977[/C][C]26.9938[/C][C]0.0638[/C][C]0.783[/C][C]0.0043[/C][C]0.4138[/C][/ROW]
[ROW][C]104[/C][C]9.34[/C][C]17.2001[/C][C]10.537[/C][C]28.0767[/C][C]0.0783[/C][C]0.9143[/C][C]0.0349[/C][C]0.4214[/C][/ROW]
[ROW][C]105[/C][C]7.89[/C][C]17.1924[/C][C]10.1455[/C][C]29.1339[/C][C]0.0634[/C][C]0.9013[/C][C]0.0986[/C][C]0.4279[/C][/ROW]
[ROW][C]106[/C][C]1.71[/C][C]17.1882[/C][C]9.7928[/C][C]30.1683[/C][C]0.0097[/C][C]0.9198[/C][C]0.2188[/C][C]0.4333[/C][/ROW]
[ROW][C]107[/C][C]0.81[/C][C]17.1854[/C][C]9.4716[/C][C]31.1812[/C][C]0.0109[/C][C]0.9849[/C][C]0.4402[/C][C]0.438[/C][/ROW]
[ROW][C]108[/C][C]0.71[/C][C]17.1837[/C][C]9.177[/C][C]32.1759[/C][C]0.0156[/C][C]0.9838[/C][C]0.442[/C][C]0.442[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34306&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34306&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[96])
8431.67-------
8532.49-------
8633.66-------
8732.44-------
8834.38-------
8932.36-------
9030.73-------
9130.31-------
9227.26-------
9325.05-------
9422.33-------
9518.26-------
9618.3-------
971618.014615.976520.31270.04290.403800.4038
9814.3617.532414.454421.2660.04790.789400.3435
9914.9817.409713.539322.38670.16930.885100.3629
10016.8817.339512.742923.59430.44280.770200.3817
10116.5617.265712.04824.74290.42660.540300.3931
10213.3117.231611.47425.87850.1870.56050.00110.4043
1039.6117.213710.97726.99380.06380.7830.00430.4138
1049.3417.200110.53728.07670.07830.91430.03490.4214
1057.8917.192410.145529.13390.06340.90130.09860.4279
1061.7117.18829.792830.16830.00970.91980.21880.4333
1070.8117.18549.471631.18120.01090.98490.44020.438
1080.7117.18379.17732.17590.01560.98380.4420.442







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
970.0651-0.11180.00934.05860.33820.5816
980.1086-0.18090.015110.06430.83870.9158
990.1459-0.13960.01165.90370.4920.7014
1000.184-0.02650.00220.21120.01760.1327
1010.221-0.04090.00340.4980.04150.2037
1020.256-0.22760.01915.37911.28161.1321
1030.2899-0.44170.036857.81624.8182.195
1040.3226-0.4570.038161.78125.14842.269
1050.3544-0.54110.045186.53487.21122.6854
1060.3853-0.90050.075239.573319.96444.4682
1070.4155-0.95290.0794268.152922.34614.7272
1080.4451-0.95870.0799271.383122.61534.7555

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
97 & 0.0651 & -0.1118 & 0.0093 & 4.0586 & 0.3382 & 0.5816 \tabularnewline
98 & 0.1086 & -0.1809 & 0.0151 & 10.0643 & 0.8387 & 0.9158 \tabularnewline
99 & 0.1459 & -0.1396 & 0.0116 & 5.9037 & 0.492 & 0.7014 \tabularnewline
100 & 0.184 & -0.0265 & 0.0022 & 0.2112 & 0.0176 & 0.1327 \tabularnewline
101 & 0.221 & -0.0409 & 0.0034 & 0.498 & 0.0415 & 0.2037 \tabularnewline
102 & 0.256 & -0.2276 & 0.019 & 15.3791 & 1.2816 & 1.1321 \tabularnewline
103 & 0.2899 & -0.4417 & 0.0368 & 57.8162 & 4.818 & 2.195 \tabularnewline
104 & 0.3226 & -0.457 & 0.0381 & 61.7812 & 5.1484 & 2.269 \tabularnewline
105 & 0.3544 & -0.5411 & 0.0451 & 86.5348 & 7.2112 & 2.6854 \tabularnewline
106 & 0.3853 & -0.9005 & 0.075 & 239.5733 & 19.9644 & 4.4682 \tabularnewline
107 & 0.4155 & -0.9529 & 0.0794 & 268.1529 & 22.3461 & 4.7272 \tabularnewline
108 & 0.4451 & -0.9587 & 0.0799 & 271.3831 & 22.6153 & 4.7555 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34306&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]97[/C][C]0.0651[/C][C]-0.1118[/C][C]0.0093[/C][C]4.0586[/C][C]0.3382[/C][C]0.5816[/C][/ROW]
[ROW][C]98[/C][C]0.1086[/C][C]-0.1809[/C][C]0.0151[/C][C]10.0643[/C][C]0.8387[/C][C]0.9158[/C][/ROW]
[ROW][C]99[/C][C]0.1459[/C][C]-0.1396[/C][C]0.0116[/C][C]5.9037[/C][C]0.492[/C][C]0.7014[/C][/ROW]
[ROW][C]100[/C][C]0.184[/C][C]-0.0265[/C][C]0.0022[/C][C]0.2112[/C][C]0.0176[/C][C]0.1327[/C][/ROW]
[ROW][C]101[/C][C]0.221[/C][C]-0.0409[/C][C]0.0034[/C][C]0.498[/C][C]0.0415[/C][C]0.2037[/C][/ROW]
[ROW][C]102[/C][C]0.256[/C][C]-0.2276[/C][C]0.019[/C][C]15.3791[/C][C]1.2816[/C][C]1.1321[/C][/ROW]
[ROW][C]103[/C][C]0.2899[/C][C]-0.4417[/C][C]0.0368[/C][C]57.8162[/C][C]4.818[/C][C]2.195[/C][/ROW]
[ROW][C]104[/C][C]0.3226[/C][C]-0.457[/C][C]0.0381[/C][C]61.7812[/C][C]5.1484[/C][C]2.269[/C][/ROW]
[ROW][C]105[/C][C]0.3544[/C][C]-0.5411[/C][C]0.0451[/C][C]86.5348[/C][C]7.2112[/C][C]2.6854[/C][/ROW]
[ROW][C]106[/C][C]0.3853[/C][C]-0.9005[/C][C]0.075[/C][C]239.5733[/C][C]19.9644[/C][C]4.4682[/C][/ROW]
[ROW][C]107[/C][C]0.4155[/C][C]-0.9529[/C][C]0.0794[/C][C]268.1529[/C][C]22.3461[/C][C]4.7272[/C][/ROW]
[ROW][C]108[/C][C]0.4451[/C][C]-0.9587[/C][C]0.0799[/C][C]271.3831[/C][C]22.6153[/C][C]4.7555[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34306&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34306&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
970.0651-0.11180.00934.05860.33820.5816
980.1086-0.18090.015110.06430.83870.9158
990.1459-0.13960.01165.90370.4920.7014
1000.184-0.02650.00220.21120.01760.1327
1010.221-0.04090.00340.4980.04150.2037
1020.256-0.22760.01915.37911.28161.1321
1030.2899-0.44170.036857.81624.8182.195
1040.3226-0.4570.038161.78125.14842.269
1050.3544-0.54110.045186.53487.21122.6854
1060.3853-0.90050.075239.573319.96444.4682
1070.4155-0.95290.0794268.152922.34614.7272
1080.4451-0.95870.0799271.383122.61534.7555



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