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, 04 Dec 2010 17:55:48 +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/04/t1291485275nzzp63lx728705u.htm/, Retrieved Sat, 04 May 2024 21:59:11 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=105238, Retrieved Sat, 04 May 2024 21:59:11 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact200
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-12 13:32:37] [76963dc1903f0f612b6153510a3818cf]
- R  D  [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-17 12:14:40] [76963dc1903f0f612b6153510a3818cf]
-         [Univariate Explorative Data Analysis] [Run Sequence Plot...] [2008-12-22 18:19:51] [1ce0d16c8f4225c977b42c8fa93bc163]
- RMP       [Univariate Data Series] [Identifying Integ...] [2009-11-22 12:08:06] [b98453cac15ba1066b407e146608df68]
- RMP         [Standard Deviation-Mean Plot] [Births] [2010-11-29 10:52:49] [b98453cac15ba1066b407e146608df68]
- RMP           [ARIMA Forecasting] [Births] [2010-11-29 20:53:49] [b98453cac15ba1066b407e146608df68]
-   PD              [ARIMA Forecasting] [WS9 Arima forecast] [2010-12-04 17:55:48] [8b27277f7b82c0354d659d066108e38e] [Current]
-   P                 [ARIMA Forecasting] [WS9 Arima forecast] [2010-12-04 22:07:21] [65eb19f81eab2b6e672eafaed2a27190]
Feedback Forum

Post a new message
Dataseries X:
46
62
66
59
58
61
41
27
58
70
49
59
44
36
72
45
56
54
53
35
61
52
47
51
52
63
74
45
51
64
36
30
55
64
39
40
63
45
59
55
40
64
27
28
45
57
45
69
60
56
58
50
51
53
37
22
55
70
62
58
39
49
58
47
42
62
39
40
72
70
54
65




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105238&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[60])
4869-------
4960-------
5056-------
5158-------
5250-------
5351-------
5453-------
5537-------
5622-------
5755-------
5870-------
5962-------
6058-------
613958.000133.239382.7610.06630.50.43710.5
624957.400222.734992.06540.31740.85090.53150.4865
635870.800228.4888113.11160.27660.84370.72340.7234
644755.80027.027104.57350.36180.46480.59220.4648
654256.20031.7264110.67420.30470.62970.57420.4742
666264.20034.5683123.83240.47120.76720.64360.5807
673943.8004-20.5779108.17860.44190.28980.5820.3328
684033.4005-35.3973102.19820.42540.43660.62730.2417
697259.8005-13.1495132.75060.37150.70260.55130.5193
707067.6006-9.2777144.4790.47560.45530.47560.5967
715453.4007-27.2148134.01620.49420.34330.41720.4555
726560.4008-23.7861144.58770.45740.55920.52230.5223

\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[60]) \tabularnewline
48 & 69 & - & - & - & - & - & - & - \tabularnewline
49 & 60 & - & - & - & - & - & - & - \tabularnewline
50 & 56 & - & - & - & - & - & - & - \tabularnewline
51 & 58 & - & - & - & - & - & - & - \tabularnewline
52 & 50 & - & - & - & - & - & - & - \tabularnewline
53 & 51 & - & - & - & - & - & - & - \tabularnewline
54 & 53 & - & - & - & - & - & - & - \tabularnewline
55 & 37 & - & - & - & - & - & - & - \tabularnewline
56 & 22 & - & - & - & - & - & - & - \tabularnewline
57 & 55 & - & - & - & - & - & - & - \tabularnewline
58 & 70 & - & - & - & - & - & - & - \tabularnewline
59 & 62 & - & - & - & - & - & - & - \tabularnewline
60 & 58 & - & - & - & - & - & - & - \tabularnewline
61 & 39 & 58.0001 & 33.2393 & 82.761 & 0.0663 & 0.5 & 0.4371 & 0.5 \tabularnewline
62 & 49 & 57.4002 & 22.7349 & 92.0654 & 0.3174 & 0.8509 & 0.5315 & 0.4865 \tabularnewline
63 & 58 & 70.8002 & 28.4888 & 113.1116 & 0.2766 & 0.8437 & 0.7234 & 0.7234 \tabularnewline
64 & 47 & 55.8002 & 7.027 & 104.5735 & 0.3618 & 0.4648 & 0.5922 & 0.4648 \tabularnewline
65 & 42 & 56.2003 & 1.7264 & 110.6742 & 0.3047 & 0.6297 & 0.5742 & 0.4742 \tabularnewline
66 & 62 & 64.2003 & 4.5683 & 123.8324 & 0.4712 & 0.7672 & 0.6436 & 0.5807 \tabularnewline
67 & 39 & 43.8004 & -20.5779 & 108.1786 & 0.4419 & 0.2898 & 0.582 & 0.3328 \tabularnewline
68 & 40 & 33.4005 & -35.3973 & 102.1982 & 0.4254 & 0.4366 & 0.6273 & 0.2417 \tabularnewline
69 & 72 & 59.8005 & -13.1495 & 132.7506 & 0.3715 & 0.7026 & 0.5513 & 0.5193 \tabularnewline
70 & 70 & 67.6006 & -9.2777 & 144.479 & 0.4756 & 0.4553 & 0.4756 & 0.5967 \tabularnewline
71 & 54 & 53.4007 & -27.2148 & 134.0162 & 0.4942 & 0.3433 & 0.4172 & 0.4555 \tabularnewline
72 & 65 & 60.4008 & -23.7861 & 144.5877 & 0.4574 & 0.5592 & 0.5223 & 0.5223 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105238&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[60])[/C][/ROW]
[ROW][C]48[/C][C]69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]60[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]50[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]55[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]70[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]39[/C][C]58.0001[/C][C]33.2393[/C][C]82.761[/C][C]0.0663[/C][C]0.5[/C][C]0.4371[/C][C]0.5[/C][/ROW]
[ROW][C]62[/C][C]49[/C][C]57.4002[/C][C]22.7349[/C][C]92.0654[/C][C]0.3174[/C][C]0.8509[/C][C]0.5315[/C][C]0.4865[/C][/ROW]
[ROW][C]63[/C][C]58[/C][C]70.8002[/C][C]28.4888[/C][C]113.1116[/C][C]0.2766[/C][C]0.8437[/C][C]0.7234[/C][C]0.7234[/C][/ROW]
[ROW][C]64[/C][C]47[/C][C]55.8002[/C][C]7.027[/C][C]104.5735[/C][C]0.3618[/C][C]0.4648[/C][C]0.5922[/C][C]0.4648[/C][/ROW]
[ROW][C]65[/C][C]42[/C][C]56.2003[/C][C]1.7264[/C][C]110.6742[/C][C]0.3047[/C][C]0.6297[/C][C]0.5742[/C][C]0.4742[/C][/ROW]
[ROW][C]66[/C][C]62[/C][C]64.2003[/C][C]4.5683[/C][C]123.8324[/C][C]0.4712[/C][C]0.7672[/C][C]0.6436[/C][C]0.5807[/C][/ROW]
[ROW][C]67[/C][C]39[/C][C]43.8004[/C][C]-20.5779[/C][C]108.1786[/C][C]0.4419[/C][C]0.2898[/C][C]0.582[/C][C]0.3328[/C][/ROW]
[ROW][C]68[/C][C]40[/C][C]33.4005[/C][C]-35.3973[/C][C]102.1982[/C][C]0.4254[/C][C]0.4366[/C][C]0.6273[/C][C]0.2417[/C][/ROW]
[ROW][C]69[/C][C]72[/C][C]59.8005[/C][C]-13.1495[/C][C]132.7506[/C][C]0.3715[/C][C]0.7026[/C][C]0.5513[/C][C]0.5193[/C][/ROW]
[ROW][C]70[/C][C]70[/C][C]67.6006[/C][C]-9.2777[/C][C]144.479[/C][C]0.4756[/C][C]0.4553[/C][C]0.4756[/C][C]0.5967[/C][/ROW]
[ROW][C]71[/C][C]54[/C][C]53.4007[/C][C]-27.2148[/C][C]134.0162[/C][C]0.4942[/C][C]0.3433[/C][C]0.4172[/C][C]0.4555[/C][/ROW]
[ROW][C]72[/C][C]65[/C][C]60.4008[/C][C]-23.7861[/C][C]144.5877[/C][C]0.4574[/C][C]0.5592[/C][C]0.5223[/C][C]0.5223[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105238&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105238&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[60])
4869-------
4960-------
5056-------
5158-------
5250-------
5351-------
5453-------
5537-------
5622-------
5755-------
5870-------
5962-------
6058-------
613958.000133.239382.7610.06630.50.43710.5
624957.400222.734992.06540.31740.85090.53150.4865
635870.800228.4888113.11160.27660.84370.72340.7234
644755.80027.027104.57350.36180.46480.59220.4648
654256.20031.7264110.67420.30470.62970.57420.4742
666264.20034.5683123.83240.47120.76720.64360.5807
673943.8004-20.5779108.17860.44190.28980.5820.3328
684033.4005-35.3973102.19820.42540.43660.62730.2417
697259.8005-13.1495132.75060.37150.70260.55130.5193
707067.6006-9.2777144.4790.47560.45530.47560.5967
715453.4007-27.2148134.01620.49420.34330.41720.4555
726560.4008-23.7861144.58770.45740.55920.52230.5223







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.2178-0.32760361.005700
620.3081-0.14630.23770.5628215.784214.6896
630.3049-0.18080.2182163.8449198.471114.088
640.446-0.15770.203177.444168.214412.9697
650.4945-0.25270.213201.6478174.90113.225
660.4739-0.03430.18324.8414146.557812.1061
670.7499-0.10960.172723.0438128.912911.354
681.05090.19760.175843.5539118.24310.874
690.62240.2040.179148.8269121.641211.0291
700.58020.03550.16465.757110.052810.4906
710.77020.01120.15070.3591100.080710.004
720.71110.07610.144521.152593.50339.6697

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.2178 & -0.3276 & 0 & 361.0057 & 0 & 0 \tabularnewline
62 & 0.3081 & -0.1463 & 0.237 & 70.5628 & 215.7842 & 14.6896 \tabularnewline
63 & 0.3049 & -0.1808 & 0.2182 & 163.8449 & 198.4711 & 14.088 \tabularnewline
64 & 0.446 & -0.1577 & 0.2031 & 77.444 & 168.2144 & 12.9697 \tabularnewline
65 & 0.4945 & -0.2527 & 0.213 & 201.6478 & 174.901 & 13.225 \tabularnewline
66 & 0.4739 & -0.0343 & 0.1832 & 4.8414 & 146.5578 & 12.1061 \tabularnewline
67 & 0.7499 & -0.1096 & 0.1727 & 23.0438 & 128.9129 & 11.354 \tabularnewline
68 & 1.0509 & 0.1976 & 0.1758 & 43.5539 & 118.243 & 10.874 \tabularnewline
69 & 0.6224 & 0.204 & 0.179 & 148.8269 & 121.6412 & 11.0291 \tabularnewline
70 & 0.5802 & 0.0355 & 0.1646 & 5.757 & 110.0528 & 10.4906 \tabularnewline
71 & 0.7702 & 0.0112 & 0.1507 & 0.3591 & 100.0807 & 10.004 \tabularnewline
72 & 0.7111 & 0.0761 & 0.1445 & 21.1525 & 93.5033 & 9.6697 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105238&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]61[/C][C]0.2178[/C][C]-0.3276[/C][C]0[/C][C]361.0057[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.3081[/C][C]-0.1463[/C][C]0.237[/C][C]70.5628[/C][C]215.7842[/C][C]14.6896[/C][/ROW]
[ROW][C]63[/C][C]0.3049[/C][C]-0.1808[/C][C]0.2182[/C][C]163.8449[/C][C]198.4711[/C][C]14.088[/C][/ROW]
[ROW][C]64[/C][C]0.446[/C][C]-0.1577[/C][C]0.2031[/C][C]77.444[/C][C]168.2144[/C][C]12.9697[/C][/ROW]
[ROW][C]65[/C][C]0.4945[/C][C]-0.2527[/C][C]0.213[/C][C]201.6478[/C][C]174.901[/C][C]13.225[/C][/ROW]
[ROW][C]66[/C][C]0.4739[/C][C]-0.0343[/C][C]0.1832[/C][C]4.8414[/C][C]146.5578[/C][C]12.1061[/C][/ROW]
[ROW][C]67[/C][C]0.7499[/C][C]-0.1096[/C][C]0.1727[/C][C]23.0438[/C][C]128.9129[/C][C]11.354[/C][/ROW]
[ROW][C]68[/C][C]1.0509[/C][C]0.1976[/C][C]0.1758[/C][C]43.5539[/C][C]118.243[/C][C]10.874[/C][/ROW]
[ROW][C]69[/C][C]0.6224[/C][C]0.204[/C][C]0.179[/C][C]148.8269[/C][C]121.6412[/C][C]11.0291[/C][/ROW]
[ROW][C]70[/C][C]0.5802[/C][C]0.0355[/C][C]0.1646[/C][C]5.757[/C][C]110.0528[/C][C]10.4906[/C][/ROW]
[ROW][C]71[/C][C]0.7702[/C][C]0.0112[/C][C]0.1507[/C][C]0.3591[/C][C]100.0807[/C][C]10.004[/C][/ROW]
[ROW][C]72[/C][C]0.7111[/C][C]0.0761[/C][C]0.1445[/C][C]21.1525[/C][C]93.5033[/C][C]9.6697[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105238&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105238&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
610.2178-0.32760361.005700
620.3081-0.14630.23770.5628215.784214.6896
630.3049-0.18080.2182163.8449198.471114.088
640.446-0.15770.203177.444168.214412.9697
650.4945-0.25270.213201.6478174.90113.225
660.4739-0.03430.18324.8414146.557812.1061
670.7499-0.10960.172723.0438128.912911.354
681.05090.19760.175843.5539118.24310.874
690.62240.2040.179148.8269121.641211.0291
700.58020.03550.16465.757110.052810.4906
710.77020.01120.15070.3591100.080710.004
720.71110.07610.144521.152593.50339.6697



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