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 computationTue, 21 Dec 2010 10:29:11 +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/21/t1292927248tllsblomc6hu27f.htm/, Retrieved Fri, 10 May 2024 17:56:36 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113236, Retrieved Fri, 10 May 2024 17:56:36 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact180
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
F   PD      [ARIMA Forecasting] [ARIMA model faill...] [2010-12-03 14:08:17] [95e8426e0df851c9330605aa1e892ab5]
-   P         [ARIMA Forecasting] [verbetering forec...] [2010-12-13 18:37:08] [bd591a1ebb67d263a02e7adae3fa1a4d]
-   PD            [ARIMA Forecasting] [Forecast] [2010-12-21 10:29:11] [09489ba95453d3f5c9e6f2eaeda915af] [Current]
-    D              [ARIMA Forecasting] [forecast 1] [2010-12-24 09:39:58] [bd591a1ebb67d263a02e7adae3fa1a4d]
-   PD              [ARIMA Forecasting] [forecast 2] [2010-12-24 09:44:05] [bd591a1ebb67d263a02e7adae3fa1a4d]
Feedback Forum

Post a new message
Dataseries X:
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
93,2
103,1
94,1
91,8
102,7
82,6
89,1




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113236&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 time3 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[44])
32104.2-------
33112.5-------
34122.4-------
35113.3-------
36100-------
37110.7-------
38112.8-------
39109.8-------
40117.3-------
41109.1-------
42115.9-------
4396-------
4499.8-------
45116.8117.4024110.7403124.06450.429710.92541
46115.7122.4946114.6345130.35460.04510.92220.50941
4799.4112.8779104.6195121.13637e-040.25150.46010.999
4894.3103.138594.5299111.74720.02210.80270.76260.7764
4991110.7749102.0937119.456200.99990.50680.9934
5093.2112.527103.6072121.4469010.47610.9974
51103.1112.9731103.9717121.97450.015810.75520.9979
5294.1116.6253107.6214125.629200.99840.44160.9999
5391.8110.389101.2532119.524800.99980.60890.9885
54102.7117.6143108.4323126.79647e-0410.64280.9999
5582.696.524287.3123105.73610.00150.09440.54440.2429
5689.1101.712592.4173111.00760.003910.65660.6566

\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[44]) \tabularnewline
32 & 104.2 & - & - & - & - & - & - & - \tabularnewline
33 & 112.5 & - & - & - & - & - & - & - \tabularnewline
34 & 122.4 & - & - & - & - & - & - & - \tabularnewline
35 & 113.3 & - & - & - & - & - & - & - \tabularnewline
36 & 100 & - & - & - & - & - & - & - \tabularnewline
37 & 110.7 & - & - & - & - & - & - & - \tabularnewline
38 & 112.8 & - & - & - & - & - & - & - \tabularnewline
39 & 109.8 & - & - & - & - & - & - & - \tabularnewline
40 & 117.3 & - & - & - & - & - & - & - \tabularnewline
41 & 109.1 & - & - & - & - & - & - & - \tabularnewline
42 & 115.9 & - & - & - & - & - & - & - \tabularnewline
43 & 96 & - & - & - & - & - & - & - \tabularnewline
44 & 99.8 & - & - & - & - & - & - & - \tabularnewline
45 & 116.8 & 117.4024 & 110.7403 & 124.0645 & 0.4297 & 1 & 0.9254 & 1 \tabularnewline
46 & 115.7 & 122.4946 & 114.6345 & 130.3546 & 0.0451 & 0.9222 & 0.5094 & 1 \tabularnewline
47 & 99.4 & 112.8779 & 104.6195 & 121.1363 & 7e-04 & 0.2515 & 0.4601 & 0.999 \tabularnewline
48 & 94.3 & 103.1385 & 94.5299 & 111.7472 & 0.0221 & 0.8027 & 0.7626 & 0.7764 \tabularnewline
49 & 91 & 110.7749 & 102.0937 & 119.4562 & 0 & 0.9999 & 0.5068 & 0.9934 \tabularnewline
50 & 93.2 & 112.527 & 103.6072 & 121.4469 & 0 & 1 & 0.4761 & 0.9974 \tabularnewline
51 & 103.1 & 112.9731 & 103.9717 & 121.9745 & 0.0158 & 1 & 0.7552 & 0.9979 \tabularnewline
52 & 94.1 & 116.6253 & 107.6214 & 125.6292 & 0 & 0.9984 & 0.4416 & 0.9999 \tabularnewline
53 & 91.8 & 110.389 & 101.2532 & 119.5248 & 0 & 0.9998 & 0.6089 & 0.9885 \tabularnewline
54 & 102.7 & 117.6143 & 108.4323 & 126.7964 & 7e-04 & 1 & 0.6428 & 0.9999 \tabularnewline
55 & 82.6 & 96.5242 & 87.3123 & 105.7361 & 0.0015 & 0.0944 & 0.5444 & 0.2429 \tabularnewline
56 & 89.1 & 101.7125 & 92.4173 & 111.0076 & 0.0039 & 1 & 0.6566 & 0.6566 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113236&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[44])[/C][/ROW]
[ROW][C]32[/C][C]104.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]112.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]122.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]113.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]110.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]112.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]109.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]117.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]109.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]115.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]99.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]116.8[/C][C]117.4024[/C][C]110.7403[/C][C]124.0645[/C][C]0.4297[/C][C]1[/C][C]0.9254[/C][C]1[/C][/ROW]
[ROW][C]46[/C][C]115.7[/C][C]122.4946[/C][C]114.6345[/C][C]130.3546[/C][C]0.0451[/C][C]0.9222[/C][C]0.5094[/C][C]1[/C][/ROW]
[ROW][C]47[/C][C]99.4[/C][C]112.8779[/C][C]104.6195[/C][C]121.1363[/C][C]7e-04[/C][C]0.2515[/C][C]0.4601[/C][C]0.999[/C][/ROW]
[ROW][C]48[/C][C]94.3[/C][C]103.1385[/C][C]94.5299[/C][C]111.7472[/C][C]0.0221[/C][C]0.8027[/C][C]0.7626[/C][C]0.7764[/C][/ROW]
[ROW][C]49[/C][C]91[/C][C]110.7749[/C][C]102.0937[/C][C]119.4562[/C][C]0[/C][C]0.9999[/C][C]0.5068[/C][C]0.9934[/C][/ROW]
[ROW][C]50[/C][C]93.2[/C][C]112.527[/C][C]103.6072[/C][C]121.4469[/C][C]0[/C][C]1[/C][C]0.4761[/C][C]0.9974[/C][/ROW]
[ROW][C]51[/C][C]103.1[/C][C]112.9731[/C][C]103.9717[/C][C]121.9745[/C][C]0.0158[/C][C]1[/C][C]0.7552[/C][C]0.9979[/C][/ROW]
[ROW][C]52[/C][C]94.1[/C][C]116.6253[/C][C]107.6214[/C][C]125.6292[/C][C]0[/C][C]0.9984[/C][C]0.4416[/C][C]0.9999[/C][/ROW]
[ROW][C]53[/C][C]91.8[/C][C]110.389[/C][C]101.2532[/C][C]119.5248[/C][C]0[/C][C]0.9998[/C][C]0.6089[/C][C]0.9885[/C][/ROW]
[ROW][C]54[/C][C]102.7[/C][C]117.6143[/C][C]108.4323[/C][C]126.7964[/C][C]7e-04[/C][C]1[/C][C]0.6428[/C][C]0.9999[/C][/ROW]
[ROW][C]55[/C][C]82.6[/C][C]96.5242[/C][C]87.3123[/C][C]105.7361[/C][C]0.0015[/C][C]0.0944[/C][C]0.5444[/C][C]0.2429[/C][/ROW]
[ROW][C]56[/C][C]89.1[/C][C]101.7125[/C][C]92.4173[/C][C]111.0076[/C][C]0.0039[/C][C]1[/C][C]0.6566[/C][C]0.6566[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113236&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113236&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[44])
32104.2-------
33112.5-------
34122.4-------
35113.3-------
36100-------
37110.7-------
38112.8-------
39109.8-------
40117.3-------
41109.1-------
42115.9-------
4396-------
4499.8-------
45116.8117.4024110.7403124.06450.429710.92541
46115.7122.4946114.6345130.35460.04510.92220.50941
4799.4112.8779104.6195121.13637e-040.25150.46010.999
4894.3103.138594.5299111.74720.02210.80270.76260.7764
4991110.7749102.0937119.456200.99990.50680.9934
5093.2112.527103.6072121.4469010.47610.9974
51103.1112.9731103.9717121.97450.015810.75520.9979
5294.1116.6253107.6214125.629200.99840.44160.9999
5391.8110.389101.2532119.524800.99980.60890.9885
54102.7117.6143108.4323126.79647e-0410.64280.9999
5582.696.524287.3123105.73610.00150.09440.54440.2429
5689.1101.712592.4173111.00760.003910.65660.6566







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
450.029-0.005100.362900
460.0327-0.05550.030346.16623.26454.8233
470.0373-0.11940.06181.654176.0618.7213
480.0426-0.08570.066478.119776.57578.7508
490.04-0.17850.0888391.0486139.470311.8098
500.0404-0.17180.1027373.5347178.48113.3597
510.0407-0.08740.100597.4785166.909212.9193
520.0394-0.19310.1121507.3905209.469414.4731
530.0422-0.16840.1183345.5516224.589614.9863
540.0398-0.12680.1192222.4375224.374414.9791
550.0487-0.14430.1215193.8824221.602414.8863
560.0466-0.1240.1217159.0739216.391714.7103

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
45 & 0.029 & -0.0051 & 0 & 0.3629 & 0 & 0 \tabularnewline
46 & 0.0327 & -0.0555 & 0.0303 & 46.166 & 23.2645 & 4.8233 \tabularnewline
47 & 0.0373 & -0.1194 & 0.06 & 181.6541 & 76.061 & 8.7213 \tabularnewline
48 & 0.0426 & -0.0857 & 0.0664 & 78.1197 & 76.5757 & 8.7508 \tabularnewline
49 & 0.04 & -0.1785 & 0.0888 & 391.0486 & 139.4703 & 11.8098 \tabularnewline
50 & 0.0404 & -0.1718 & 0.1027 & 373.5347 & 178.481 & 13.3597 \tabularnewline
51 & 0.0407 & -0.0874 & 0.1005 & 97.4785 & 166.9092 & 12.9193 \tabularnewline
52 & 0.0394 & -0.1931 & 0.1121 & 507.3905 & 209.4694 & 14.4731 \tabularnewline
53 & 0.0422 & -0.1684 & 0.1183 & 345.5516 & 224.5896 & 14.9863 \tabularnewline
54 & 0.0398 & -0.1268 & 0.1192 & 222.4375 & 224.3744 & 14.9791 \tabularnewline
55 & 0.0487 & -0.1443 & 0.1215 & 193.8824 & 221.6024 & 14.8863 \tabularnewline
56 & 0.0466 & -0.124 & 0.1217 & 159.0739 & 216.3917 & 14.7103 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113236&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]45[/C][C]0.029[/C][C]-0.0051[/C][C]0[/C][C]0.3629[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]46[/C][C]0.0327[/C][C]-0.0555[/C][C]0.0303[/C][C]46.166[/C][C]23.2645[/C][C]4.8233[/C][/ROW]
[ROW][C]47[/C][C]0.0373[/C][C]-0.1194[/C][C]0.06[/C][C]181.6541[/C][C]76.061[/C][C]8.7213[/C][/ROW]
[ROW][C]48[/C][C]0.0426[/C][C]-0.0857[/C][C]0.0664[/C][C]78.1197[/C][C]76.5757[/C][C]8.7508[/C][/ROW]
[ROW][C]49[/C][C]0.04[/C][C]-0.1785[/C][C]0.0888[/C][C]391.0486[/C][C]139.4703[/C][C]11.8098[/C][/ROW]
[ROW][C]50[/C][C]0.0404[/C][C]-0.1718[/C][C]0.1027[/C][C]373.5347[/C][C]178.481[/C][C]13.3597[/C][/ROW]
[ROW][C]51[/C][C]0.0407[/C][C]-0.0874[/C][C]0.1005[/C][C]97.4785[/C][C]166.9092[/C][C]12.9193[/C][/ROW]
[ROW][C]52[/C][C]0.0394[/C][C]-0.1931[/C][C]0.1121[/C][C]507.3905[/C][C]209.4694[/C][C]14.4731[/C][/ROW]
[ROW][C]53[/C][C]0.0422[/C][C]-0.1684[/C][C]0.1183[/C][C]345.5516[/C][C]224.5896[/C][C]14.9863[/C][/ROW]
[ROW][C]54[/C][C]0.0398[/C][C]-0.1268[/C][C]0.1192[/C][C]222.4375[/C][C]224.3744[/C][C]14.9791[/C][/ROW]
[ROW][C]55[/C][C]0.0487[/C][C]-0.1443[/C][C]0.1215[/C][C]193.8824[/C][C]221.6024[/C][C]14.8863[/C][/ROW]
[ROW][C]56[/C][C]0.0466[/C][C]-0.124[/C][C]0.1217[/C][C]159.0739[/C][C]216.3917[/C][C]14.7103[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113236&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113236&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
450.029-0.005100.362900
460.0327-0.05550.030346.16623.26454.8233
470.0373-0.11940.06181.654176.0618.7213
480.0426-0.08570.066478.119776.57578.7508
490.04-0.17850.0888391.0486139.470311.8098
500.0404-0.17180.1027373.5347178.48113.3597
510.0407-0.08740.100597.4785166.909212.9193
520.0394-0.19310.1121507.3905209.469414.4731
530.0422-0.16840.1183345.5516224.589614.9863
540.0398-0.12680.1192222.4375224.374414.9791
550.0487-0.14430.1215193.8824221.602414.8863
560.0466-0.1240.1217159.0739216.391714.7103



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