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, 16 Dec 2008 03:57:37 -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/16/t1229425132qnz0mh8n6wjt0tp.htm/, Retrieved Wed, 15 May 2024 18:04:00 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33908, Retrieved Wed, 15 May 2024 18:04:00 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact196
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2008-12-12 10:29:08] [2a30350413961f11db13c46be07a5f73]
-         [ARIMA Forecasting] [] [2008-12-16 10:57:37] [c60a842d48931bd392d024d8e9ef4583] [Current]
Feedback Forum

Post a new message
Dataseries X:
0.24
0.23
0.23
0.24
0.23
0.23
0.25
0.21
0.26
0.25
0.24
0.24
0.27
0.25
0.26
0.29
0.24
0.26
0.24
0.26
0.25
0.26
0.24
0.21
0.20
0.22
0.20
0.21
0.20
0.19
0.20
0.20
0.21
0.24
0.22
0.19
0.23
0.23
0.23
0.22
0.23
0.25
0.25
0.22
0.25
0.25
0.24
0.19
0.24
0.26
0.24
0.24
0.25
0.23
0.27
0.24
0.26
0.27
0.29
0.28
0.32
0.29
0.27
0.26
0.28
0.31
0.29
0.31
0.31
0.32
0.32
0.26
0.31
0.31
0.31
0.31
0.29
0.27
0.30
0.27
0.27
0.30
0.28
0.24
0.28
0.28
0.33
0.28
0.29
0.25
0.31
0.29
0.37
0.31
0.29
0.28
0.30
0.32
0.31
0.28
0.29
0.29
0.28
0.26
0.28
0.30
0.33
0.31
0.37
0.36
0.37
0.37
0.36
0.33
0.33
0.40
0.32
0.39
0.39
0.37
0.37
0.30
0.33
0.33
0.34
0.35
0.34
0.37
0.37
0.37
0.36
0.32
0.33
0.35
0.36
0.35
0.37
0.35
0.32
0.33
0.28
0.32
0.35
0.30
0.32
0.32
0.32
0.32
0.36
0.31
0.26
0.33
0.31
0.34
0.33
0.38
0.32
0.30
0.32
0.33
0.34
0.29
0.33
0.36
0.32
0.32
0.32
0.31
0.30
0.34
0.34
0.30
0.28
0.25
0.27
0.33
0.28
0.33
0.32
0.27
0.27
0.28
0.27
0.27
0.25
0.25
0.22
0.27




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33908&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'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[176])
1640.36-------
1650.32-------
1660.32-------
1670.32-------
1680.31-------
1690.3-------
1700.34-------
1710.34-------
1720.3-------
1730.28-------
1740.25-------
1750.27-------
1760.33-------
1770.280.29080.24560.34630.3520.08320.15120.0832
1780.330.30690.25480.37220.24370.78980.34660.2437
1790.320.30710.25150.37820.36130.2640.36130.264
1800.270.29170.23640.36350.27620.220.30890.1479
1810.270.2970.23760.37530.24910.75090.47040.2044
1820.280.29870.23620.38220.33030.74970.16630.2314
1830.270.30580.23890.39660.21940.71170.23040.3009
1840.270.29530.22870.38660.29380.70620.45950.2279
1850.250.29890.22910.39590.16160.72040.64870.265
1860.250.27450.20930.36570.29910.70090.70090.1164
1870.220.27910.21070.37590.11590.7220.5730.1515
1880.270.30740.22880.42080.25890.93460.3480.348

\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[176]) \tabularnewline
164 & 0.36 & - & - & - & - & - & - & - \tabularnewline
165 & 0.32 & - & - & - & - & - & - & - \tabularnewline
166 & 0.32 & - & - & - & - & - & - & - \tabularnewline
167 & 0.32 & - & - & - & - & - & - & - \tabularnewline
168 & 0.31 & - & - & - & - & - & - & - \tabularnewline
169 & 0.3 & - & - & - & - & - & - & - \tabularnewline
170 & 0.34 & - & - & - & - & - & - & - \tabularnewline
171 & 0.34 & - & - & - & - & - & - & - \tabularnewline
172 & 0.3 & - & - & - & - & - & - & - \tabularnewline
173 & 0.28 & - & - & - & - & - & - & - \tabularnewline
174 & 0.25 & - & - & - & - & - & - & - \tabularnewline
175 & 0.27 & - & - & - & - & - & - & - \tabularnewline
176 & 0.33 & - & - & - & - & - & - & - \tabularnewline
177 & 0.28 & 0.2908 & 0.2456 & 0.3463 & 0.352 & 0.0832 & 0.1512 & 0.0832 \tabularnewline
178 & 0.33 & 0.3069 & 0.2548 & 0.3722 & 0.2437 & 0.7898 & 0.3466 & 0.2437 \tabularnewline
179 & 0.32 & 0.3071 & 0.2515 & 0.3782 & 0.3613 & 0.264 & 0.3613 & 0.264 \tabularnewline
180 & 0.27 & 0.2917 & 0.2364 & 0.3635 & 0.2762 & 0.22 & 0.3089 & 0.1479 \tabularnewline
181 & 0.27 & 0.297 & 0.2376 & 0.3753 & 0.2491 & 0.7509 & 0.4704 & 0.2044 \tabularnewline
182 & 0.28 & 0.2987 & 0.2362 & 0.3822 & 0.3303 & 0.7497 & 0.1663 & 0.2314 \tabularnewline
183 & 0.27 & 0.3058 & 0.2389 & 0.3966 & 0.2194 & 0.7117 & 0.2304 & 0.3009 \tabularnewline
184 & 0.27 & 0.2953 & 0.2287 & 0.3866 & 0.2938 & 0.7062 & 0.4595 & 0.2279 \tabularnewline
185 & 0.25 & 0.2989 & 0.2291 & 0.3959 & 0.1616 & 0.7204 & 0.6487 & 0.265 \tabularnewline
186 & 0.25 & 0.2745 & 0.2093 & 0.3657 & 0.2991 & 0.7009 & 0.7009 & 0.1164 \tabularnewline
187 & 0.22 & 0.2791 & 0.2107 & 0.3759 & 0.1159 & 0.722 & 0.573 & 0.1515 \tabularnewline
188 & 0.27 & 0.3074 & 0.2288 & 0.4208 & 0.2589 & 0.9346 & 0.348 & 0.348 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33908&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[176])[/C][/ROW]
[ROW][C]164[/C][C]0.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]165[/C][C]0.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]166[/C][C]0.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]167[/C][C]0.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]168[/C][C]0.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]169[/C][C]0.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]170[/C][C]0.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]171[/C][C]0.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]172[/C][C]0.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]173[/C][C]0.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]174[/C][C]0.25[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]175[/C][C]0.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]176[/C][C]0.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]177[/C][C]0.28[/C][C]0.2908[/C][C]0.2456[/C][C]0.3463[/C][C]0.352[/C][C]0.0832[/C][C]0.1512[/C][C]0.0832[/C][/ROW]
[ROW][C]178[/C][C]0.33[/C][C]0.3069[/C][C]0.2548[/C][C]0.3722[/C][C]0.2437[/C][C]0.7898[/C][C]0.3466[/C][C]0.2437[/C][/ROW]
[ROW][C]179[/C][C]0.32[/C][C]0.3071[/C][C]0.2515[/C][C]0.3782[/C][C]0.3613[/C][C]0.264[/C][C]0.3613[/C][C]0.264[/C][/ROW]
[ROW][C]180[/C][C]0.27[/C][C]0.2917[/C][C]0.2364[/C][C]0.3635[/C][C]0.2762[/C][C]0.22[/C][C]0.3089[/C][C]0.1479[/C][/ROW]
[ROW][C]181[/C][C]0.27[/C][C]0.297[/C][C]0.2376[/C][C]0.3753[/C][C]0.2491[/C][C]0.7509[/C][C]0.4704[/C][C]0.2044[/C][/ROW]
[ROW][C]182[/C][C]0.28[/C][C]0.2987[/C][C]0.2362[/C][C]0.3822[/C][C]0.3303[/C][C]0.7497[/C][C]0.1663[/C][C]0.2314[/C][/ROW]
[ROW][C]183[/C][C]0.27[/C][C]0.3058[/C][C]0.2389[/C][C]0.3966[/C][C]0.2194[/C][C]0.7117[/C][C]0.2304[/C][C]0.3009[/C][/ROW]
[ROW][C]184[/C][C]0.27[/C][C]0.2953[/C][C]0.2287[/C][C]0.3866[/C][C]0.2938[/C][C]0.7062[/C][C]0.4595[/C][C]0.2279[/C][/ROW]
[ROW][C]185[/C][C]0.25[/C][C]0.2989[/C][C]0.2291[/C][C]0.3959[/C][C]0.1616[/C][C]0.7204[/C][C]0.6487[/C][C]0.265[/C][/ROW]
[ROW][C]186[/C][C]0.25[/C][C]0.2745[/C][C]0.2093[/C][C]0.3657[/C][C]0.2991[/C][C]0.7009[/C][C]0.7009[/C][C]0.1164[/C][/ROW]
[ROW][C]187[/C][C]0.22[/C][C]0.2791[/C][C]0.2107[/C][C]0.3759[/C][C]0.1159[/C][C]0.722[/C][C]0.573[/C][C]0.1515[/C][/ROW]
[ROW][C]188[/C][C]0.27[/C][C]0.3074[/C][C]0.2288[/C][C]0.4208[/C][C]0.2589[/C][C]0.9346[/C][C]0.348[/C][C]0.348[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33908&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33908&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[176])
1640.36-------
1650.32-------
1660.32-------
1670.32-------
1680.31-------
1690.3-------
1700.34-------
1710.34-------
1720.3-------
1730.28-------
1740.25-------
1750.27-------
1760.33-------
1770.280.29080.24560.34630.3520.08320.15120.0832
1780.330.30690.25480.37220.24370.78980.34660.2437
1790.320.30710.25150.37820.36130.2640.36130.264
1800.270.29170.23640.36350.27620.220.30890.1479
1810.270.2970.23760.37530.24910.75090.47040.2044
1820.280.29870.23620.38220.33030.74970.16630.2314
1830.270.30580.23890.39660.21940.71170.23040.3009
1840.270.29530.22870.38660.29380.70620.45950.2279
1850.250.29890.22910.39590.16160.72040.64870.265
1860.250.27450.20930.36570.29910.70090.70090.1164
1870.220.27910.21070.37590.11590.7220.5730.1515
1880.270.30740.22880.42080.25890.93460.3480.348







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1770.0975-0.0370.00311e-0400.0031
1780.10860.07540.00635e-0400.0067
1790.1180.04190.00352e-0400.0037
1800.1254-0.07450.00625e-0400.0063
1810.1344-0.0910.00767e-041e-040.0078
1820.1427-0.06260.00524e-0400.0054
1830.1514-0.11720.00980.00131e-040.0103
1840.1577-0.08560.00716e-041e-040.0073
1850.1656-0.16360.01360.00242e-040.0141
1860.1694-0.08930.00746e-041e-040.0071
1870.177-0.21170.01760.00353e-040.0171
1880.1882-0.12170.01010.00141e-040.0108

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
177 & 0.0975 & -0.037 & 0.0031 & 1e-04 & 0 & 0.0031 \tabularnewline
178 & 0.1086 & 0.0754 & 0.0063 & 5e-04 & 0 & 0.0067 \tabularnewline
179 & 0.118 & 0.0419 & 0.0035 & 2e-04 & 0 & 0.0037 \tabularnewline
180 & 0.1254 & -0.0745 & 0.0062 & 5e-04 & 0 & 0.0063 \tabularnewline
181 & 0.1344 & -0.091 & 0.0076 & 7e-04 & 1e-04 & 0.0078 \tabularnewline
182 & 0.1427 & -0.0626 & 0.0052 & 4e-04 & 0 & 0.0054 \tabularnewline
183 & 0.1514 & -0.1172 & 0.0098 & 0.0013 & 1e-04 & 0.0103 \tabularnewline
184 & 0.1577 & -0.0856 & 0.0071 & 6e-04 & 1e-04 & 0.0073 \tabularnewline
185 & 0.1656 & -0.1636 & 0.0136 & 0.0024 & 2e-04 & 0.0141 \tabularnewline
186 & 0.1694 & -0.0893 & 0.0074 & 6e-04 & 1e-04 & 0.0071 \tabularnewline
187 & 0.177 & -0.2117 & 0.0176 & 0.0035 & 3e-04 & 0.0171 \tabularnewline
188 & 0.1882 & -0.1217 & 0.0101 & 0.0014 & 1e-04 & 0.0108 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33908&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]177[/C][C]0.0975[/C][C]-0.037[/C][C]0.0031[/C][C]1e-04[/C][C]0[/C][C]0.0031[/C][/ROW]
[ROW][C]178[/C][C]0.1086[/C][C]0.0754[/C][C]0.0063[/C][C]5e-04[/C][C]0[/C][C]0.0067[/C][/ROW]
[ROW][C]179[/C][C]0.118[/C][C]0.0419[/C][C]0.0035[/C][C]2e-04[/C][C]0[/C][C]0.0037[/C][/ROW]
[ROW][C]180[/C][C]0.1254[/C][C]-0.0745[/C][C]0.0062[/C][C]5e-04[/C][C]0[/C][C]0.0063[/C][/ROW]
[ROW][C]181[/C][C]0.1344[/C][C]-0.091[/C][C]0.0076[/C][C]7e-04[/C][C]1e-04[/C][C]0.0078[/C][/ROW]
[ROW][C]182[/C][C]0.1427[/C][C]-0.0626[/C][C]0.0052[/C][C]4e-04[/C][C]0[/C][C]0.0054[/C][/ROW]
[ROW][C]183[/C][C]0.1514[/C][C]-0.1172[/C][C]0.0098[/C][C]0.0013[/C][C]1e-04[/C][C]0.0103[/C][/ROW]
[ROW][C]184[/C][C]0.1577[/C][C]-0.0856[/C][C]0.0071[/C][C]6e-04[/C][C]1e-04[/C][C]0.0073[/C][/ROW]
[ROW][C]185[/C][C]0.1656[/C][C]-0.1636[/C][C]0.0136[/C][C]0.0024[/C][C]2e-04[/C][C]0.0141[/C][/ROW]
[ROW][C]186[/C][C]0.1694[/C][C]-0.0893[/C][C]0.0074[/C][C]6e-04[/C][C]1e-04[/C][C]0.0071[/C][/ROW]
[ROW][C]187[/C][C]0.177[/C][C]-0.2117[/C][C]0.0176[/C][C]0.0035[/C][C]3e-04[/C][C]0.0171[/C][/ROW]
[ROW][C]188[/C][C]0.1882[/C][C]-0.1217[/C][C]0.0101[/C][C]0.0014[/C][C]1e-04[/C][C]0.0108[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33908&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33908&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
1770.0975-0.0370.00311e-0400.0031
1780.10860.07540.00635e-0400.0067
1790.1180.04190.00352e-0400.0037
1800.1254-0.07450.00625e-0400.0063
1810.1344-0.0910.00767e-041e-040.0078
1820.1427-0.06260.00524e-0400.0054
1830.1514-0.11720.00980.00131e-040.0103
1840.1577-0.08560.00716e-041e-040.0073
1850.1656-0.16360.01360.00242e-040.0141
1860.1694-0.08930.00746e-041e-040.0071
1870.177-0.21170.01760.00353e-040.0171
1880.1882-0.12170.01010.00141e-040.0108



Parameters (Session):
par1 = 12 ; par2 = -0.2 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = -0.2 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
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')