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 computationSun, 14 Dec 2008 11:33:23 -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/14/t122927979380xodfsks3m7zkn.htm/, Retrieved Wed, 15 May 2024 11:31:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33531, Retrieved Wed, 15 May 2024 11:31:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact176
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [Industriele produ...] [2008-12-14 16:49:51] [b82ef11dce0545f3fd4676ec3ebed828]
- RMP   [Central Tendency] [Central Tendency ...] [2008-12-14 17:03:16] [b82ef11dce0545f3fd4676ec3ebed828]
- RM      [Percentiles] [Percentiles - - ...] [2008-12-14 17:08:17] [b82ef11dce0545f3fd4676ec3ebed828]
- RM        [Tukey lambda PPCC Plot] [Tukey lambda PPCC...] [2008-12-14 17:26:43] [b82ef11dce0545f3fd4676ec3ebed828]
- RMP         [Blocked Bootstrap Plot - Central Tendency] [Blocked bootstrap...] [2008-12-14 17:29:20] [b82ef11dce0545f3fd4676ec3ebed828]
- RMP           [Harrell-Davis Quantiles] [Harrell-Davis Qua...] [2008-12-14 17:35:42] [b82ef11dce0545f3fd4676ec3ebed828]
- RMP             [Univariate Explorative Data Analysis] [Univariate EDA -...] [2008-12-14 17:39:39] [b82ef11dce0545f3fd4676ec3ebed828]
- RMP               [Mean Plot] [Mean plot - Indus...] [2008-12-14 17:56:47] [b82ef11dce0545f3fd4676ec3ebed828]
- RM                  [Variance Reduction Matrix] [VRM - Industriele...] [2008-12-14 18:03:27] [b82ef11dce0545f3fd4676ec3ebed828]
- RM                    [Standard Deviation-Mean Plot] [SDMP - Industriel...] [2008-12-14 18:07:34] [b82ef11dce0545f3fd4676ec3ebed828]
- RM                      [(Partial) Autocorrelation Function] [(Partial) ACF - ...] [2008-12-14 18:14:08] [b82ef11dce0545f3fd4676ec3ebed828]
- RM                        [Spectral Analysis] [Spectrum - Indust...] [2008-12-14 18:16:42] [b82ef11dce0545f3fd4676ec3ebed828]
- RM                          [ARIMA Backward Selection] [ARIMA Backward Se...] [2008-12-14 18:25:02] [b82ef11dce0545f3fd4676ec3ebed828]
- RM                              [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-14 18:33:23] [4b953869c7238aca4b6e0cfb0c5cddd6] [Current]
Feedback Forum

Post a new message
Dataseries X:
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
117




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 7 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=33531&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]7 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=33531&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33531&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 time7 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[57])
45114.8-------
46116.5-------
47112.9-------
48102-------
49106-------
50105.3-------
51118.8-------
52106.1-------
53109.3-------
54117.2-------
5592.5-------
56104.2-------
57112.5-------
58122.4121.2978114.1731129.11070.39110.98630.88560.9863
59113.3109.5608103.4173116.26840.13731e-040.16460.1952
60100102.162896.2574108.62890.2564e-040.51979e-04
61110.7103.537696.703111.12340.03210.81970.26230.0103
62112.8100.384293.8542107.62014e-040.00260.09155e-04
63109.8111.2537103.142120.36140.37720.36970.05220.3943
64117.3108.1915100.1757117.20920.02390.36330.67530.1745
65109.1101.951194.5741110.22610.04521e-040.04090.0062
66115.9118.1363108.5738129.020.34360.94820.56690.8449
679687.081780.914293.98230.005700.06190
6899.899.903692.2768108.51660.49060.81280.16410.0021
69117114.9625105.3668125.93140.35790.99660.670.67

\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[57]) \tabularnewline
45 & 114.8 & - & - & - & - & - & - & - \tabularnewline
46 & 116.5 & - & - & - & - & - & - & - \tabularnewline
47 & 112.9 & - & - & - & - & - & - & - \tabularnewline
48 & 102 & - & - & - & - & - & - & - \tabularnewline
49 & 106 & - & - & - & - & - & - & - \tabularnewline
50 & 105.3 & - & - & - & - & - & - & - \tabularnewline
51 & 118.8 & - & - & - & - & - & - & - \tabularnewline
52 & 106.1 & - & - & - & - & - & - & - \tabularnewline
53 & 109.3 & - & - & - & - & - & - & - \tabularnewline
54 & 117.2 & - & - & - & - & - & - & - \tabularnewline
55 & 92.5 & - & - & - & - & - & - & - \tabularnewline
56 & 104.2 & - & - & - & - & - & - & - \tabularnewline
57 & 112.5 & - & - & - & - & - & - & - \tabularnewline
58 & 122.4 & 121.2978 & 114.1731 & 129.1107 & 0.3911 & 0.9863 & 0.8856 & 0.9863 \tabularnewline
59 & 113.3 & 109.5608 & 103.4173 & 116.2684 & 0.1373 & 1e-04 & 0.1646 & 0.1952 \tabularnewline
60 & 100 & 102.1628 & 96.2574 & 108.6289 & 0.256 & 4e-04 & 0.5197 & 9e-04 \tabularnewline
61 & 110.7 & 103.5376 & 96.703 & 111.1234 & 0.0321 & 0.8197 & 0.2623 & 0.0103 \tabularnewline
62 & 112.8 & 100.3842 & 93.8542 & 107.6201 & 4e-04 & 0.0026 & 0.0915 & 5e-04 \tabularnewline
63 & 109.8 & 111.2537 & 103.142 & 120.3614 & 0.3772 & 0.3697 & 0.0522 & 0.3943 \tabularnewline
64 & 117.3 & 108.1915 & 100.1757 & 117.2092 & 0.0239 & 0.3633 & 0.6753 & 0.1745 \tabularnewline
65 & 109.1 & 101.9511 & 94.5741 & 110.2261 & 0.0452 & 1e-04 & 0.0409 & 0.0062 \tabularnewline
66 & 115.9 & 118.1363 & 108.5738 & 129.02 & 0.3436 & 0.9482 & 0.5669 & 0.8449 \tabularnewline
67 & 96 & 87.0817 & 80.9142 & 93.9823 & 0.0057 & 0 & 0.0619 & 0 \tabularnewline
68 & 99.8 & 99.9036 & 92.2768 & 108.5166 & 0.4906 & 0.8128 & 0.1641 & 0.0021 \tabularnewline
69 & 117 & 114.9625 & 105.3668 & 125.9314 & 0.3579 & 0.9966 & 0.67 & 0.67 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33531&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[57])[/C][/ROW]
[ROW][C]45[/C][C]114.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]116.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]112.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]102[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]106[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]105.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]118.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]106.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]109.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]92.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]104.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]112.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]122.4[/C][C]121.2978[/C][C]114.1731[/C][C]129.1107[/C][C]0.3911[/C][C]0.9863[/C][C]0.8856[/C][C]0.9863[/C][/ROW]
[ROW][C]59[/C][C]113.3[/C][C]109.5608[/C][C]103.4173[/C][C]116.2684[/C][C]0.1373[/C][C]1e-04[/C][C]0.1646[/C][C]0.1952[/C][/ROW]
[ROW][C]60[/C][C]100[/C][C]102.1628[/C][C]96.2574[/C][C]108.6289[/C][C]0.256[/C][C]4e-04[/C][C]0.5197[/C][C]9e-04[/C][/ROW]
[ROW][C]61[/C][C]110.7[/C][C]103.5376[/C][C]96.703[/C][C]111.1234[/C][C]0.0321[/C][C]0.8197[/C][C]0.2623[/C][C]0.0103[/C][/ROW]
[ROW][C]62[/C][C]112.8[/C][C]100.3842[/C][C]93.8542[/C][C]107.6201[/C][C]4e-04[/C][C]0.0026[/C][C]0.0915[/C][C]5e-04[/C][/ROW]
[ROW][C]63[/C][C]109.8[/C][C]111.2537[/C][C]103.142[/C][C]120.3614[/C][C]0.3772[/C][C]0.3697[/C][C]0.0522[/C][C]0.3943[/C][/ROW]
[ROW][C]64[/C][C]117.3[/C][C]108.1915[/C][C]100.1757[/C][C]117.2092[/C][C]0.0239[/C][C]0.3633[/C][C]0.6753[/C][C]0.1745[/C][/ROW]
[ROW][C]65[/C][C]109.1[/C][C]101.9511[/C][C]94.5741[/C][C]110.2261[/C][C]0.0452[/C][C]1e-04[/C][C]0.0409[/C][C]0.0062[/C][/ROW]
[ROW][C]66[/C][C]115.9[/C][C]118.1363[/C][C]108.5738[/C][C]129.02[/C][C]0.3436[/C][C]0.9482[/C][C]0.5669[/C][C]0.8449[/C][/ROW]
[ROW][C]67[/C][C]96[/C][C]87.0817[/C][C]80.9142[/C][C]93.9823[/C][C]0.0057[/C][C]0[/C][C]0.0619[/C][C]0[/C][/ROW]
[ROW][C]68[/C][C]99.8[/C][C]99.9036[/C][C]92.2768[/C][C]108.5166[/C][C]0.4906[/C][C]0.8128[/C][C]0.1641[/C][C]0.0021[/C][/ROW]
[ROW][C]69[/C][C]117[/C][C]114.9625[/C][C]105.3668[/C][C]125.9314[/C][C]0.3579[/C][C]0.9966[/C][C]0.67[/C][C]0.67[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33531&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33531&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[57])
45114.8-------
46116.5-------
47112.9-------
48102-------
49106-------
50105.3-------
51118.8-------
52106.1-------
53109.3-------
54117.2-------
5592.5-------
56104.2-------
57112.5-------
58122.4121.2978114.1731129.11070.39110.98630.88560.9863
59113.3109.5608103.4173116.26840.13731e-040.16460.1952
60100102.162896.2574108.62890.2564e-040.51979e-04
61110.7103.537696.703111.12340.03210.81970.26230.0103
62112.8100.384293.8542107.62014e-040.00260.09155e-04
63109.8111.2537103.142120.36140.37720.36970.05220.3943
64117.3108.1915100.1757117.20920.02390.36330.67530.1745
65109.1101.951194.5741110.22610.04521e-040.04090.0062
66115.9118.1363108.5738129.020.34360.94820.56690.8449
679687.081780.914293.98230.005700.06190
6899.899.903692.2768108.51660.49060.81280.16410.0021
69117114.9625105.3668125.93140.35790.99660.670.67







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
580.03290.00918e-041.21490.10120.3182
590.03120.03410.002813.98191.16521.0794
600.0323-0.02120.00184.67780.38980.6244
610.03740.06920.005851.29954.2752.0676
620.03680.12370.0103154.152812.84613.5841
630.0418-0.01310.00112.11330.17610.4197
640.04250.08420.00782.96526.91382.6294
650.04140.07010.005851.10674.25892.0637
660.047-0.01890.00165.00090.41670.6456
670.04040.10240.008579.5366.6282.5745
680.044-0.0011e-040.01079e-040.0299
690.04870.01770.00154.15130.34590.5882

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
58 & 0.0329 & 0.0091 & 8e-04 & 1.2149 & 0.1012 & 0.3182 \tabularnewline
59 & 0.0312 & 0.0341 & 0.0028 & 13.9819 & 1.1652 & 1.0794 \tabularnewline
60 & 0.0323 & -0.0212 & 0.0018 & 4.6778 & 0.3898 & 0.6244 \tabularnewline
61 & 0.0374 & 0.0692 & 0.0058 & 51.2995 & 4.275 & 2.0676 \tabularnewline
62 & 0.0368 & 0.1237 & 0.0103 & 154.1528 & 12.8461 & 3.5841 \tabularnewline
63 & 0.0418 & -0.0131 & 0.0011 & 2.1133 & 0.1761 & 0.4197 \tabularnewline
64 & 0.0425 & 0.0842 & 0.007 & 82.9652 & 6.9138 & 2.6294 \tabularnewline
65 & 0.0414 & 0.0701 & 0.0058 & 51.1067 & 4.2589 & 2.0637 \tabularnewline
66 & 0.047 & -0.0189 & 0.0016 & 5.0009 & 0.4167 & 0.6456 \tabularnewline
67 & 0.0404 & 0.1024 & 0.0085 & 79.536 & 6.628 & 2.5745 \tabularnewline
68 & 0.044 & -0.001 & 1e-04 & 0.0107 & 9e-04 & 0.0299 \tabularnewline
69 & 0.0487 & 0.0177 & 0.0015 & 4.1513 & 0.3459 & 0.5882 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33531&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]58[/C][C]0.0329[/C][C]0.0091[/C][C]8e-04[/C][C]1.2149[/C][C]0.1012[/C][C]0.3182[/C][/ROW]
[ROW][C]59[/C][C]0.0312[/C][C]0.0341[/C][C]0.0028[/C][C]13.9819[/C][C]1.1652[/C][C]1.0794[/C][/ROW]
[ROW][C]60[/C][C]0.0323[/C][C]-0.0212[/C][C]0.0018[/C][C]4.6778[/C][C]0.3898[/C][C]0.6244[/C][/ROW]
[ROW][C]61[/C][C]0.0374[/C][C]0.0692[/C][C]0.0058[/C][C]51.2995[/C][C]4.275[/C][C]2.0676[/C][/ROW]
[ROW][C]62[/C][C]0.0368[/C][C]0.1237[/C][C]0.0103[/C][C]154.1528[/C][C]12.8461[/C][C]3.5841[/C][/ROW]
[ROW][C]63[/C][C]0.0418[/C][C]-0.0131[/C][C]0.0011[/C][C]2.1133[/C][C]0.1761[/C][C]0.4197[/C][/ROW]
[ROW][C]64[/C][C]0.0425[/C][C]0.0842[/C][C]0.007[/C][C]82.9652[/C][C]6.9138[/C][C]2.6294[/C][/ROW]
[ROW][C]65[/C][C]0.0414[/C][C]0.0701[/C][C]0.0058[/C][C]51.1067[/C][C]4.2589[/C][C]2.0637[/C][/ROW]
[ROW][C]66[/C][C]0.047[/C][C]-0.0189[/C][C]0.0016[/C][C]5.0009[/C][C]0.4167[/C][C]0.6456[/C][/ROW]
[ROW][C]67[/C][C]0.0404[/C][C]0.1024[/C][C]0.0085[/C][C]79.536[/C][C]6.628[/C][C]2.5745[/C][/ROW]
[ROW][C]68[/C][C]0.044[/C][C]-0.001[/C][C]1e-04[/C][C]0.0107[/C][C]9e-04[/C][C]0.0299[/C][/ROW]
[ROW][C]69[/C][C]0.0487[/C][C]0.0177[/C][C]0.0015[/C][C]4.1513[/C][C]0.3459[/C][C]0.5882[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33531&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33531&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
580.03290.00918e-041.21490.10120.3182
590.03120.03410.002813.98191.16521.0794
600.0323-0.02120.00184.67780.38980.6244
610.03740.06920.005851.29954.2752.0676
620.03680.12370.0103154.152812.84613.5841
630.0418-0.01310.00112.11330.17610.4197
640.04250.08420.00782.96526.91382.6294
650.04140.07010.005851.10674.25892.0637
660.047-0.01890.00165.00090.41670.6456
670.04040.10240.008579.5366.6282.5745
680.044-0.0011e-040.01079e-040.0299
690.04870.01770.00154.15130.34590.5882



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