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 computationMon, 22 Dec 2008 07:22:41 -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/22/t1229956044nix7c8bnm883vci.htm/, Retrieved Mon, 13 May 2024 14:53:30 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36084, Retrieved Mon, 13 May 2024 14:53:30 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact175
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Standard Deviation-Mean Plot] [] [2008-12-12 12:13:32] [fad8a251ac01c156a8ae23a83577546f]
- RMPD  [(Partial) Autocorrelation Function] [Consumptiegoederen] [2008-12-12 13:39:25] [fad8a251ac01c156a8ae23a83577546f]
-   P     [(Partial) Autocorrelation Function] [auto corr cons] [2008-12-19 10:53:37] [fad8a251ac01c156a8ae23a83577546f]
-   P       [(Partial) Autocorrelation Function] [autocorr cons D] [2008-12-21 18:04:22] [fad8a251ac01c156a8ae23a83577546f]
- RMPD        [ARIMA Backward Selection] [Arima backw sel n...] [2008-12-22 10:23:57] [fad8a251ac01c156a8ae23a83577546f]
- RMPD            [ARIMA Forecasting] [forecast inv] [2008-12-22 14:22:41] [fa8b44cd657c07c6ee11bb2476ca3f8d] [Current]
Feedback Forum

Post a new message
Dataseries X:
93,0
99,2
112,2
112,1
103,3
108,2
90,4
72,8
111,0
117,9
111,3
110,5
94,8
100,4
132,1
114,6
101,9
130,2
84,0
86,4
122,3
120,9
110,2
112,6
102,0
105,0
130,5
115,5
103,7
130,9
89,1
93,8
123,8
111,9
118,3
116,9
103,6
116,6
141,3
107,0
125,2
136,4
91,6
95,3
132,3
130,6
131,9
118,6
114,3
111,3
126,5
112,1
119,3
142,4
101,1
97,4
129,1
136,9
129,8
123,9




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36084&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36084&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36084&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[48])
36116.9-------
37103.6-------
38116.6-------
39141.3-------
40107-------
41125.2-------
42136.4-------
4391.6-------
4495.3-------
45132.3-------
46130.6-------
47131.9-------
48118.6-------
49114.3115.7396100.59130.88910.42610.35570.94190.3557
50111.3124.1183108.9669139.26970.04860.8980.83460.7623
51126.5144.4934129.0952159.89170.01110.65780.9995
52112.1114.676597.3676131.98540.38520.09030.80760.3284
53119.3129.7794112.4544147.10440.11790.97730.69780.897
54142.4139.5099121.9505157.06940.37350.9880.63580.9902
55101.196.439878.371114.50860.306600.70020.0081
5697.498.302880.208116.39750.46110.38090.62750.014
57129.1134.8285116.5928153.06410.26910.60710.9594
58136.9133.6813115.2871152.07550.36580.68730.62870.946
59129.8133.956115.5374152.37470.32910.3770.58660.9489
60123.9120.4951102.0055138.98470.35910.1620.57960.5796

\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[48]) \tabularnewline
36 & 116.9 & - & - & - & - & - & - & - \tabularnewline
37 & 103.6 & - & - & - & - & - & - & - \tabularnewline
38 & 116.6 & - & - & - & - & - & - & - \tabularnewline
39 & 141.3 & - & - & - & - & - & - & - \tabularnewline
40 & 107 & - & - & - & - & - & - & - \tabularnewline
41 & 125.2 & - & - & - & - & - & - & - \tabularnewline
42 & 136.4 & - & - & - & - & - & - & - \tabularnewline
43 & 91.6 & - & - & - & - & - & - & - \tabularnewline
44 & 95.3 & - & - & - & - & - & - & - \tabularnewline
45 & 132.3 & - & - & - & - & - & - & - \tabularnewline
46 & 130.6 & - & - & - & - & - & - & - \tabularnewline
47 & 131.9 & - & - & - & - & - & - & - \tabularnewline
48 & 118.6 & - & - & - & - & - & - & - \tabularnewline
49 & 114.3 & 115.7396 & 100.59 & 130.8891 & 0.4261 & 0.3557 & 0.9419 & 0.3557 \tabularnewline
50 & 111.3 & 124.1183 & 108.9669 & 139.2697 & 0.0486 & 0.898 & 0.8346 & 0.7623 \tabularnewline
51 & 126.5 & 144.4934 & 129.0952 & 159.8917 & 0.011 & 1 & 0.6578 & 0.9995 \tabularnewline
52 & 112.1 & 114.6765 & 97.3676 & 131.9854 & 0.3852 & 0.0903 & 0.8076 & 0.3284 \tabularnewline
53 & 119.3 & 129.7794 & 112.4544 & 147.1044 & 0.1179 & 0.9773 & 0.6978 & 0.897 \tabularnewline
54 & 142.4 & 139.5099 & 121.9505 & 157.0694 & 0.3735 & 0.988 & 0.6358 & 0.9902 \tabularnewline
55 & 101.1 & 96.4398 & 78.371 & 114.5086 & 0.3066 & 0 & 0.7002 & 0.0081 \tabularnewline
56 & 97.4 & 98.3028 & 80.208 & 116.3975 & 0.4611 & 0.3809 & 0.6275 & 0.014 \tabularnewline
57 & 129.1 & 134.8285 & 116.5928 & 153.0641 & 0.269 & 1 & 0.6071 & 0.9594 \tabularnewline
58 & 136.9 & 133.6813 & 115.2871 & 152.0755 & 0.3658 & 0.6873 & 0.6287 & 0.946 \tabularnewline
59 & 129.8 & 133.956 & 115.5374 & 152.3747 & 0.3291 & 0.377 & 0.5866 & 0.9489 \tabularnewline
60 & 123.9 & 120.4951 & 102.0055 & 138.9847 & 0.3591 & 0.162 & 0.5796 & 0.5796 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36084&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[48])[/C][/ROW]
[ROW][C]36[/C][C]116.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]103.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]116.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]141.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]107[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]125.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]136.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]91.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]95.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]132.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]130.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]131.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]118.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]114.3[/C][C]115.7396[/C][C]100.59[/C][C]130.8891[/C][C]0.4261[/C][C]0.3557[/C][C]0.9419[/C][C]0.3557[/C][/ROW]
[ROW][C]50[/C][C]111.3[/C][C]124.1183[/C][C]108.9669[/C][C]139.2697[/C][C]0.0486[/C][C]0.898[/C][C]0.8346[/C][C]0.7623[/C][/ROW]
[ROW][C]51[/C][C]126.5[/C][C]144.4934[/C][C]129.0952[/C][C]159.8917[/C][C]0.011[/C][C]1[/C][C]0.6578[/C][C]0.9995[/C][/ROW]
[ROW][C]52[/C][C]112.1[/C][C]114.6765[/C][C]97.3676[/C][C]131.9854[/C][C]0.3852[/C][C]0.0903[/C][C]0.8076[/C][C]0.3284[/C][/ROW]
[ROW][C]53[/C][C]119.3[/C][C]129.7794[/C][C]112.4544[/C][C]147.1044[/C][C]0.1179[/C][C]0.9773[/C][C]0.6978[/C][C]0.897[/C][/ROW]
[ROW][C]54[/C][C]142.4[/C][C]139.5099[/C][C]121.9505[/C][C]157.0694[/C][C]0.3735[/C][C]0.988[/C][C]0.6358[/C][C]0.9902[/C][/ROW]
[ROW][C]55[/C][C]101.1[/C][C]96.4398[/C][C]78.371[/C][C]114.5086[/C][C]0.3066[/C][C]0[/C][C]0.7002[/C][C]0.0081[/C][/ROW]
[ROW][C]56[/C][C]97.4[/C][C]98.3028[/C][C]80.208[/C][C]116.3975[/C][C]0.4611[/C][C]0.3809[/C][C]0.6275[/C][C]0.014[/C][/ROW]
[ROW][C]57[/C][C]129.1[/C][C]134.8285[/C][C]116.5928[/C][C]153.0641[/C][C]0.269[/C][C]1[/C][C]0.6071[/C][C]0.9594[/C][/ROW]
[ROW][C]58[/C][C]136.9[/C][C]133.6813[/C][C]115.2871[/C][C]152.0755[/C][C]0.3658[/C][C]0.6873[/C][C]0.6287[/C][C]0.946[/C][/ROW]
[ROW][C]59[/C][C]129.8[/C][C]133.956[/C][C]115.5374[/C][C]152.3747[/C][C]0.3291[/C][C]0.377[/C][C]0.5866[/C][C]0.9489[/C][/ROW]
[ROW][C]60[/C][C]123.9[/C][C]120.4951[/C][C]102.0055[/C][C]138.9847[/C][C]0.3591[/C][C]0.162[/C][C]0.5796[/C][C]0.5796[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36084&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36084&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[48])
36116.9-------
37103.6-------
38116.6-------
39141.3-------
40107-------
41125.2-------
42136.4-------
4391.6-------
4495.3-------
45132.3-------
46130.6-------
47131.9-------
48118.6-------
49114.3115.7396100.59130.88910.42610.35570.94190.3557
50111.3124.1183108.9669139.26970.04860.8980.83460.7623
51126.5144.4934129.0952159.89170.01110.65780.9995
52112.1114.676597.3676131.98540.38520.09030.80760.3284
53119.3129.7794112.4544147.10440.11790.97730.69780.897
54142.4139.5099121.9505157.06940.37350.9880.63580.9902
55101.196.439878.371114.50860.306600.70020.0081
5697.498.302880.208116.39750.46110.38090.62750.014
57129.1134.8285116.5928153.06410.26910.60710.9594
58136.9133.6813115.2871152.07550.36580.68730.62870.946
59129.8133.956115.5374152.37470.32910.3770.58660.9489
60123.9120.4951102.0055138.98470.35910.1620.57960.5796







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0668-0.01240.0012.07240.17270.4156
500.0623-0.10330.0086164.309213.69243.7003
510.0544-0.12450.0104323.763226.98035.1943
520.077-0.02250.00196.63840.55320.7438
530.0681-0.08070.0067109.81839.15153.0251
540.06420.02070.00178.35250.6960.8343
550.09560.04830.00421.71711.80981.3453
560.0939-0.00928e-040.8150.06790.2606
570.069-0.04250.003532.81552.73461.6537
580.07020.02410.00210.36020.86330.9292
590.0702-0.0310.002617.27271.43941.1997
600.07830.02830.002411.59310.96610.9829

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0668 & -0.0124 & 0.001 & 2.0724 & 0.1727 & 0.4156 \tabularnewline
50 & 0.0623 & -0.1033 & 0.0086 & 164.3092 & 13.6924 & 3.7003 \tabularnewline
51 & 0.0544 & -0.1245 & 0.0104 & 323.7632 & 26.9803 & 5.1943 \tabularnewline
52 & 0.077 & -0.0225 & 0.0019 & 6.6384 & 0.5532 & 0.7438 \tabularnewline
53 & 0.0681 & -0.0807 & 0.0067 & 109.8183 & 9.1515 & 3.0251 \tabularnewline
54 & 0.0642 & 0.0207 & 0.0017 & 8.3525 & 0.696 & 0.8343 \tabularnewline
55 & 0.0956 & 0.0483 & 0.004 & 21.7171 & 1.8098 & 1.3453 \tabularnewline
56 & 0.0939 & -0.0092 & 8e-04 & 0.815 & 0.0679 & 0.2606 \tabularnewline
57 & 0.069 & -0.0425 & 0.0035 & 32.8155 & 2.7346 & 1.6537 \tabularnewline
58 & 0.0702 & 0.0241 & 0.002 & 10.3602 & 0.8633 & 0.9292 \tabularnewline
59 & 0.0702 & -0.031 & 0.0026 & 17.2727 & 1.4394 & 1.1997 \tabularnewline
60 & 0.0783 & 0.0283 & 0.0024 & 11.5931 & 0.9661 & 0.9829 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36084&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]49[/C][C]0.0668[/C][C]-0.0124[/C][C]0.001[/C][C]2.0724[/C][C]0.1727[/C][C]0.4156[/C][/ROW]
[ROW][C]50[/C][C]0.0623[/C][C]-0.1033[/C][C]0.0086[/C][C]164.3092[/C][C]13.6924[/C][C]3.7003[/C][/ROW]
[ROW][C]51[/C][C]0.0544[/C][C]-0.1245[/C][C]0.0104[/C][C]323.7632[/C][C]26.9803[/C][C]5.1943[/C][/ROW]
[ROW][C]52[/C][C]0.077[/C][C]-0.0225[/C][C]0.0019[/C][C]6.6384[/C][C]0.5532[/C][C]0.7438[/C][/ROW]
[ROW][C]53[/C][C]0.0681[/C][C]-0.0807[/C][C]0.0067[/C][C]109.8183[/C][C]9.1515[/C][C]3.0251[/C][/ROW]
[ROW][C]54[/C][C]0.0642[/C][C]0.0207[/C][C]0.0017[/C][C]8.3525[/C][C]0.696[/C][C]0.8343[/C][/ROW]
[ROW][C]55[/C][C]0.0956[/C][C]0.0483[/C][C]0.004[/C][C]21.7171[/C][C]1.8098[/C][C]1.3453[/C][/ROW]
[ROW][C]56[/C][C]0.0939[/C][C]-0.0092[/C][C]8e-04[/C][C]0.815[/C][C]0.0679[/C][C]0.2606[/C][/ROW]
[ROW][C]57[/C][C]0.069[/C][C]-0.0425[/C][C]0.0035[/C][C]32.8155[/C][C]2.7346[/C][C]1.6537[/C][/ROW]
[ROW][C]58[/C][C]0.0702[/C][C]0.0241[/C][C]0.002[/C][C]10.3602[/C][C]0.8633[/C][C]0.9292[/C][/ROW]
[ROW][C]59[/C][C]0.0702[/C][C]-0.031[/C][C]0.0026[/C][C]17.2727[/C][C]1.4394[/C][C]1.1997[/C][/ROW]
[ROW][C]60[/C][C]0.0783[/C][C]0.0283[/C][C]0.0024[/C][C]11.5931[/C][C]0.9661[/C][C]0.9829[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36084&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36084&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
490.0668-0.01240.0012.07240.17270.4156
500.0623-0.10330.0086164.309213.69243.7003
510.0544-0.12450.0104323.763226.98035.1943
520.077-0.02250.00196.63840.55320.7438
530.0681-0.08070.0067109.81839.15153.0251
540.06420.02070.00178.35250.6960.8343
550.09560.04830.00421.71711.80981.3453
560.0939-0.00928e-040.8150.06790.2606
570.069-0.04250.003532.81552.73461.6537
580.07020.02410.00210.36020.86330.9292
590.0702-0.0310.002617.27271.43941.1997
600.07830.02830.002411.59310.96610.9829



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