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, 25 Dec 2010 14:06:37 +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/25/t1293285928fzrdcj5ip2bbimp.htm/, Retrieved Mon, 29 Apr 2024 02:37:09 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115393, Retrieved Mon, 29 Apr 2024 02:37:09 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact145
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [ARIMA bel20] [2008-12-13 15:32:40] [74be16979710d4c4e7c6647856088456]
F RMP   [ARIMA Forecasting] [] [2008-12-13 15:36:11] [74be16979710d4c4e7c6647856088456]
-  MPD    [ARIMA Forecasting] [] [2009-12-15 15:40:27] [2f674a53c3d7aaa1bcf80e66074d3c9b]
-   PD        [ARIMA Forecasting] [paper] [2010-12-25 14:06:37] [5d6b44265a1bea1cb58a5907cde468a5] [Current]
Feedback Forum

Post a new message
Dataseries X:
3494,17
3667,03
3813,06
3917,96
3895,51
3801,06
3570,12
3701,61
3862,27
3970,1
4138,52
4199,75
4290,89
4443,91
4502,64
4356,98
4591,27
4696,96
4621,4
4562,84
4202,52
4296,49
4435,23
4105,18
4116,68
3844,49
3720,98
3674,4
3857,62
3801,06
3504,37
3032,6
3047,03
2962,34
2197,82
2014,45
1862,83
1905,41
1810,99
1670,07
1864,44
2052,02
2029,6
2070,83
2293,41
2443,27
2513,17
2466,92
2502,66
2539,91
2482,6
2626,15
2656,32
2446,66
2467,38
2462,32
2504,58
2579,39
2649,24
2636,87




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=115393&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=115393&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115393&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])
362014.45-------
371862.83-------
381905.41-------
391810.99-------
401670.07-------
411864.44-------
422052.02-------
432029.6-------
442070.83-------
452293.41-------
462443.27-------
472513.17-------
482466.92-------
492502.662454.39972077.1652831.63430.4010.47410.99890.4741
502539.912451.01031841.02013061.00040.38760.43410.96020.4796
512482.62450.09271656.91043243.2750.4680.41220.94290.4834
522626.152449.84431504.4173395.27170.35740.47290.9470.4859
532656.322449.77711372.4583527.09620.35350.37420.85650.4876
542446.662449.75891254.78323644.73460.4980.36740.74290.4888
552467.382449.7541147.65153751.85640.48940.50190.73650.4897
562462.322449.75261048.67583850.82950.4930.49020.7020.4904
572504.582449.7523956.2423943.26260.47130.49340.58130.491
582579.392449.7522869.20394030.30050.43610.47290.50320.4915
592649.242449.7522786.71474112.78960.40710.43930.47020.4919
602636.872449.7521708.12814191.37620.41660.41120.49230.4923

\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 & 2014.45 & - & - & - & - & - & - & - \tabularnewline
37 & 1862.83 & - & - & - & - & - & - & - \tabularnewline
38 & 1905.41 & - & - & - & - & - & - & - \tabularnewline
39 & 1810.99 & - & - & - & - & - & - & - \tabularnewline
40 & 1670.07 & - & - & - & - & - & - & - \tabularnewline
41 & 1864.44 & - & - & - & - & - & - & - \tabularnewline
42 & 2052.02 & - & - & - & - & - & - & - \tabularnewline
43 & 2029.6 & - & - & - & - & - & - & - \tabularnewline
44 & 2070.83 & - & - & - & - & - & - & - \tabularnewline
45 & 2293.41 & - & - & - & - & - & - & - \tabularnewline
46 & 2443.27 & - & - & - & - & - & - & - \tabularnewline
47 & 2513.17 & - & - & - & - & - & - & - \tabularnewline
48 & 2466.92 & - & - & - & - & - & - & - \tabularnewline
49 & 2502.66 & 2454.3997 & 2077.165 & 2831.6343 & 0.401 & 0.4741 & 0.9989 & 0.4741 \tabularnewline
50 & 2539.91 & 2451.0103 & 1841.0201 & 3061.0004 & 0.3876 & 0.4341 & 0.9602 & 0.4796 \tabularnewline
51 & 2482.6 & 2450.0927 & 1656.9104 & 3243.275 & 0.468 & 0.4122 & 0.9429 & 0.4834 \tabularnewline
52 & 2626.15 & 2449.8443 & 1504.417 & 3395.2717 & 0.3574 & 0.4729 & 0.947 & 0.4859 \tabularnewline
53 & 2656.32 & 2449.7771 & 1372.458 & 3527.0962 & 0.3535 & 0.3742 & 0.8565 & 0.4876 \tabularnewline
54 & 2446.66 & 2449.7589 & 1254.7832 & 3644.7346 & 0.498 & 0.3674 & 0.7429 & 0.4888 \tabularnewline
55 & 2467.38 & 2449.754 & 1147.6515 & 3751.8564 & 0.4894 & 0.5019 & 0.7365 & 0.4897 \tabularnewline
56 & 2462.32 & 2449.7526 & 1048.6758 & 3850.8295 & 0.493 & 0.4902 & 0.702 & 0.4904 \tabularnewline
57 & 2504.58 & 2449.7523 & 956.242 & 3943.2626 & 0.4713 & 0.4934 & 0.5813 & 0.491 \tabularnewline
58 & 2579.39 & 2449.7522 & 869.2039 & 4030.3005 & 0.4361 & 0.4729 & 0.5032 & 0.4915 \tabularnewline
59 & 2649.24 & 2449.7522 & 786.7147 & 4112.7896 & 0.4071 & 0.4393 & 0.4702 & 0.4919 \tabularnewline
60 & 2636.87 & 2449.7521 & 708.1281 & 4191.3762 & 0.4166 & 0.4112 & 0.4923 & 0.4923 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115393&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]2014.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]1862.83[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]1905.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]1810.99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]1670.07[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]1864.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]2052.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]2029.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]2070.83[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]2293.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]2443.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]2513.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]2466.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]2502.66[/C][C]2454.3997[/C][C]2077.165[/C][C]2831.6343[/C][C]0.401[/C][C]0.4741[/C][C]0.9989[/C][C]0.4741[/C][/ROW]
[ROW][C]50[/C][C]2539.91[/C][C]2451.0103[/C][C]1841.0201[/C][C]3061.0004[/C][C]0.3876[/C][C]0.4341[/C][C]0.9602[/C][C]0.4796[/C][/ROW]
[ROW][C]51[/C][C]2482.6[/C][C]2450.0927[/C][C]1656.9104[/C][C]3243.275[/C][C]0.468[/C][C]0.4122[/C][C]0.9429[/C][C]0.4834[/C][/ROW]
[ROW][C]52[/C][C]2626.15[/C][C]2449.8443[/C][C]1504.417[/C][C]3395.2717[/C][C]0.3574[/C][C]0.4729[/C][C]0.947[/C][C]0.4859[/C][/ROW]
[ROW][C]53[/C][C]2656.32[/C][C]2449.7771[/C][C]1372.458[/C][C]3527.0962[/C][C]0.3535[/C][C]0.3742[/C][C]0.8565[/C][C]0.4876[/C][/ROW]
[ROW][C]54[/C][C]2446.66[/C][C]2449.7589[/C][C]1254.7832[/C][C]3644.7346[/C][C]0.498[/C][C]0.3674[/C][C]0.7429[/C][C]0.4888[/C][/ROW]
[ROW][C]55[/C][C]2467.38[/C][C]2449.754[/C][C]1147.6515[/C][C]3751.8564[/C][C]0.4894[/C][C]0.5019[/C][C]0.7365[/C][C]0.4897[/C][/ROW]
[ROW][C]56[/C][C]2462.32[/C][C]2449.7526[/C][C]1048.6758[/C][C]3850.8295[/C][C]0.493[/C][C]0.4902[/C][C]0.702[/C][C]0.4904[/C][/ROW]
[ROW][C]57[/C][C]2504.58[/C][C]2449.7523[/C][C]956.242[/C][C]3943.2626[/C][C]0.4713[/C][C]0.4934[/C][C]0.5813[/C][C]0.491[/C][/ROW]
[ROW][C]58[/C][C]2579.39[/C][C]2449.7522[/C][C]869.2039[/C][C]4030.3005[/C][C]0.4361[/C][C]0.4729[/C][C]0.5032[/C][C]0.4915[/C][/ROW]
[ROW][C]59[/C][C]2649.24[/C][C]2449.7522[/C][C]786.7147[/C][C]4112.7896[/C][C]0.4071[/C][C]0.4393[/C][C]0.4702[/C][C]0.4919[/C][/ROW]
[ROW][C]60[/C][C]2636.87[/C][C]2449.7521[/C][C]708.1281[/C][C]4191.3762[/C][C]0.4166[/C][C]0.4112[/C][C]0.4923[/C][C]0.4923[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115393&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115393&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])
362014.45-------
371862.83-------
381905.41-------
391810.99-------
401670.07-------
411864.44-------
422052.02-------
432029.6-------
442070.83-------
452293.41-------
462443.27-------
472513.17-------
482466.92-------
492502.662454.39972077.1652831.63430.4010.47410.99890.4741
502539.912451.01031841.02013061.00040.38760.43410.96020.4796
512482.62450.09271656.91043243.2750.4680.41220.94290.4834
522626.152449.84431504.4173395.27170.35740.47290.9470.4859
532656.322449.77711372.4583527.09620.35350.37420.85650.4876
542446.662449.75891254.78323644.73460.4980.36740.74290.4888
552467.382449.7541147.65153751.85640.48940.50190.73650.4897
562462.322449.75261048.67583850.82950.4930.49020.7020.4904
572504.582449.7523956.2423943.26260.47130.49340.58130.491
582579.392449.7522869.20394030.30050.43610.47290.50320.4915
592649.242449.7522786.71474112.78960.40710.43930.47020.4919
602636.872449.7521708.12814191.37620.41660.41120.49230.4923







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.07840.01970.00162329.0607194.088413.9316
500.1270.03630.0037903.1613658.596825.6631
510.16520.01330.00111056.722488.06029.384
520.19690.0720.00631083.68362590.30750.8951
530.22440.08430.00742659.96743554.997359.6238
540.2489-0.00131e-049.60320.80030.8946
550.27120.00726e-04310.676825.88975.0882
560.29180.00514e-04157.938513.16153.6279
570.3110.02240.00193006.0789250.506615.8274
580.32920.05290.004416805.96391400.49737.4232
590.34640.08140.006839795.40023316.283357.5872
600.36270.07640.006435013.09052917.757554.0163

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0784 & 0.0197 & 0.0016 & 2329.0607 & 194.0884 & 13.9316 \tabularnewline
50 & 0.127 & 0.0363 & 0.003 & 7903.1613 & 658.5968 & 25.6631 \tabularnewline
51 & 0.1652 & 0.0133 & 0.0011 & 1056.7224 & 88.0602 & 9.384 \tabularnewline
52 & 0.1969 & 0.072 & 0.006 & 31083.6836 & 2590.307 & 50.8951 \tabularnewline
53 & 0.2244 & 0.0843 & 0.007 & 42659.9674 & 3554.9973 & 59.6238 \tabularnewline
54 & 0.2489 & -0.0013 & 1e-04 & 9.6032 & 0.8003 & 0.8946 \tabularnewline
55 & 0.2712 & 0.0072 & 6e-04 & 310.6768 & 25.8897 & 5.0882 \tabularnewline
56 & 0.2918 & 0.0051 & 4e-04 & 157.9385 & 13.1615 & 3.6279 \tabularnewline
57 & 0.311 & 0.0224 & 0.0019 & 3006.0789 & 250.5066 & 15.8274 \tabularnewline
58 & 0.3292 & 0.0529 & 0.0044 & 16805.9639 & 1400.497 & 37.4232 \tabularnewline
59 & 0.3464 & 0.0814 & 0.0068 & 39795.4002 & 3316.2833 & 57.5872 \tabularnewline
60 & 0.3627 & 0.0764 & 0.0064 & 35013.0905 & 2917.7575 & 54.0163 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115393&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.0784[/C][C]0.0197[/C][C]0.0016[/C][C]2329.0607[/C][C]194.0884[/C][C]13.9316[/C][/ROW]
[ROW][C]50[/C][C]0.127[/C][C]0.0363[/C][C]0.003[/C][C]7903.1613[/C][C]658.5968[/C][C]25.6631[/C][/ROW]
[ROW][C]51[/C][C]0.1652[/C][C]0.0133[/C][C]0.0011[/C][C]1056.7224[/C][C]88.0602[/C][C]9.384[/C][/ROW]
[ROW][C]52[/C][C]0.1969[/C][C]0.072[/C][C]0.006[/C][C]31083.6836[/C][C]2590.307[/C][C]50.8951[/C][/ROW]
[ROW][C]53[/C][C]0.2244[/C][C]0.0843[/C][C]0.007[/C][C]42659.9674[/C][C]3554.9973[/C][C]59.6238[/C][/ROW]
[ROW][C]54[/C][C]0.2489[/C][C]-0.0013[/C][C]1e-04[/C][C]9.6032[/C][C]0.8003[/C][C]0.8946[/C][/ROW]
[ROW][C]55[/C][C]0.2712[/C][C]0.0072[/C][C]6e-04[/C][C]310.6768[/C][C]25.8897[/C][C]5.0882[/C][/ROW]
[ROW][C]56[/C][C]0.2918[/C][C]0.0051[/C][C]4e-04[/C][C]157.9385[/C][C]13.1615[/C][C]3.6279[/C][/ROW]
[ROW][C]57[/C][C]0.311[/C][C]0.0224[/C][C]0.0019[/C][C]3006.0789[/C][C]250.5066[/C][C]15.8274[/C][/ROW]
[ROW][C]58[/C][C]0.3292[/C][C]0.0529[/C][C]0.0044[/C][C]16805.9639[/C][C]1400.497[/C][C]37.4232[/C][/ROW]
[ROW][C]59[/C][C]0.3464[/C][C]0.0814[/C][C]0.0068[/C][C]39795.4002[/C][C]3316.2833[/C][C]57.5872[/C][/ROW]
[ROW][C]60[/C][C]0.3627[/C][C]0.0764[/C][C]0.0064[/C][C]35013.0905[/C][C]2917.7575[/C][C]54.0163[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115393&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115393&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.07840.01970.00162329.0607194.088413.9316
500.1270.03630.0037903.1613658.596825.6631
510.16520.01330.00111056.722488.06029.384
520.19690.0720.00631083.68362590.30750.8951
530.22440.08430.00742659.96743554.997359.6238
540.2489-0.00131e-049.60320.80030.8946
550.27120.00726e-04310.676825.88975.0882
560.29180.00514e-04157.938513.16153.6279
570.3110.02240.00193006.0789250.506615.8274
580.32920.05290.004416805.96391400.49737.4232
590.34640.08140.006839795.40023316.283357.5872
600.36270.07640.006435013.09052917.757554.0163



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