Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 09 Dec 2008 10:45:04 -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/09/t1228844896kqi7uyv10vqf38r.htm/, Retrieved Sat, 18 May 2024 06:48:28 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=31625, Retrieved Sat, 18 May 2024 06:48:28 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact184
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [(Partial) Autocorrelation Function] [(P)ACF Transportm...] [2008-12-04 18:19:15] [65eec331235880e0070acfba94c20cfa]
F RMPD    [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-09 17:45:04] [d41d8cd98f00b204e9800998ecf8427e] [Current]
F   PD      [ARIMA Forecasting] [dfqsdfsq] [2008-12-15 17:32:11] [74be16979710d4c4e7c6647856088456]
Feedback Forum
2008-12-24 10:01:38 [Stephanie Vanderlinden] [reply
De workshop is zeer goed opgelost. Bij elke step wordt een goede en duidelijk verklaring gegeven.

Post a new message
Dataseries X:
92
95,9
108,8
103,4
102,1
110,1
83,2
82,7
106,8
113,7
102,5
96,6
92,1
95,6
102,3
98,6
98,2
104,5
84
73,8
103,9
106
97,2
102,6
89
93,8
116,7
106,8
98,5
118,7
90
91,9
113,3
113,1
104,1
108,7
96,7
101
116,9
105,8
99
129,4
83
88,9
115,9
104,2
113,4
112,2
100,8
107,3
126,6
102,9
117,9
128,8
87,5
93,8
122,7
126,2
124,6
116,7
115,2
111,1
129,9
113,3
118,5
137,9
103,6
101,7
127,4
137,5
128,3
118,2
117,1




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=31625&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=31625&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=31625&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'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[61])
49100.8-------
50107.3-------
51126.6-------
52102.9-------
53117.9-------
54128.8-------
5587.5-------
5693.8-------
57122.7-------
58126.2-------
59124.6-------
60116.7-------
61115.2-------
62111.1114.7519103.132126.37170.2690.46990.89560.4699
63129.9131.6374119.9794143.29550.38510.99970.80150.9971
64113.3114.7314102.4932126.96960.40930.00760.97090.4701
65118.5119.36105.7837132.93630.45060.80920.58350.7259
66137.9136.8215123.0877150.55530.43880.99550.87380.999
67103.694.006679.7819108.23120.093100.8150.0017
68101.798.813384.1349113.49180.350.26140.74840.0143
69127.4127.0164112.1432141.88950.47980.99960.71530.9403
70137.5125.0475109.872140.22310.05390.38060.44080.8983
71128.3126.4323111.0283141.83620.40610.07950.59220.9235
72118.2120.6099105.0425136.17740.38080.16650.68870.7521
73117.1115.391699.6431131.14020.41580.36330.50950.5095

\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[61]) \tabularnewline
49 & 100.8 & - & - & - & - & - & - & - \tabularnewline
50 & 107.3 & - & - & - & - & - & - & - \tabularnewline
51 & 126.6 & - & - & - & - & - & - & - \tabularnewline
52 & 102.9 & - & - & - & - & - & - & - \tabularnewline
53 & 117.9 & - & - & - & - & - & - & - \tabularnewline
54 & 128.8 & - & - & - & - & - & - & - \tabularnewline
55 & 87.5 & - & - & - & - & - & - & - \tabularnewline
56 & 93.8 & - & - & - & - & - & - & - \tabularnewline
57 & 122.7 & - & - & - & - & - & - & - \tabularnewline
58 & 126.2 & - & - & - & - & - & - & - \tabularnewline
59 & 124.6 & - & - & - & - & - & - & - \tabularnewline
60 & 116.7 & - & - & - & - & - & - & - \tabularnewline
61 & 115.2 & - & - & - & - & - & - & - \tabularnewline
62 & 111.1 & 114.7519 & 103.132 & 126.3717 & 0.269 & 0.4699 & 0.8956 & 0.4699 \tabularnewline
63 & 129.9 & 131.6374 & 119.9794 & 143.2955 & 0.3851 & 0.9997 & 0.8015 & 0.9971 \tabularnewline
64 & 113.3 & 114.7314 & 102.4932 & 126.9696 & 0.4093 & 0.0076 & 0.9709 & 0.4701 \tabularnewline
65 & 118.5 & 119.36 & 105.7837 & 132.9363 & 0.4506 & 0.8092 & 0.5835 & 0.7259 \tabularnewline
66 & 137.9 & 136.8215 & 123.0877 & 150.5553 & 0.4388 & 0.9955 & 0.8738 & 0.999 \tabularnewline
67 & 103.6 & 94.0066 & 79.7819 & 108.2312 & 0.0931 & 0 & 0.815 & 0.0017 \tabularnewline
68 & 101.7 & 98.8133 & 84.1349 & 113.4918 & 0.35 & 0.2614 & 0.7484 & 0.0143 \tabularnewline
69 & 127.4 & 127.0164 & 112.1432 & 141.8895 & 0.4798 & 0.9996 & 0.7153 & 0.9403 \tabularnewline
70 & 137.5 & 125.0475 & 109.872 & 140.2231 & 0.0539 & 0.3806 & 0.4408 & 0.8983 \tabularnewline
71 & 128.3 & 126.4323 & 111.0283 & 141.8362 & 0.4061 & 0.0795 & 0.5922 & 0.9235 \tabularnewline
72 & 118.2 & 120.6099 & 105.0425 & 136.1774 & 0.3808 & 0.1665 & 0.6887 & 0.7521 \tabularnewline
73 & 117.1 & 115.3916 & 99.6431 & 131.1402 & 0.4158 & 0.3633 & 0.5095 & 0.5095 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=31625&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[61])[/C][/ROW]
[ROW][C]49[/C][C]100.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]107.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]126.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]102.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]117.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]128.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]87.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]93.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]122.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]126.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]124.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]116.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]115.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]111.1[/C][C]114.7519[/C][C]103.132[/C][C]126.3717[/C][C]0.269[/C][C]0.4699[/C][C]0.8956[/C][C]0.4699[/C][/ROW]
[ROW][C]63[/C][C]129.9[/C][C]131.6374[/C][C]119.9794[/C][C]143.2955[/C][C]0.3851[/C][C]0.9997[/C][C]0.8015[/C][C]0.9971[/C][/ROW]
[ROW][C]64[/C][C]113.3[/C][C]114.7314[/C][C]102.4932[/C][C]126.9696[/C][C]0.4093[/C][C]0.0076[/C][C]0.9709[/C][C]0.4701[/C][/ROW]
[ROW][C]65[/C][C]118.5[/C][C]119.36[/C][C]105.7837[/C][C]132.9363[/C][C]0.4506[/C][C]0.8092[/C][C]0.5835[/C][C]0.7259[/C][/ROW]
[ROW][C]66[/C][C]137.9[/C][C]136.8215[/C][C]123.0877[/C][C]150.5553[/C][C]0.4388[/C][C]0.9955[/C][C]0.8738[/C][C]0.999[/C][/ROW]
[ROW][C]67[/C][C]103.6[/C][C]94.0066[/C][C]79.7819[/C][C]108.2312[/C][C]0.0931[/C][C]0[/C][C]0.815[/C][C]0.0017[/C][/ROW]
[ROW][C]68[/C][C]101.7[/C][C]98.8133[/C][C]84.1349[/C][C]113.4918[/C][C]0.35[/C][C]0.2614[/C][C]0.7484[/C][C]0.0143[/C][/ROW]
[ROW][C]69[/C][C]127.4[/C][C]127.0164[/C][C]112.1432[/C][C]141.8895[/C][C]0.4798[/C][C]0.9996[/C][C]0.7153[/C][C]0.9403[/C][/ROW]
[ROW][C]70[/C][C]137.5[/C][C]125.0475[/C][C]109.872[/C][C]140.2231[/C][C]0.0539[/C][C]0.3806[/C][C]0.4408[/C][C]0.8983[/C][/ROW]
[ROW][C]71[/C][C]128.3[/C][C]126.4323[/C][C]111.0283[/C][C]141.8362[/C][C]0.4061[/C][C]0.0795[/C][C]0.5922[/C][C]0.9235[/C][/ROW]
[ROW][C]72[/C][C]118.2[/C][C]120.6099[/C][C]105.0425[/C][C]136.1774[/C][C]0.3808[/C][C]0.1665[/C][C]0.6887[/C][C]0.7521[/C][/ROW]
[ROW][C]73[/C][C]117.1[/C][C]115.3916[/C][C]99.6431[/C][C]131.1402[/C][C]0.4158[/C][C]0.3633[/C][C]0.5095[/C][C]0.5095[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=31625&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=31625&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[61])
49100.8-------
50107.3-------
51126.6-------
52102.9-------
53117.9-------
54128.8-------
5587.5-------
5693.8-------
57122.7-------
58126.2-------
59124.6-------
60116.7-------
61115.2-------
62111.1114.7519103.132126.37170.2690.46990.89560.4699
63129.9131.6374119.9794143.29550.38510.99970.80150.9971
64113.3114.7314102.4932126.96960.40930.00760.97090.4701
65118.5119.36105.7837132.93630.45060.80920.58350.7259
66137.9136.8215123.0877150.55530.43880.99550.87380.999
67103.694.006679.7819108.23120.093100.8150.0017
68101.798.813384.1349113.49180.350.26140.74840.0143
69127.4127.0164112.1432141.88950.47980.99960.71530.9403
70137.5125.0475109.872140.22310.05390.38060.44080.8983
71128.3126.4323111.0283141.83620.40610.07950.59220.9235
72118.2120.6099105.0425136.17740.38080.16650.68870.7521
73117.1115.391699.6431131.14020.41580.36330.50950.5095







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.0517-0.03180.002713.33621.11141.0542
630.0452-0.01320.00113.01860.25160.5015
640.0544-0.01250.0012.04880.17070.4132
650.058-0.00726e-040.73960.06160.2483
660.05120.00797e-041.16320.09690.3113
670.07720.10210.008592.03377.66952.7694
680.07580.02920.00248.33280.69440.8333
690.05970.0033e-040.14720.01230.1107
700.06190.09960.0083155.064412.9223.5947
710.06220.01480.00123.48840.29070.5392
720.0659-0.020.00175.80780.4840.6957
730.06960.01480.00122.91860.24320.4932

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0517 & -0.0318 & 0.0027 & 13.3362 & 1.1114 & 1.0542 \tabularnewline
63 & 0.0452 & -0.0132 & 0.0011 & 3.0186 & 0.2516 & 0.5015 \tabularnewline
64 & 0.0544 & -0.0125 & 0.001 & 2.0488 & 0.1707 & 0.4132 \tabularnewline
65 & 0.058 & -0.0072 & 6e-04 & 0.7396 & 0.0616 & 0.2483 \tabularnewline
66 & 0.0512 & 0.0079 & 7e-04 & 1.1632 & 0.0969 & 0.3113 \tabularnewline
67 & 0.0772 & 0.1021 & 0.0085 & 92.0337 & 7.6695 & 2.7694 \tabularnewline
68 & 0.0758 & 0.0292 & 0.0024 & 8.3328 & 0.6944 & 0.8333 \tabularnewline
69 & 0.0597 & 0.003 & 3e-04 & 0.1472 & 0.0123 & 0.1107 \tabularnewline
70 & 0.0619 & 0.0996 & 0.0083 & 155.0644 & 12.922 & 3.5947 \tabularnewline
71 & 0.0622 & 0.0148 & 0.0012 & 3.4884 & 0.2907 & 0.5392 \tabularnewline
72 & 0.0659 & -0.02 & 0.0017 & 5.8078 & 0.484 & 0.6957 \tabularnewline
73 & 0.0696 & 0.0148 & 0.0012 & 2.9186 & 0.2432 & 0.4932 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=31625&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]62[/C][C]0.0517[/C][C]-0.0318[/C][C]0.0027[/C][C]13.3362[/C][C]1.1114[/C][C]1.0542[/C][/ROW]
[ROW][C]63[/C][C]0.0452[/C][C]-0.0132[/C][C]0.0011[/C][C]3.0186[/C][C]0.2516[/C][C]0.5015[/C][/ROW]
[ROW][C]64[/C][C]0.0544[/C][C]-0.0125[/C][C]0.001[/C][C]2.0488[/C][C]0.1707[/C][C]0.4132[/C][/ROW]
[ROW][C]65[/C][C]0.058[/C][C]-0.0072[/C][C]6e-04[/C][C]0.7396[/C][C]0.0616[/C][C]0.2483[/C][/ROW]
[ROW][C]66[/C][C]0.0512[/C][C]0.0079[/C][C]7e-04[/C][C]1.1632[/C][C]0.0969[/C][C]0.3113[/C][/ROW]
[ROW][C]67[/C][C]0.0772[/C][C]0.1021[/C][C]0.0085[/C][C]92.0337[/C][C]7.6695[/C][C]2.7694[/C][/ROW]
[ROW][C]68[/C][C]0.0758[/C][C]0.0292[/C][C]0.0024[/C][C]8.3328[/C][C]0.6944[/C][C]0.8333[/C][/ROW]
[ROW][C]69[/C][C]0.0597[/C][C]0.003[/C][C]3e-04[/C][C]0.1472[/C][C]0.0123[/C][C]0.1107[/C][/ROW]
[ROW][C]70[/C][C]0.0619[/C][C]0.0996[/C][C]0.0083[/C][C]155.0644[/C][C]12.922[/C][C]3.5947[/C][/ROW]
[ROW][C]71[/C][C]0.0622[/C][C]0.0148[/C][C]0.0012[/C][C]3.4884[/C][C]0.2907[/C][C]0.5392[/C][/ROW]
[ROW][C]72[/C][C]0.0659[/C][C]-0.02[/C][C]0.0017[/C][C]5.8078[/C][C]0.484[/C][C]0.6957[/C][/ROW]
[ROW][C]73[/C][C]0.0696[/C][C]0.0148[/C][C]0.0012[/C][C]2.9186[/C][C]0.2432[/C][C]0.4932[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=31625&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=31625&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
620.0517-0.03180.002713.33621.11141.0542
630.0452-0.01320.00113.01860.25160.5015
640.0544-0.01250.0012.04880.17070.4132
650.058-0.00726e-040.73960.06160.2483
660.05120.00797e-041.16320.09690.3113
670.07720.10210.008592.03377.66952.7694
680.07580.02920.00248.33280.69440.8333
690.05970.0033e-040.14720.01230.1107
700.06190.09960.0083155.064412.9223.5947
710.06220.01480.00123.48840.29070.5392
720.0659-0.020.00175.80780.4840.6957
730.06960.01480.00122.91860.24320.4932



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