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 16:44:16 +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/t1292949730he89f9p72z1ehcn.htm/, Retrieved Tue, 14 May 2024 16:44:35 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113745, Retrieved Tue, 14 May 2024 16:44:35 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact129
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]
-   PD      [ARIMA Forecasting] [WS9 - ARIMA Forec...] [2010-12-04 16:25:58] [8ef49741e164ec6343c90c7935194465]
-   P         [ARIMA Forecasting] [WS9 - ARIMA Forec...] [2010-12-04 16:58:46] [8ef49741e164ec6343c90c7935194465]
- R  D          [ARIMA Forecasting] [WS 9 - Forecasting] [2010-12-06 21:55:40] [18fa53e8b37a5effc0c5f8a5122cdd2d]
-   PD              [ARIMA Forecasting] [Paper - C&S ARIMA ] [2010-12-21 16:44:16] [89d441ae0711e9b79b5d358f420c1317] [Current]
Feedback Forum

Post a new message
Dataseries X:
105.31
105.63
106.02
105.85
106.57
106.48
106.60
106.75
106.69
106.69
106.93
107.21
107.88
108.84
108.96
109.52
108.45
108.67
108.96
108.76
107.85
108.78
107.51
108.83
111.54
111.74
112.04
111.74
111.81
111.86
114.23
114.80
115.17
115.11
114.43
114.66
115.11
117.74
118.18
118.56
117.63
117.71
117.46
117.37
117.34
117.09
116.65
116.71
116.82
117.33
117.95
123.53
124.91
125.99
126.29
125.68
125.52




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113745&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113745&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113745&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'George Udny Yule' @ 72.249.76.132







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[45])
33115.17-------
34115.11-------
35114.43-------
36114.66-------
37115.11-------
38117.74-------
39118.18-------
40118.56-------
41117.63-------
42117.71-------
43117.46-------
44117.37-------
45117.34-------
46117.09117.3359115.6906118.98120.38480.49810.9960.4981
47116.65117.3353114.8446119.82610.29480.57650.98890.4985
48116.71117.3353114.2021120.46840.34780.66590.95290.4988
49116.82117.3353113.6685121.0020.39150.63090.88290.499
50117.33117.3353113.2029121.46760.4990.59650.42390.4991
51117.95117.3353112.7847121.88580.39560.50090.3580.4992
52123.53117.3353112.4019122.26860.00690.40350.31330.4992
53124.91117.3353112.0466122.62390.00250.01080.45650.4993
54125.99117.3353111.7138122.95670.00130.00410.4480.4993
55126.29117.3353111.3996123.27090.00160.00210.48360.4994
56125.68117.3353111.1013123.56930.00430.00240.49560.4994
57125.52117.3353110.8165123.8540.00690.00610.49940.4994

\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[45]) \tabularnewline
33 & 115.17 & - & - & - & - & - & - & - \tabularnewline
34 & 115.11 & - & - & - & - & - & - & - \tabularnewline
35 & 114.43 & - & - & - & - & - & - & - \tabularnewline
36 & 114.66 & - & - & - & - & - & - & - \tabularnewline
37 & 115.11 & - & - & - & - & - & - & - \tabularnewline
38 & 117.74 & - & - & - & - & - & - & - \tabularnewline
39 & 118.18 & - & - & - & - & - & - & - \tabularnewline
40 & 118.56 & - & - & - & - & - & - & - \tabularnewline
41 & 117.63 & - & - & - & - & - & - & - \tabularnewline
42 & 117.71 & - & - & - & - & - & - & - \tabularnewline
43 & 117.46 & - & - & - & - & - & - & - \tabularnewline
44 & 117.37 & - & - & - & - & - & - & - \tabularnewline
45 & 117.34 & - & - & - & - & - & - & - \tabularnewline
46 & 117.09 & 117.3359 & 115.6906 & 118.9812 & 0.3848 & 0.4981 & 0.996 & 0.4981 \tabularnewline
47 & 116.65 & 117.3353 & 114.8446 & 119.8261 & 0.2948 & 0.5765 & 0.9889 & 0.4985 \tabularnewline
48 & 116.71 & 117.3353 & 114.2021 & 120.4684 & 0.3478 & 0.6659 & 0.9529 & 0.4988 \tabularnewline
49 & 116.82 & 117.3353 & 113.6685 & 121.002 & 0.3915 & 0.6309 & 0.8829 & 0.499 \tabularnewline
50 & 117.33 & 117.3353 & 113.2029 & 121.4676 & 0.499 & 0.5965 & 0.4239 & 0.4991 \tabularnewline
51 & 117.95 & 117.3353 & 112.7847 & 121.8858 & 0.3956 & 0.5009 & 0.358 & 0.4992 \tabularnewline
52 & 123.53 & 117.3353 & 112.4019 & 122.2686 & 0.0069 & 0.4035 & 0.3133 & 0.4992 \tabularnewline
53 & 124.91 & 117.3353 & 112.0466 & 122.6239 & 0.0025 & 0.0108 & 0.4565 & 0.4993 \tabularnewline
54 & 125.99 & 117.3353 & 111.7138 & 122.9567 & 0.0013 & 0.0041 & 0.448 & 0.4993 \tabularnewline
55 & 126.29 & 117.3353 & 111.3996 & 123.2709 & 0.0016 & 0.0021 & 0.4836 & 0.4994 \tabularnewline
56 & 125.68 & 117.3353 & 111.1013 & 123.5693 & 0.0043 & 0.0024 & 0.4956 & 0.4994 \tabularnewline
57 & 125.52 & 117.3353 & 110.8165 & 123.854 & 0.0069 & 0.0061 & 0.4994 & 0.4994 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113745&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[45])[/C][/ROW]
[ROW][C]33[/C][C]115.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]115.11[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]114.43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]114.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]115.11[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]117.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]118.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]118.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]117.63[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]117.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]117.46[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]117.37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]117.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]117.09[/C][C]117.3359[/C][C]115.6906[/C][C]118.9812[/C][C]0.3848[/C][C]0.4981[/C][C]0.996[/C][C]0.4981[/C][/ROW]
[ROW][C]47[/C][C]116.65[/C][C]117.3353[/C][C]114.8446[/C][C]119.8261[/C][C]0.2948[/C][C]0.5765[/C][C]0.9889[/C][C]0.4985[/C][/ROW]
[ROW][C]48[/C][C]116.71[/C][C]117.3353[/C][C]114.2021[/C][C]120.4684[/C][C]0.3478[/C][C]0.6659[/C][C]0.9529[/C][C]0.4988[/C][/ROW]
[ROW][C]49[/C][C]116.82[/C][C]117.3353[/C][C]113.6685[/C][C]121.002[/C][C]0.3915[/C][C]0.6309[/C][C]0.8829[/C][C]0.499[/C][/ROW]
[ROW][C]50[/C][C]117.33[/C][C]117.3353[/C][C]113.2029[/C][C]121.4676[/C][C]0.499[/C][C]0.5965[/C][C]0.4239[/C][C]0.4991[/C][/ROW]
[ROW][C]51[/C][C]117.95[/C][C]117.3353[/C][C]112.7847[/C][C]121.8858[/C][C]0.3956[/C][C]0.5009[/C][C]0.358[/C][C]0.4992[/C][/ROW]
[ROW][C]52[/C][C]123.53[/C][C]117.3353[/C][C]112.4019[/C][C]122.2686[/C][C]0.0069[/C][C]0.4035[/C][C]0.3133[/C][C]0.4992[/C][/ROW]
[ROW][C]53[/C][C]124.91[/C][C]117.3353[/C][C]112.0466[/C][C]122.6239[/C][C]0.0025[/C][C]0.0108[/C][C]0.4565[/C][C]0.4993[/C][/ROW]
[ROW][C]54[/C][C]125.99[/C][C]117.3353[/C][C]111.7138[/C][C]122.9567[/C][C]0.0013[/C][C]0.0041[/C][C]0.448[/C][C]0.4993[/C][/ROW]
[ROW][C]55[/C][C]126.29[/C][C]117.3353[/C][C]111.3996[/C][C]123.2709[/C][C]0.0016[/C][C]0.0021[/C][C]0.4836[/C][C]0.4994[/C][/ROW]
[ROW][C]56[/C][C]125.68[/C][C]117.3353[/C][C]111.1013[/C][C]123.5693[/C][C]0.0043[/C][C]0.0024[/C][C]0.4956[/C][C]0.4994[/C][/ROW]
[ROW][C]57[/C][C]125.52[/C][C]117.3353[/C][C]110.8165[/C][C]123.854[/C][C]0.0069[/C][C]0.0061[/C][C]0.4994[/C][C]0.4994[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113745&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113745&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[45])
33115.17-------
34115.11-------
35114.43-------
36114.66-------
37115.11-------
38117.74-------
39118.18-------
40118.56-------
41117.63-------
42117.71-------
43117.46-------
44117.37-------
45117.34-------
46117.09117.3359115.6906118.98120.38480.49810.9960.4981
47116.65117.3353114.8446119.82610.29480.57650.98890.4985
48116.71117.3353114.2021120.46840.34780.66590.95290.4988
49116.82117.3353113.6685121.0020.39150.63090.88290.499
50117.33117.3353113.2029121.46760.4990.59650.42390.4991
51117.95117.3353112.7847121.88580.39560.50090.3580.4992
52123.53117.3353112.4019122.26860.00690.40350.31330.4992
53124.91117.3353112.0466122.62390.00250.01080.45650.4993
54125.99117.3353111.7138122.95670.00130.00410.4480.4993
55126.29117.3353111.3996123.27090.00160.00210.48360.4994
56125.68117.3353111.1013123.56930.00430.00240.49560.4994
57125.52117.3353110.8165123.8540.00690.00610.49940.4994







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
460.0072-0.002100.060500
470.0108-0.00580.0040.46970.26510.5149
480.0136-0.00530.00440.3910.3070.5541
490.0159-0.00440.00440.26550.29670.5447
500.01800.003500.23730.4872
510.01980.00520.00380.37790.26080.5106
520.02150.05280.010838.37495.70562.3886
530.0230.06460.017557.376812.16453.4878
540.02440.07380.023874.904619.13564.3744
550.02580.07630.02980.187525.24085.024
560.02710.07110.032969.634829.27665.4108
570.02830.06980.035966.990132.41945.6938

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
46 & 0.0072 & -0.0021 & 0 & 0.0605 & 0 & 0 \tabularnewline
47 & 0.0108 & -0.0058 & 0.004 & 0.4697 & 0.2651 & 0.5149 \tabularnewline
48 & 0.0136 & -0.0053 & 0.0044 & 0.391 & 0.307 & 0.5541 \tabularnewline
49 & 0.0159 & -0.0044 & 0.0044 & 0.2655 & 0.2967 & 0.5447 \tabularnewline
50 & 0.018 & 0 & 0.0035 & 0 & 0.2373 & 0.4872 \tabularnewline
51 & 0.0198 & 0.0052 & 0.0038 & 0.3779 & 0.2608 & 0.5106 \tabularnewline
52 & 0.0215 & 0.0528 & 0.0108 & 38.3749 & 5.7056 & 2.3886 \tabularnewline
53 & 0.023 & 0.0646 & 0.0175 & 57.3768 & 12.1645 & 3.4878 \tabularnewline
54 & 0.0244 & 0.0738 & 0.0238 & 74.9046 & 19.1356 & 4.3744 \tabularnewline
55 & 0.0258 & 0.0763 & 0.029 & 80.1875 & 25.2408 & 5.024 \tabularnewline
56 & 0.0271 & 0.0711 & 0.0329 & 69.6348 & 29.2766 & 5.4108 \tabularnewline
57 & 0.0283 & 0.0698 & 0.0359 & 66.9901 & 32.4194 & 5.6938 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113745&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]46[/C][C]0.0072[/C][C]-0.0021[/C][C]0[/C][C]0.0605[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]47[/C][C]0.0108[/C][C]-0.0058[/C][C]0.004[/C][C]0.4697[/C][C]0.2651[/C][C]0.5149[/C][/ROW]
[ROW][C]48[/C][C]0.0136[/C][C]-0.0053[/C][C]0.0044[/C][C]0.391[/C][C]0.307[/C][C]0.5541[/C][/ROW]
[ROW][C]49[/C][C]0.0159[/C][C]-0.0044[/C][C]0.0044[/C][C]0.2655[/C][C]0.2967[/C][C]0.5447[/C][/ROW]
[ROW][C]50[/C][C]0.018[/C][C]0[/C][C]0.0035[/C][C]0[/C][C]0.2373[/C][C]0.4872[/C][/ROW]
[ROW][C]51[/C][C]0.0198[/C][C]0.0052[/C][C]0.0038[/C][C]0.3779[/C][C]0.2608[/C][C]0.5106[/C][/ROW]
[ROW][C]52[/C][C]0.0215[/C][C]0.0528[/C][C]0.0108[/C][C]38.3749[/C][C]5.7056[/C][C]2.3886[/C][/ROW]
[ROW][C]53[/C][C]0.023[/C][C]0.0646[/C][C]0.0175[/C][C]57.3768[/C][C]12.1645[/C][C]3.4878[/C][/ROW]
[ROW][C]54[/C][C]0.0244[/C][C]0.0738[/C][C]0.0238[/C][C]74.9046[/C][C]19.1356[/C][C]4.3744[/C][/ROW]
[ROW][C]55[/C][C]0.0258[/C][C]0.0763[/C][C]0.029[/C][C]80.1875[/C][C]25.2408[/C][C]5.024[/C][/ROW]
[ROW][C]56[/C][C]0.0271[/C][C]0.0711[/C][C]0.0329[/C][C]69.6348[/C][C]29.2766[/C][C]5.4108[/C][/ROW]
[ROW][C]57[/C][C]0.0283[/C][C]0.0698[/C][C]0.0359[/C][C]66.9901[/C][C]32.4194[/C][C]5.6938[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113745&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113745&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
460.0072-0.002100.060500
470.0108-0.00580.0040.46970.26510.5149
480.0136-0.00530.00440.3910.3070.5541
490.0159-0.00440.00440.26550.29670.5447
500.01800.003500.23730.4872
510.01980.00520.00380.37790.26080.5106
520.02150.05280.010838.37495.70562.3886
530.0230.06460.017557.376812.16453.4878
540.02440.07380.023874.904619.13564.3744
550.02580.07630.02980.187525.24085.024
560.02710.07110.032969.634829.27665.4108
570.02830.06980.035966.990132.41945.6938



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