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 computationSun, 14 Dec 2008 07:57:35 -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/14/t12292671704o759p8lf1y05jp.htm/, Retrieved Wed, 15 May 2024 14:02:25 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33410, Retrieved Wed, 15 May 2024 14:02:25 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact157
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMPD  [ARIMA Backward Selection] [Model] [2008-12-08 20:13:26] [a0d819c22534897f04a2f0b92f1eb36a]
-   P     [ARIMA Backward Selection] [Oplossing invoer] [2008-12-09 11:40:15] [a0d819c22534897f04a2f0b92f1eb36a]
- RMPD        [ARIMA Forecasting] [S1] [2008-12-14 14:57:35] [5f3e73ccf1ddc75508eed47fa51813d3] [Current]
Feedback Forum

Post a new message
Dataseries X:
2487
3644
2501
1629
987
1100
690
1378
1376
1736
2800
2671
2508
3590
2691
1629
1020
1224
787
1424
1232
2021
2782
2682
3284
3194
2736
1701
1089
1240
799
1163
1180
1960
2914
2658
3254
3222
2987
1604
1032
1283
774
1109
1453
1849
2800
3310
3060
3422
3448
1670
1022
1391
767
1172
1498
1623
2646
3439




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33410&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'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])
362658-------
373254-------
383222-------
392987-------
401604-------
411032-------
421283-------
43774-------
441109-------
451453-------
461849-------
472800-------
483310-------
4930602808.80892417.45193249.28540.13180.01290.02380.0129
5034223339.28992880.17733855.16830.37670.85570.67210.5443
5134483222.92652776.6993724.76310.18970.21840.82160.3669
5216701519.85381262.85921817.0820.161100.28950
5310221010.7708824.77081228.90950.459800.42440
5413911325.1461093.0641595.07450.31630.98610.62020
55767750.663603.6658924.99580.427100.39650
5611721209.3441991.77771463.520.38670.99970.78050
5714981485.75281228.35151784.60270.4680.98020.5850
5816231854.83791546.18672210.92230.1010.97520.51280
5926462763.89432336.60493251.52560.317810.44230.0141
6034393308.37112813.75353870.22240.32430.98960.49770.4977

\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 & 2658 & - & - & - & - & - & - & - \tabularnewline
37 & 3254 & - & - & - & - & - & - & - \tabularnewline
38 & 3222 & - & - & - & - & - & - & - \tabularnewline
39 & 2987 & - & - & - & - & - & - & - \tabularnewline
40 & 1604 & - & - & - & - & - & - & - \tabularnewline
41 & 1032 & - & - & - & - & - & - & - \tabularnewline
42 & 1283 & - & - & - & - & - & - & - \tabularnewline
43 & 774 & - & - & - & - & - & - & - \tabularnewline
44 & 1109 & - & - & - & - & - & - & - \tabularnewline
45 & 1453 & - & - & - & - & - & - & - \tabularnewline
46 & 1849 & - & - & - & - & - & - & - \tabularnewline
47 & 2800 & - & - & - & - & - & - & - \tabularnewline
48 & 3310 & - & - & - & - & - & - & - \tabularnewline
49 & 3060 & 2808.8089 & 2417.4519 & 3249.2854 & 0.1318 & 0.0129 & 0.0238 & 0.0129 \tabularnewline
50 & 3422 & 3339.2899 & 2880.1773 & 3855.1683 & 0.3767 & 0.8557 & 0.6721 & 0.5443 \tabularnewline
51 & 3448 & 3222.9265 & 2776.699 & 3724.7631 & 0.1897 & 0.2184 & 0.8216 & 0.3669 \tabularnewline
52 & 1670 & 1519.8538 & 1262.8592 & 1817.082 & 0.1611 & 0 & 0.2895 & 0 \tabularnewline
53 & 1022 & 1010.7708 & 824.7708 & 1228.9095 & 0.4598 & 0 & 0.4244 & 0 \tabularnewline
54 & 1391 & 1325.146 & 1093.064 & 1595.0745 & 0.3163 & 0.9861 & 0.6202 & 0 \tabularnewline
55 & 767 & 750.663 & 603.6658 & 924.9958 & 0.4271 & 0 & 0.3965 & 0 \tabularnewline
56 & 1172 & 1209.3441 & 991.7777 & 1463.52 & 0.3867 & 0.9997 & 0.7805 & 0 \tabularnewline
57 & 1498 & 1485.7528 & 1228.3515 & 1784.6027 & 0.468 & 0.9802 & 0.585 & 0 \tabularnewline
58 & 1623 & 1854.8379 & 1546.1867 & 2210.9223 & 0.101 & 0.9752 & 0.5128 & 0 \tabularnewline
59 & 2646 & 2763.8943 & 2336.6049 & 3251.5256 & 0.3178 & 1 & 0.4423 & 0.0141 \tabularnewline
60 & 3439 & 3308.3711 & 2813.7535 & 3870.2224 & 0.3243 & 0.9896 & 0.4977 & 0.4977 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33410&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]2658[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]3254[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]3222[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]2987[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]1604[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]1032[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]1283[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]774[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]1109[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]1453[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]1849[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]2800[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]3310[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]3060[/C][C]2808.8089[/C][C]2417.4519[/C][C]3249.2854[/C][C]0.1318[/C][C]0.0129[/C][C]0.0238[/C][C]0.0129[/C][/ROW]
[ROW][C]50[/C][C]3422[/C][C]3339.2899[/C][C]2880.1773[/C][C]3855.1683[/C][C]0.3767[/C][C]0.8557[/C][C]0.6721[/C][C]0.5443[/C][/ROW]
[ROW][C]51[/C][C]3448[/C][C]3222.9265[/C][C]2776.699[/C][C]3724.7631[/C][C]0.1897[/C][C]0.2184[/C][C]0.8216[/C][C]0.3669[/C][/ROW]
[ROW][C]52[/C][C]1670[/C][C]1519.8538[/C][C]1262.8592[/C][C]1817.082[/C][C]0.1611[/C][C]0[/C][C]0.2895[/C][C]0[/C][/ROW]
[ROW][C]53[/C][C]1022[/C][C]1010.7708[/C][C]824.7708[/C][C]1228.9095[/C][C]0.4598[/C][C]0[/C][C]0.4244[/C][C]0[/C][/ROW]
[ROW][C]54[/C][C]1391[/C][C]1325.146[/C][C]1093.064[/C][C]1595.0745[/C][C]0.3163[/C][C]0.9861[/C][C]0.6202[/C][C]0[/C][/ROW]
[ROW][C]55[/C][C]767[/C][C]750.663[/C][C]603.6658[/C][C]924.9958[/C][C]0.4271[/C][C]0[/C][C]0.3965[/C][C]0[/C][/ROW]
[ROW][C]56[/C][C]1172[/C][C]1209.3441[/C][C]991.7777[/C][C]1463.52[/C][C]0.3867[/C][C]0.9997[/C][C]0.7805[/C][C]0[/C][/ROW]
[ROW][C]57[/C][C]1498[/C][C]1485.7528[/C][C]1228.3515[/C][C]1784.6027[/C][C]0.468[/C][C]0.9802[/C][C]0.585[/C][C]0[/C][/ROW]
[ROW][C]58[/C][C]1623[/C][C]1854.8379[/C][C]1546.1867[/C][C]2210.9223[/C][C]0.101[/C][C]0.9752[/C][C]0.5128[/C][C]0[/C][/ROW]
[ROW][C]59[/C][C]2646[/C][C]2763.8943[/C][C]2336.6049[/C][C]3251.5256[/C][C]0.3178[/C][C]1[/C][C]0.4423[/C][C]0.0141[/C][/ROW]
[ROW][C]60[/C][C]3439[/C][C]3308.3711[/C][C]2813.7535[/C][C]3870.2224[/C][C]0.3243[/C][C]0.9896[/C][C]0.4977[/C][C]0.4977[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33410&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33410&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])
362658-------
373254-------
383222-------
392987-------
401604-------
411032-------
421283-------
43774-------
441109-------
451453-------
461849-------
472800-------
483310-------
4930602808.80892417.45193249.28540.13180.01290.02380.0129
5034223339.28992880.17733855.16830.37670.85570.67210.5443
5134483222.92652776.6993724.76310.18970.21840.82160.3669
5216701519.85381262.85921817.0820.161100.28950
5310221010.7708824.77081228.90950.459800.42440
5413911325.1461093.0641595.07450.31630.98610.62020
55767750.663603.6658924.99580.427100.39650
5611721209.3441991.77771463.520.38670.99970.78050
5714981485.75281228.35151784.60270.4680.98020.5850
5816231854.83791546.18672210.92230.1010.97520.51280
5926462763.89432336.60493251.52560.317810.44230.0141
6034393308.37112813.75353870.22240.32430.98960.49770.4977







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.080.08940.007563096.95225258.079472.5126
500.07880.02480.00216840.9599570.0823.8763
510.07940.06980.005850658.07084221.505964.9731
520.09980.09880.008222543.88341878.65743.3435
530.11010.01119e-04126.094610.50793.2416
540.10390.04970.00414336.7543361.396219.0104
550.11850.02180.0018266.89722.24144.7161
560.1072-0.03090.00261394.5808116.215110.7803
570.10260.00827e-04149.993612.49953.5355
580.0979-0.1250.010453748.81834479.068266.9258
590.09-0.04270.003613899.06451158.255434.0332
600.08660.03950.003317063.90011421.991737.7093

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.08 & 0.0894 & 0.0075 & 63096.9522 & 5258.0794 & 72.5126 \tabularnewline
50 & 0.0788 & 0.0248 & 0.0021 & 6840.9599 & 570.08 & 23.8763 \tabularnewline
51 & 0.0794 & 0.0698 & 0.0058 & 50658.0708 & 4221.5059 & 64.9731 \tabularnewline
52 & 0.0998 & 0.0988 & 0.0082 & 22543.8834 & 1878.657 & 43.3435 \tabularnewline
53 & 0.1101 & 0.0111 & 9e-04 & 126.0946 & 10.5079 & 3.2416 \tabularnewline
54 & 0.1039 & 0.0497 & 0.0041 & 4336.7543 & 361.3962 & 19.0104 \tabularnewline
55 & 0.1185 & 0.0218 & 0.0018 & 266.897 & 22.2414 & 4.7161 \tabularnewline
56 & 0.1072 & -0.0309 & 0.0026 & 1394.5808 & 116.2151 & 10.7803 \tabularnewline
57 & 0.1026 & 0.0082 & 7e-04 & 149.9936 & 12.4995 & 3.5355 \tabularnewline
58 & 0.0979 & -0.125 & 0.0104 & 53748.8183 & 4479.0682 & 66.9258 \tabularnewline
59 & 0.09 & -0.0427 & 0.0036 & 13899.0645 & 1158.2554 & 34.0332 \tabularnewline
60 & 0.0866 & 0.0395 & 0.0033 & 17063.9001 & 1421.9917 & 37.7093 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33410&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.08[/C][C]0.0894[/C][C]0.0075[/C][C]63096.9522[/C][C]5258.0794[/C][C]72.5126[/C][/ROW]
[ROW][C]50[/C][C]0.0788[/C][C]0.0248[/C][C]0.0021[/C][C]6840.9599[/C][C]570.08[/C][C]23.8763[/C][/ROW]
[ROW][C]51[/C][C]0.0794[/C][C]0.0698[/C][C]0.0058[/C][C]50658.0708[/C][C]4221.5059[/C][C]64.9731[/C][/ROW]
[ROW][C]52[/C][C]0.0998[/C][C]0.0988[/C][C]0.0082[/C][C]22543.8834[/C][C]1878.657[/C][C]43.3435[/C][/ROW]
[ROW][C]53[/C][C]0.1101[/C][C]0.0111[/C][C]9e-04[/C][C]126.0946[/C][C]10.5079[/C][C]3.2416[/C][/ROW]
[ROW][C]54[/C][C]0.1039[/C][C]0.0497[/C][C]0.0041[/C][C]4336.7543[/C][C]361.3962[/C][C]19.0104[/C][/ROW]
[ROW][C]55[/C][C]0.1185[/C][C]0.0218[/C][C]0.0018[/C][C]266.897[/C][C]22.2414[/C][C]4.7161[/C][/ROW]
[ROW][C]56[/C][C]0.1072[/C][C]-0.0309[/C][C]0.0026[/C][C]1394.5808[/C][C]116.2151[/C][C]10.7803[/C][/ROW]
[ROW][C]57[/C][C]0.1026[/C][C]0.0082[/C][C]7e-04[/C][C]149.9936[/C][C]12.4995[/C][C]3.5355[/C][/ROW]
[ROW][C]58[/C][C]0.0979[/C][C]-0.125[/C][C]0.0104[/C][C]53748.8183[/C][C]4479.0682[/C][C]66.9258[/C][/ROW]
[ROW][C]59[/C][C]0.09[/C][C]-0.0427[/C][C]0.0036[/C][C]13899.0645[/C][C]1158.2554[/C][C]34.0332[/C][/ROW]
[ROW][C]60[/C][C]0.0866[/C][C]0.0395[/C][C]0.0033[/C][C]17063.9001[/C][C]1421.9917[/C][C]37.7093[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33410&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33410&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.080.08940.007563096.95225258.079472.5126
500.07880.02480.00216840.9599570.0823.8763
510.07940.06980.005850658.07084221.505964.9731
520.09980.09880.008222543.88341878.65743.3435
530.11010.01119e-04126.094610.50793.2416
540.10390.04970.00414336.7543361.396219.0104
550.11850.02180.0018266.89722.24144.7161
560.1072-0.03090.00261394.5808116.215110.7803
570.10260.00827e-04149.993612.49953.5355
580.0979-0.1250.010453748.81834479.068266.9258
590.09-0.04270.003613899.06451158.255434.0332
600.08660.03950.003317063.90011421.991737.7093



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