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 09:42:36 -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/t12299642344vfr1rmrwpdw6tk.htm/, Retrieved Sun, 12 May 2024 22:07:18 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36139, Retrieved Sun, 12 May 2024 22:07:18 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact164
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] [forecasting duur ...] [2008-12-22 16:42:36] [fa8b44cd657c07c6ee11bb2476ca3f8d] [Current]
Feedback Forum

Post a new message
Dataseries X:
72.5
72.0
98.8
75.2
81.2
88.0
54.6
68.6
101.5
93.4
84.5
91.4
64.5
64.5
117.3
73.5
79.7
102.6
57.9
73.1
102.4
82.3
89.1
84.7
81.4
67.5
113.9
83.8
73.9
103.9
67.9
62.5
125.4
79.1
106.3
96.2
94.3
85.6
117.4
88.5
124.2
119.3
76.8
70.6
122.1
109.5
119.9
102.3
79.6
78.2
103.6
77.8
99.1
105.7
84.1
88.7
108.0
98.1
101.0
82.0




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 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 & 4 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=36139&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]4 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=36139&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36139&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 time4 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[48])
3696.2-------
3794.3-------
3885.6-------
39117.4-------
4088.5-------
41124.2-------
42119.3-------
4376.8-------
4470.6-------
45122.1-------
46109.5-------
47119.9-------
48102.3-------
4979.692.932570.1224115.74250.1260.21040.45320.2104
5078.282.826459.2933106.35950.350.60590.40870.0524
51103.6122.894997.2427148.5470.07020.99970.66270.9422
5277.886.096359.9974112.19530.26660.09430.42840.1118
5399.1109.051782.453135.65050.23170.98940.13220.6906
54105.7114.664787.8807141.44880.25590.87260.36720.8172
5584.170.884643.958397.81090.1680.00560.33340.0111
5688.772.807645.813899.80130.12430.20610.56370.0161
57108115.217288.1794142.2550.30040.97270.30890.8255
5898.199.111372.0502126.17240.47080.25990.22590.4087
59101108.024980.9497135.10020.30550.76380.1950.6607
608295.629968.5467122.7130.1620.34880.31460.3146

\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 & 96.2 & - & - & - & - & - & - & - \tabularnewline
37 & 94.3 & - & - & - & - & - & - & - \tabularnewline
38 & 85.6 & - & - & - & - & - & - & - \tabularnewline
39 & 117.4 & - & - & - & - & - & - & - \tabularnewline
40 & 88.5 & - & - & - & - & - & - & - \tabularnewline
41 & 124.2 & - & - & - & - & - & - & - \tabularnewline
42 & 119.3 & - & - & - & - & - & - & - \tabularnewline
43 & 76.8 & - & - & - & - & - & - & - \tabularnewline
44 & 70.6 & - & - & - & - & - & - & - \tabularnewline
45 & 122.1 & - & - & - & - & - & - & - \tabularnewline
46 & 109.5 & - & - & - & - & - & - & - \tabularnewline
47 & 119.9 & - & - & - & - & - & - & - \tabularnewline
48 & 102.3 & - & - & - & - & - & - & - \tabularnewline
49 & 79.6 & 92.9325 & 70.1224 & 115.7425 & 0.126 & 0.2104 & 0.4532 & 0.2104 \tabularnewline
50 & 78.2 & 82.8264 & 59.2933 & 106.3595 & 0.35 & 0.6059 & 0.4087 & 0.0524 \tabularnewline
51 & 103.6 & 122.8949 & 97.2427 & 148.547 & 0.0702 & 0.9997 & 0.6627 & 0.9422 \tabularnewline
52 & 77.8 & 86.0963 & 59.9974 & 112.1953 & 0.2666 & 0.0943 & 0.4284 & 0.1118 \tabularnewline
53 & 99.1 & 109.0517 & 82.453 & 135.6505 & 0.2317 & 0.9894 & 0.1322 & 0.6906 \tabularnewline
54 & 105.7 & 114.6647 & 87.8807 & 141.4488 & 0.2559 & 0.8726 & 0.3672 & 0.8172 \tabularnewline
55 & 84.1 & 70.8846 & 43.9583 & 97.8109 & 0.168 & 0.0056 & 0.3334 & 0.0111 \tabularnewline
56 & 88.7 & 72.8076 & 45.8138 & 99.8013 & 0.1243 & 0.2061 & 0.5637 & 0.0161 \tabularnewline
57 & 108 & 115.2172 & 88.1794 & 142.255 & 0.3004 & 0.9727 & 0.3089 & 0.8255 \tabularnewline
58 & 98.1 & 99.1113 & 72.0502 & 126.1724 & 0.4708 & 0.2599 & 0.2259 & 0.4087 \tabularnewline
59 & 101 & 108.0249 & 80.9497 & 135.1002 & 0.3055 & 0.7638 & 0.195 & 0.6607 \tabularnewline
60 & 82 & 95.6299 & 68.5467 & 122.713 & 0.162 & 0.3488 & 0.3146 & 0.3146 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36139&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]96.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]94.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]85.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]117.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]88.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]124.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]119.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]76.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]70.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]122.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]109.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]119.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]102.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]79.6[/C][C]92.9325[/C][C]70.1224[/C][C]115.7425[/C][C]0.126[/C][C]0.2104[/C][C]0.4532[/C][C]0.2104[/C][/ROW]
[ROW][C]50[/C][C]78.2[/C][C]82.8264[/C][C]59.2933[/C][C]106.3595[/C][C]0.35[/C][C]0.6059[/C][C]0.4087[/C][C]0.0524[/C][/ROW]
[ROW][C]51[/C][C]103.6[/C][C]122.8949[/C][C]97.2427[/C][C]148.547[/C][C]0.0702[/C][C]0.9997[/C][C]0.6627[/C][C]0.9422[/C][/ROW]
[ROW][C]52[/C][C]77.8[/C][C]86.0963[/C][C]59.9974[/C][C]112.1953[/C][C]0.2666[/C][C]0.0943[/C][C]0.4284[/C][C]0.1118[/C][/ROW]
[ROW][C]53[/C][C]99.1[/C][C]109.0517[/C][C]82.453[/C][C]135.6505[/C][C]0.2317[/C][C]0.9894[/C][C]0.1322[/C][C]0.6906[/C][/ROW]
[ROW][C]54[/C][C]105.7[/C][C]114.6647[/C][C]87.8807[/C][C]141.4488[/C][C]0.2559[/C][C]0.8726[/C][C]0.3672[/C][C]0.8172[/C][/ROW]
[ROW][C]55[/C][C]84.1[/C][C]70.8846[/C][C]43.9583[/C][C]97.8109[/C][C]0.168[/C][C]0.0056[/C][C]0.3334[/C][C]0.0111[/C][/ROW]
[ROW][C]56[/C][C]88.7[/C][C]72.8076[/C][C]45.8138[/C][C]99.8013[/C][C]0.1243[/C][C]0.2061[/C][C]0.5637[/C][C]0.0161[/C][/ROW]
[ROW][C]57[/C][C]108[/C][C]115.2172[/C][C]88.1794[/C][C]142.255[/C][C]0.3004[/C][C]0.9727[/C][C]0.3089[/C][C]0.8255[/C][/ROW]
[ROW][C]58[/C][C]98.1[/C][C]99.1113[/C][C]72.0502[/C][C]126.1724[/C][C]0.4708[/C][C]0.2599[/C][C]0.2259[/C][C]0.4087[/C][/ROW]
[ROW][C]59[/C][C]101[/C][C]108.0249[/C][C]80.9497[/C][C]135.1002[/C][C]0.3055[/C][C]0.7638[/C][C]0.195[/C][C]0.6607[/C][/ROW]
[ROW][C]60[/C][C]82[/C][C]95.6299[/C][C]68.5467[/C][C]122.713[/C][C]0.162[/C][C]0.3488[/C][C]0.3146[/C][C]0.3146[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36139&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36139&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])
3696.2-------
3794.3-------
3885.6-------
39117.4-------
4088.5-------
41124.2-------
42119.3-------
4376.8-------
4470.6-------
45122.1-------
46109.5-------
47119.9-------
48102.3-------
4979.692.932570.1224115.74250.1260.21040.45320.2104
5078.282.826459.2933106.35950.350.60590.40870.0524
51103.6122.894997.2427148.5470.07020.99970.66270.9422
5277.886.096359.9974112.19530.26660.09430.42840.1118
5399.1109.051782.453135.65050.23170.98940.13220.6906
54105.7114.664787.8807141.44880.25590.87260.36720.8172
5584.170.884643.958397.81090.1680.00560.33340.0111
5688.772.807645.813899.80130.12430.20610.56370.0161
57108115.217288.1794142.2550.30040.97270.30890.8255
5898.199.111372.0502126.17240.47080.25990.22590.4087
59101108.024980.9497135.10020.30550.76380.1950.6607
608295.629968.5467122.7130.1620.34880.31460.3146







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.1252-0.14350.012177.754814.81293.8488
500.145-0.05590.004721.40331.78361.3355
510.1065-0.1570.0131372.291531.02435.5699
520.1547-0.09640.00868.82925.73582.3949
530.1244-0.09130.007699.03698.25312.8728
540.1192-0.07820.006580.36676.69722.5879
550.19380.18640.0155174.64714.55393.815
560.18920.21830.0182252.569221.04744.5877
570.1197-0.06260.005252.08814.34072.0834
580.1393-0.01029e-041.02280.08520.2919
590.1279-0.0650.005449.34974.11252.0279
600.1445-0.14250.0119185.77315.48113.9346

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1252 & -0.1435 & 0.012 & 177.7548 & 14.8129 & 3.8488 \tabularnewline
50 & 0.145 & -0.0559 & 0.0047 & 21.4033 & 1.7836 & 1.3355 \tabularnewline
51 & 0.1065 & -0.157 & 0.0131 & 372.2915 & 31.0243 & 5.5699 \tabularnewline
52 & 0.1547 & -0.0964 & 0.008 & 68.8292 & 5.7358 & 2.3949 \tabularnewline
53 & 0.1244 & -0.0913 & 0.0076 & 99.0369 & 8.2531 & 2.8728 \tabularnewline
54 & 0.1192 & -0.0782 & 0.0065 & 80.3667 & 6.6972 & 2.5879 \tabularnewline
55 & 0.1938 & 0.1864 & 0.0155 & 174.647 & 14.5539 & 3.815 \tabularnewline
56 & 0.1892 & 0.2183 & 0.0182 & 252.5692 & 21.0474 & 4.5877 \tabularnewline
57 & 0.1197 & -0.0626 & 0.0052 & 52.0881 & 4.3407 & 2.0834 \tabularnewline
58 & 0.1393 & -0.0102 & 9e-04 & 1.0228 & 0.0852 & 0.2919 \tabularnewline
59 & 0.1279 & -0.065 & 0.0054 & 49.3497 & 4.1125 & 2.0279 \tabularnewline
60 & 0.1445 & -0.1425 & 0.0119 & 185.773 & 15.4811 & 3.9346 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36139&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.1252[/C][C]-0.1435[/C][C]0.012[/C][C]177.7548[/C][C]14.8129[/C][C]3.8488[/C][/ROW]
[ROW][C]50[/C][C]0.145[/C][C]-0.0559[/C][C]0.0047[/C][C]21.4033[/C][C]1.7836[/C][C]1.3355[/C][/ROW]
[ROW][C]51[/C][C]0.1065[/C][C]-0.157[/C][C]0.0131[/C][C]372.2915[/C][C]31.0243[/C][C]5.5699[/C][/ROW]
[ROW][C]52[/C][C]0.1547[/C][C]-0.0964[/C][C]0.008[/C][C]68.8292[/C][C]5.7358[/C][C]2.3949[/C][/ROW]
[ROW][C]53[/C][C]0.1244[/C][C]-0.0913[/C][C]0.0076[/C][C]99.0369[/C][C]8.2531[/C][C]2.8728[/C][/ROW]
[ROW][C]54[/C][C]0.1192[/C][C]-0.0782[/C][C]0.0065[/C][C]80.3667[/C][C]6.6972[/C][C]2.5879[/C][/ROW]
[ROW][C]55[/C][C]0.1938[/C][C]0.1864[/C][C]0.0155[/C][C]174.647[/C][C]14.5539[/C][C]3.815[/C][/ROW]
[ROW][C]56[/C][C]0.1892[/C][C]0.2183[/C][C]0.0182[/C][C]252.5692[/C][C]21.0474[/C][C]4.5877[/C][/ROW]
[ROW][C]57[/C][C]0.1197[/C][C]-0.0626[/C][C]0.0052[/C][C]52.0881[/C][C]4.3407[/C][C]2.0834[/C][/ROW]
[ROW][C]58[/C][C]0.1393[/C][C]-0.0102[/C][C]9e-04[/C][C]1.0228[/C][C]0.0852[/C][C]0.2919[/C][/ROW]
[ROW][C]59[/C][C]0.1279[/C][C]-0.065[/C][C]0.0054[/C][C]49.3497[/C][C]4.1125[/C][C]2.0279[/C][/ROW]
[ROW][C]60[/C][C]0.1445[/C][C]-0.1425[/C][C]0.0119[/C][C]185.773[/C][C]15.4811[/C][C]3.9346[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36139&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36139&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.1252-0.14350.012177.754814.81293.8488
500.145-0.05590.004721.40331.78361.3355
510.1065-0.1570.0131372.291531.02435.5699
520.1547-0.09640.00868.82925.73582.3949
530.1244-0.09130.007699.03698.25312.8728
540.1192-0.07820.006580.36676.69722.5879
550.19380.18640.0155174.64714.55393.815
560.18920.21830.0182252.569221.04744.5877
570.1197-0.06260.005252.08814.34072.0834
580.1393-0.01029e-041.02280.08520.2919
590.1279-0.0650.005449.34974.11252.0279
600.1445-0.14250.0119185.77315.48113.9346



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