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, 18 Dec 2009 03:49:22 -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/2009/Dec/18/t1261133432b1i6yj0fo9i4rda.htm/, Retrieved Sat, 27 Apr 2024 06:05:44 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=69219, Retrieved Sat, 27 Apr 2024 06:05:44 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact130
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Bivariate Explorative Data Analysis] [Paper Bivariate E...] [2009-12-13 14:39:24] [143cbdcaf7333bdd9926a1dde50d1082]
- RMPD  [ARIMA Forecasting] [Paper-ARIMAforeca...] [2009-12-15 18:44:14] [f15cfb7053d35072d573abca87df96a0]
- R PD      [ARIMA Forecasting] [Paper-ARIMAforeca...] [2009-12-18 10:49:22] [5ed0eef5d4509bbfdac0ae6d87f3b4bf] [Current]
- R PD        [ARIMA Forecasting] [Forecasting] [2010-12-29 19:27:15] [17d39bb3ec485d4ce196f61215d11ba1]
-               [ARIMA Forecasting] [forecast] [2010-12-29 22:40:36] [442b6d00ecbe55ac6a674160c9c5510a]
- RMPD        [Cross Correlation Function] [Cross correlation] [2010-12-29 19:42:55] [17d39bb3ec485d4ce196f61215d11ba1]
-               [Cross Correlation Function] [cross correlation] [2010-12-29 22:35:31] [442b6d00ecbe55ac6a674160c9c5510a]
- RMPD        [ARIMA Backward Selection] [Arima bw - NWWZ- ...] [2010-12-29 19:51:03] [17d39bb3ec485d4ce196f61215d11ba1]
- R PD        [ARIMA Forecasting] [Arima forcasting ...] [2010-12-29 20:07:50] [87d09f1da78d94c90b11e34ec961a75e]
- R PD        [ARIMA Forecasting] [forcastingmodel f...] [2010-12-29 20:13:09] [17d39bb3ec485d4ce196f61215d11ba1]
- RMPD        [ARIMA Backward Selection] [Arima- backward f...] [2010-12-29 20:17:01] [17d39bb3ec485d4ce196f61215d11ba1]
Feedback Forum

Post a new message
Dataseries X:
98,8
100,5
110,4
96,4
101,9
106,2
81
94,7
101
109,4
102,3
90,7
96,2
96,1
106
103,1
102
104,7
86
92,1
106,9
112,6
101,7
92
97,4
97
105,4
102,7
98,1
104,5
87,4
89,9
109,8
111,7
98,6
96,9
95,1
97
112,7
102,9
97,4
111,4
87,4
96,8
114,1
110,3
103,9
101,6
94,6
95,9
104,7
102,8
98,1
113,9
80,9
95,7
113,2
105,9
108,8
102,3
99
100,7
115,5
100,7
109,9
114,6
85,4
100,5
114,8
116,5
112,9
102
106
105,3
118,8
106,1
109,3
117,2
92,5
104,2
112,5
122,4
113,3
100
110,7
112,8
109,8
117,3
109,1
115,9
96
99,8
116,8
115,7
99,4
94,3
91




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69219&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]2 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=69219&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69219&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 time2 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[85])
73106-------
74105.3-------
75118.8-------
76106.1-------
77109.3-------
78117.2-------
7992.5-------
80104.2-------
81112.5-------
82122.4-------
83113.3-------
84100-------
85110.7-------
86112.8104.618498.4629110.77380.00460.02640.41410.0264
87109.8117.09110.9358123.24420.01010.91410.2930.9791
88117.3110.1177103.6616116.57390.01460.53840.88870.4298
89109.1107.853100.4879115.2180.370.0060.35010.2243
90115.9116.9583109.5819124.33480.38930.98160.47440.9518
919692.900685.1718100.62950.215900.54050
9299.8102.115494.087110.14380.28590.93230.30540.0181
93116.8114.9095106.8274122.99170.32330.99990.72050.8463
94115.7119.7665111.4319128.1010.16950.75730.26790.9835
9599.4111.5222103.0525119.99180.00250.16680.34040.5754
9694.3102.076993.5284110.62540.03730.73030.6830.024
9791106.615897.9261115.30552e-040.99730.17850.1785

\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[85]) \tabularnewline
73 & 106 & - & - & - & - & - & - & - \tabularnewline
74 & 105.3 & - & - & - & - & - & - & - \tabularnewline
75 & 118.8 & - & - & - & - & - & - & - \tabularnewline
76 & 106.1 & - & - & - & - & - & - & - \tabularnewline
77 & 109.3 & - & - & - & - & - & - & - \tabularnewline
78 & 117.2 & - & - & - & - & - & - & - \tabularnewline
79 & 92.5 & - & - & - & - & - & - & - \tabularnewline
80 & 104.2 & - & - & - & - & - & - & - \tabularnewline
81 & 112.5 & - & - & - & - & - & - & - \tabularnewline
82 & 122.4 & - & - & - & - & - & - & - \tabularnewline
83 & 113.3 & - & - & - & - & - & - & - \tabularnewline
84 & 100 & - & - & - & - & - & - & - \tabularnewline
85 & 110.7 & - & - & - & - & - & - & - \tabularnewline
86 & 112.8 & 104.6184 & 98.4629 & 110.7738 & 0.0046 & 0.0264 & 0.4141 & 0.0264 \tabularnewline
87 & 109.8 & 117.09 & 110.9358 & 123.2442 & 0.0101 & 0.9141 & 0.293 & 0.9791 \tabularnewline
88 & 117.3 & 110.1177 & 103.6616 & 116.5739 & 0.0146 & 0.5384 & 0.8887 & 0.4298 \tabularnewline
89 & 109.1 & 107.853 & 100.4879 & 115.218 & 0.37 & 0.006 & 0.3501 & 0.2243 \tabularnewline
90 & 115.9 & 116.9583 & 109.5819 & 124.3348 & 0.3893 & 0.9816 & 0.4744 & 0.9518 \tabularnewline
91 & 96 & 92.9006 & 85.1718 & 100.6295 & 0.2159 & 0 & 0.5405 & 0 \tabularnewline
92 & 99.8 & 102.1154 & 94.087 & 110.1438 & 0.2859 & 0.9323 & 0.3054 & 0.0181 \tabularnewline
93 & 116.8 & 114.9095 & 106.8274 & 122.9917 & 0.3233 & 0.9999 & 0.7205 & 0.8463 \tabularnewline
94 & 115.7 & 119.7665 & 111.4319 & 128.101 & 0.1695 & 0.7573 & 0.2679 & 0.9835 \tabularnewline
95 & 99.4 & 111.5222 & 103.0525 & 119.9918 & 0.0025 & 0.1668 & 0.3404 & 0.5754 \tabularnewline
96 & 94.3 & 102.0769 & 93.5284 & 110.6254 & 0.0373 & 0.7303 & 0.683 & 0.024 \tabularnewline
97 & 91 & 106.6158 & 97.9261 & 115.3055 & 2e-04 & 0.9973 & 0.1785 & 0.1785 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69219&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[85])[/C][/ROW]
[ROW][C]73[/C][C]106[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]105.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]118.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]106.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]109.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]92.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]104.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]112.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]122.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]113.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]110.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]112.8[/C][C]104.6184[/C][C]98.4629[/C][C]110.7738[/C][C]0.0046[/C][C]0.0264[/C][C]0.4141[/C][C]0.0264[/C][/ROW]
[ROW][C]87[/C][C]109.8[/C][C]117.09[/C][C]110.9358[/C][C]123.2442[/C][C]0.0101[/C][C]0.9141[/C][C]0.293[/C][C]0.9791[/C][/ROW]
[ROW][C]88[/C][C]117.3[/C][C]110.1177[/C][C]103.6616[/C][C]116.5739[/C][C]0.0146[/C][C]0.5384[/C][C]0.8887[/C][C]0.4298[/C][/ROW]
[ROW][C]89[/C][C]109.1[/C][C]107.853[/C][C]100.4879[/C][C]115.218[/C][C]0.37[/C][C]0.006[/C][C]0.3501[/C][C]0.2243[/C][/ROW]
[ROW][C]90[/C][C]115.9[/C][C]116.9583[/C][C]109.5819[/C][C]124.3348[/C][C]0.3893[/C][C]0.9816[/C][C]0.4744[/C][C]0.9518[/C][/ROW]
[ROW][C]91[/C][C]96[/C][C]92.9006[/C][C]85.1718[/C][C]100.6295[/C][C]0.2159[/C][C]0[/C][C]0.5405[/C][C]0[/C][/ROW]
[ROW][C]92[/C][C]99.8[/C][C]102.1154[/C][C]94.087[/C][C]110.1438[/C][C]0.2859[/C][C]0.9323[/C][C]0.3054[/C][C]0.0181[/C][/ROW]
[ROW][C]93[/C][C]116.8[/C][C]114.9095[/C][C]106.8274[/C][C]122.9917[/C][C]0.3233[/C][C]0.9999[/C][C]0.7205[/C][C]0.8463[/C][/ROW]
[ROW][C]94[/C][C]115.7[/C][C]119.7665[/C][C]111.4319[/C][C]128.101[/C][C]0.1695[/C][C]0.7573[/C][C]0.2679[/C][C]0.9835[/C][/ROW]
[ROW][C]95[/C][C]99.4[/C][C]111.5222[/C][C]103.0525[/C][C]119.9918[/C][C]0.0025[/C][C]0.1668[/C][C]0.3404[/C][C]0.5754[/C][/ROW]
[ROW][C]96[/C][C]94.3[/C][C]102.0769[/C][C]93.5284[/C][C]110.6254[/C][C]0.0373[/C][C]0.7303[/C][C]0.683[/C][C]0.024[/C][/ROW]
[ROW][C]97[/C][C]91[/C][C]106.6158[/C][C]97.9261[/C][C]115.3055[/C][C]2e-04[/C][C]0.9973[/C][C]0.1785[/C][C]0.1785[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69219&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69219&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[85])
73106-------
74105.3-------
75118.8-------
76106.1-------
77109.3-------
78117.2-------
7992.5-------
80104.2-------
81112.5-------
82122.4-------
83113.3-------
84100-------
85110.7-------
86112.8104.618498.4629110.77380.00460.02640.41410.0264
87109.8117.09110.9358123.24420.01010.91410.2930.9791
88117.3110.1177103.6616116.57390.01460.53840.88870.4298
89109.1107.853100.4879115.2180.370.0060.35010.2243
90115.9116.9583109.5819124.33480.38930.98160.47440.9518
919692.900685.1718100.62950.215900.54050
9299.8102.115494.087110.14380.28590.93230.30540.0181
93116.8114.9095106.8274122.99170.32330.99990.72050.8463
94115.7119.7665111.4319128.1010.16950.75730.26790.9835
9599.4111.5222103.0525119.99180.00250.16680.34040.5754
9694.3102.076993.5284110.62540.03730.73030.6830.024
9791106.615897.9261115.30552e-040.99730.17850.1785







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
860.030.0782066.939300
870.0268-0.06230.070253.143960.04167.7486
880.02990.06520.068651.585157.22287.5646
890.03480.01160.05431.555143.30586.5807
900.0322-0.0090.04531.120134.86875.905
910.04240.03340.04339.606130.65835.537
920.0401-0.02270.04035.36127.04445.2004
930.03590.01650.03733.573924.11064.9103
940.0355-0.0340.03716.536423.2694.8238
950.0387-0.10870.0441146.946635.63685.9697
960.0427-0.07620.047160.480137.89526.1559
970.0416-0.14650.0553243.85455.05857.4201

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
86 & 0.03 & 0.0782 & 0 & 66.9393 & 0 & 0 \tabularnewline
87 & 0.0268 & -0.0623 & 0.0702 & 53.1439 & 60.0416 & 7.7486 \tabularnewline
88 & 0.0299 & 0.0652 & 0.0686 & 51.5851 & 57.2228 & 7.5646 \tabularnewline
89 & 0.0348 & 0.0116 & 0.0543 & 1.5551 & 43.3058 & 6.5807 \tabularnewline
90 & 0.0322 & -0.009 & 0.0453 & 1.1201 & 34.8687 & 5.905 \tabularnewline
91 & 0.0424 & 0.0334 & 0.0433 & 9.6061 & 30.6583 & 5.537 \tabularnewline
92 & 0.0401 & -0.0227 & 0.0403 & 5.361 & 27.0444 & 5.2004 \tabularnewline
93 & 0.0359 & 0.0165 & 0.0373 & 3.5739 & 24.1106 & 4.9103 \tabularnewline
94 & 0.0355 & -0.034 & 0.037 & 16.5364 & 23.269 & 4.8238 \tabularnewline
95 & 0.0387 & -0.1087 & 0.0441 & 146.9466 & 35.6368 & 5.9697 \tabularnewline
96 & 0.0427 & -0.0762 & 0.0471 & 60.4801 & 37.8952 & 6.1559 \tabularnewline
97 & 0.0416 & -0.1465 & 0.0553 & 243.854 & 55.0585 & 7.4201 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69219&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]86[/C][C]0.03[/C][C]0.0782[/C][C]0[/C][C]66.9393[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]87[/C][C]0.0268[/C][C]-0.0623[/C][C]0.0702[/C][C]53.1439[/C][C]60.0416[/C][C]7.7486[/C][/ROW]
[ROW][C]88[/C][C]0.0299[/C][C]0.0652[/C][C]0.0686[/C][C]51.5851[/C][C]57.2228[/C][C]7.5646[/C][/ROW]
[ROW][C]89[/C][C]0.0348[/C][C]0.0116[/C][C]0.0543[/C][C]1.5551[/C][C]43.3058[/C][C]6.5807[/C][/ROW]
[ROW][C]90[/C][C]0.0322[/C][C]-0.009[/C][C]0.0453[/C][C]1.1201[/C][C]34.8687[/C][C]5.905[/C][/ROW]
[ROW][C]91[/C][C]0.0424[/C][C]0.0334[/C][C]0.0433[/C][C]9.6061[/C][C]30.6583[/C][C]5.537[/C][/ROW]
[ROW][C]92[/C][C]0.0401[/C][C]-0.0227[/C][C]0.0403[/C][C]5.361[/C][C]27.0444[/C][C]5.2004[/C][/ROW]
[ROW][C]93[/C][C]0.0359[/C][C]0.0165[/C][C]0.0373[/C][C]3.5739[/C][C]24.1106[/C][C]4.9103[/C][/ROW]
[ROW][C]94[/C][C]0.0355[/C][C]-0.034[/C][C]0.037[/C][C]16.5364[/C][C]23.269[/C][C]4.8238[/C][/ROW]
[ROW][C]95[/C][C]0.0387[/C][C]-0.1087[/C][C]0.0441[/C][C]146.9466[/C][C]35.6368[/C][C]5.9697[/C][/ROW]
[ROW][C]96[/C][C]0.0427[/C][C]-0.0762[/C][C]0.0471[/C][C]60.4801[/C][C]37.8952[/C][C]6.1559[/C][/ROW]
[ROW][C]97[/C][C]0.0416[/C][C]-0.1465[/C][C]0.0553[/C][C]243.854[/C][C]55.0585[/C][C]7.4201[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69219&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69219&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
860.030.0782066.939300
870.0268-0.06230.070253.143960.04167.7486
880.02990.06520.068651.585157.22287.5646
890.03480.01160.05431.555143.30586.5807
900.0322-0.0090.04531.120134.86875.905
910.04240.03340.04339.606130.65835.537
920.0401-0.02270.04035.36127.04445.2004
930.03590.01650.03733.573924.11064.9103
940.0355-0.0340.03716.536423.2694.8238
950.0387-0.10870.0441146.946635.63685.9697
960.0427-0.07620.047160.480137.89526.1559
970.0416-0.14650.0553243.85455.05857.4201



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