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 computationSat, 18 Dec 2010 15:30:56 +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/18/t1292686123emrx6qi7dcd8jsh.htm/, Retrieved Tue, 30 Apr 2024 00:57:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=112046, Retrieved Tue, 30 Apr 2024 00:57:05 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact142
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Multiple Regression] [Multiple Regressi...] [2010-12-09 13:10:55] [d6a5e6c1b0014d57cedb2bdfb4a7099f]
- RMPD  [(Partial) Autocorrelation Function] [Autocorrelation F...] [2010-12-12 20:17:05] [d6a5e6c1b0014d57cedb2bdfb4a7099f]
- RMP       [ARIMA Forecasting] [ARIMA forecasting...] [2010-12-18 15:30:56] [039869833c16fe697975601e6b065e0f] [Current]
Feedback Forum

Post a new message
Dataseries X:
1038.00
934.00
988.00
870.00
854.00
834.00
872.00
954.00
870.00
1238.00
1082.00
1053.00
934.00
787.00
1081.00
908.00
995.00
825.00
822.00
856.00
887.00
1094.00
990.00
936.00
1097.00
918.00
926.00
907.00
899.00
971.00
1087.00
1000.00
1071.00
1190.00
1116.00
1070.00
1314.00
1068.00
1185.00
1215.00
1145.00
1251.00
1363.00
1368.00
1535.00
1853.00
1866.00
2023.00
1373.00
1968.00
1424.00
1160.00
1243.00
1375.00
1539.00
1773.00
1906.00
2076.00
2004.00




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112046&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'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[47])
351116-------
361070-------
371314-------
381068-------
391185-------
401215-------
411145-------
421251-------
431363-------
441368-------
451535-------
461853-------
471866-------
4820231792.73181571.05692014.40670.02090.258610.2586
4913731972.20891696.72372247.694100.358910.7751
5019681758.59371430.3142086.87350.10560.989310.2607
5114241864.40411492.60292236.20520.01010.29250.99980.4966
5211601853.30071442.11922264.48225e-040.97960.99880.4759
5312431817.57721370.57792264.57650.00590.9980.99840.4159
5413751879.91231399.73352360.0910.01970.99530.99490.5226
5515391976.96671465.76392488.16950.04660.98950.99070.6647
5617731966.79691426.34642507.24730.24110.93960.98510.6426
5719062082.67061514.47632650.86480.27110.85730.97060.7726
5820762343.55251748.90772938.19730.18890.92540.94710.9423
5920042314.041694.07082934.00920.16350.77410.92170.9217

\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[47]) \tabularnewline
35 & 1116 & - & - & - & - & - & - & - \tabularnewline
36 & 1070 & - & - & - & - & - & - & - \tabularnewline
37 & 1314 & - & - & - & - & - & - & - \tabularnewline
38 & 1068 & - & - & - & - & - & - & - \tabularnewline
39 & 1185 & - & - & - & - & - & - & - \tabularnewline
40 & 1215 & - & - & - & - & - & - & - \tabularnewline
41 & 1145 & - & - & - & - & - & - & - \tabularnewline
42 & 1251 & - & - & - & - & - & - & - \tabularnewline
43 & 1363 & - & - & - & - & - & - & - \tabularnewline
44 & 1368 & - & - & - & - & - & - & - \tabularnewline
45 & 1535 & - & - & - & - & - & - & - \tabularnewline
46 & 1853 & - & - & - & - & - & - & - \tabularnewline
47 & 1866 & - & - & - & - & - & - & - \tabularnewline
48 & 2023 & 1792.7318 & 1571.0569 & 2014.4067 & 0.0209 & 0.2586 & 1 & 0.2586 \tabularnewline
49 & 1373 & 1972.2089 & 1696.7237 & 2247.6941 & 0 & 0.3589 & 1 & 0.7751 \tabularnewline
50 & 1968 & 1758.5937 & 1430.314 & 2086.8735 & 0.1056 & 0.9893 & 1 & 0.2607 \tabularnewline
51 & 1424 & 1864.4041 & 1492.6029 & 2236.2052 & 0.0101 & 0.2925 & 0.9998 & 0.4966 \tabularnewline
52 & 1160 & 1853.3007 & 1442.1192 & 2264.4822 & 5e-04 & 0.9796 & 0.9988 & 0.4759 \tabularnewline
53 & 1243 & 1817.5772 & 1370.5779 & 2264.5765 & 0.0059 & 0.998 & 0.9984 & 0.4159 \tabularnewline
54 & 1375 & 1879.9123 & 1399.7335 & 2360.091 & 0.0197 & 0.9953 & 0.9949 & 0.5226 \tabularnewline
55 & 1539 & 1976.9667 & 1465.7639 & 2488.1695 & 0.0466 & 0.9895 & 0.9907 & 0.6647 \tabularnewline
56 & 1773 & 1966.7969 & 1426.3464 & 2507.2473 & 0.2411 & 0.9396 & 0.9851 & 0.6426 \tabularnewline
57 & 1906 & 2082.6706 & 1514.4763 & 2650.8648 & 0.2711 & 0.8573 & 0.9706 & 0.7726 \tabularnewline
58 & 2076 & 2343.5525 & 1748.9077 & 2938.1973 & 0.1889 & 0.9254 & 0.9471 & 0.9423 \tabularnewline
59 & 2004 & 2314.04 & 1694.0708 & 2934.0092 & 0.1635 & 0.7741 & 0.9217 & 0.9217 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112046&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[47])[/C][/ROW]
[ROW][C]35[/C][C]1116[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]1070[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]1314[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]1068[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]1185[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]1215[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]1145[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]1251[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]1363[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]1368[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]1535[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]1853[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]1866[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]2023[/C][C]1792.7318[/C][C]1571.0569[/C][C]2014.4067[/C][C]0.0209[/C][C]0.2586[/C][C]1[/C][C]0.2586[/C][/ROW]
[ROW][C]49[/C][C]1373[/C][C]1972.2089[/C][C]1696.7237[/C][C]2247.6941[/C][C]0[/C][C]0.3589[/C][C]1[/C][C]0.7751[/C][/ROW]
[ROW][C]50[/C][C]1968[/C][C]1758.5937[/C][C]1430.314[/C][C]2086.8735[/C][C]0.1056[/C][C]0.9893[/C][C]1[/C][C]0.2607[/C][/ROW]
[ROW][C]51[/C][C]1424[/C][C]1864.4041[/C][C]1492.6029[/C][C]2236.2052[/C][C]0.0101[/C][C]0.2925[/C][C]0.9998[/C][C]0.4966[/C][/ROW]
[ROW][C]52[/C][C]1160[/C][C]1853.3007[/C][C]1442.1192[/C][C]2264.4822[/C][C]5e-04[/C][C]0.9796[/C][C]0.9988[/C][C]0.4759[/C][/ROW]
[ROW][C]53[/C][C]1243[/C][C]1817.5772[/C][C]1370.5779[/C][C]2264.5765[/C][C]0.0059[/C][C]0.998[/C][C]0.9984[/C][C]0.4159[/C][/ROW]
[ROW][C]54[/C][C]1375[/C][C]1879.9123[/C][C]1399.7335[/C][C]2360.091[/C][C]0.0197[/C][C]0.9953[/C][C]0.9949[/C][C]0.5226[/C][/ROW]
[ROW][C]55[/C][C]1539[/C][C]1976.9667[/C][C]1465.7639[/C][C]2488.1695[/C][C]0.0466[/C][C]0.9895[/C][C]0.9907[/C][C]0.6647[/C][/ROW]
[ROW][C]56[/C][C]1773[/C][C]1966.7969[/C][C]1426.3464[/C][C]2507.2473[/C][C]0.2411[/C][C]0.9396[/C][C]0.9851[/C][C]0.6426[/C][/ROW]
[ROW][C]57[/C][C]1906[/C][C]2082.6706[/C][C]1514.4763[/C][C]2650.8648[/C][C]0.2711[/C][C]0.8573[/C][C]0.9706[/C][C]0.7726[/C][/ROW]
[ROW][C]58[/C][C]2076[/C][C]2343.5525[/C][C]1748.9077[/C][C]2938.1973[/C][C]0.1889[/C][C]0.9254[/C][C]0.9471[/C][C]0.9423[/C][/ROW]
[ROW][C]59[/C][C]2004[/C][C]2314.04[/C][C]1694.0708[/C][C]2934.0092[/C][C]0.1635[/C][C]0.7741[/C][C]0.9217[/C][C]0.9217[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112046&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112046&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[47])
351116-------
361070-------
371314-------
381068-------
391185-------
401215-------
411145-------
421251-------
431363-------
441368-------
451535-------
461853-------
471866-------
4820231792.73181571.05692014.40670.02090.258610.2586
4913731972.20891696.72372247.694100.358910.7751
5019681758.59371430.3142086.87350.10560.989310.2607
5114241864.40411492.60292236.20520.01010.29250.99980.4966
5211601853.30071442.11922264.48225e-040.97960.99880.4759
5312431817.57721370.57792264.57650.00590.9980.99840.4159
5413751879.91231399.73352360.0910.01970.99530.99490.5226
5515391976.96671465.76392488.16950.04660.98950.99070.6647
5617731966.79691426.34642507.24730.24110.93960.98510.6426
5719062082.67061514.47632650.86480.27110.85730.97060.7726
5820762343.55251748.90772938.19730.18890.92540.94710.9423
5920042314.041694.07082934.00920.16350.77410.92170.9217







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
480.06310.1284053023.43400
490.0713-0.30380.2161359051.2858206037.3599453.9134
500.09520.11910.183843850.9795151975.2331389.84
510.1017-0.23620.1969193955.7286162470.357403.0761
520.1132-0.37410.2323480665.8748226109.4605475.5097
530.1255-0.31610.2463330138.9584243447.7102493.4042
540.1303-0.26860.2495254936.4068245088.9526495.0646
550.1319-0.22150.246191814.8151238429.6854488.2926
560.1402-0.09850.229637557.2225216110.5228464.8769
570.1392-0.08480.215131212.4916197620.7197444.5455
580.1295-0.11420.205971584.3409186162.8671431.466
590.1367-0.1340.296124.7989178659.6947422.6816

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
48 & 0.0631 & 0.1284 & 0 & 53023.434 & 0 & 0 \tabularnewline
49 & 0.0713 & -0.3038 & 0.2161 & 359051.2858 & 206037.3599 & 453.9134 \tabularnewline
50 & 0.0952 & 0.1191 & 0.1838 & 43850.9795 & 151975.2331 & 389.84 \tabularnewline
51 & 0.1017 & -0.2362 & 0.1969 & 193955.7286 & 162470.357 & 403.0761 \tabularnewline
52 & 0.1132 & -0.3741 & 0.2323 & 480665.8748 & 226109.4605 & 475.5097 \tabularnewline
53 & 0.1255 & -0.3161 & 0.2463 & 330138.9584 & 243447.7102 & 493.4042 \tabularnewline
54 & 0.1303 & -0.2686 & 0.2495 & 254936.4068 & 245088.9526 & 495.0646 \tabularnewline
55 & 0.1319 & -0.2215 & 0.246 & 191814.8151 & 238429.6854 & 488.2926 \tabularnewline
56 & 0.1402 & -0.0985 & 0.2296 & 37557.2225 & 216110.5228 & 464.8769 \tabularnewline
57 & 0.1392 & -0.0848 & 0.2151 & 31212.4916 & 197620.7197 & 444.5455 \tabularnewline
58 & 0.1295 & -0.1142 & 0.2059 & 71584.3409 & 186162.8671 & 431.466 \tabularnewline
59 & 0.1367 & -0.134 & 0.2 & 96124.7989 & 178659.6947 & 422.6816 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112046&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]48[/C][C]0.0631[/C][C]0.1284[/C][C]0[/C][C]53023.434[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]49[/C][C]0.0713[/C][C]-0.3038[/C][C]0.2161[/C][C]359051.2858[/C][C]206037.3599[/C][C]453.9134[/C][/ROW]
[ROW][C]50[/C][C]0.0952[/C][C]0.1191[/C][C]0.1838[/C][C]43850.9795[/C][C]151975.2331[/C][C]389.84[/C][/ROW]
[ROW][C]51[/C][C]0.1017[/C][C]-0.2362[/C][C]0.1969[/C][C]193955.7286[/C][C]162470.357[/C][C]403.0761[/C][/ROW]
[ROW][C]52[/C][C]0.1132[/C][C]-0.3741[/C][C]0.2323[/C][C]480665.8748[/C][C]226109.4605[/C][C]475.5097[/C][/ROW]
[ROW][C]53[/C][C]0.1255[/C][C]-0.3161[/C][C]0.2463[/C][C]330138.9584[/C][C]243447.7102[/C][C]493.4042[/C][/ROW]
[ROW][C]54[/C][C]0.1303[/C][C]-0.2686[/C][C]0.2495[/C][C]254936.4068[/C][C]245088.9526[/C][C]495.0646[/C][/ROW]
[ROW][C]55[/C][C]0.1319[/C][C]-0.2215[/C][C]0.246[/C][C]191814.8151[/C][C]238429.6854[/C][C]488.2926[/C][/ROW]
[ROW][C]56[/C][C]0.1402[/C][C]-0.0985[/C][C]0.2296[/C][C]37557.2225[/C][C]216110.5228[/C][C]464.8769[/C][/ROW]
[ROW][C]57[/C][C]0.1392[/C][C]-0.0848[/C][C]0.2151[/C][C]31212.4916[/C][C]197620.7197[/C][C]444.5455[/C][/ROW]
[ROW][C]58[/C][C]0.1295[/C][C]-0.1142[/C][C]0.2059[/C][C]71584.3409[/C][C]186162.8671[/C][C]431.466[/C][/ROW]
[ROW][C]59[/C][C]0.1367[/C][C]-0.134[/C][C]0.2[/C][C]96124.7989[/C][C]178659.6947[/C][C]422.6816[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112046&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112046&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
480.06310.1284053023.43400
490.0713-0.30380.2161359051.2858206037.3599453.9134
500.09520.11910.183843850.9795151975.2331389.84
510.1017-0.23620.1969193955.7286162470.357403.0761
520.1132-0.37410.2323480665.8748226109.4605475.5097
530.1255-0.31610.2463330138.9584243447.7102493.4042
540.1303-0.26860.2495254936.4068245088.9526495.0646
550.1319-0.22150.246191814.8151238429.6854488.2926
560.1402-0.09850.229637557.2225216110.5228464.8769
570.1392-0.08480.215131212.4916197620.7197444.5455
580.1295-0.11420.205971584.3409186162.8671431.466
590.1367-0.1340.296124.7989178659.6947422.6816



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