Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 24 Jan 2008 06:13:32 -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/Jan/24/t1201180173whi05l18sb55bcx.htm/, Retrieved Tue, 14 May 2024 13:10:42 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=8059, Retrieved Tue, 14 May 2024 13:10:42 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact294
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [paper3] [2008-01-24 13:13:32] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
13.5
16.2
17.6
15.8
17.6
15.2
15.9
12.0
13.3
14.8
16.1
16.9
17.6
13.9
10.0
7.6
7.1
8.1
8.1
7.7
4.0
1.4
0.3
-1.0
-1.9
-1.5
-0.2
3.4
3.0
4.1
3.4
3.2
6.1
5.8
6.2
5.8
5.9
6.7
5.9
3.8
1.7
1.4
1.8
3.0
3.6
4.8
4.3
4.2
2.9
4.9
7.2
8.7
9.1
8.9
9.0
11.6
9.6
9.1
9.2
10.8
11.0
8.5
6.5
7.2
7.8
8.7
7.8
7.5
7.7
7.5
8.3
7.9
10.4
11.5
14.0
11.9
11.9
10.3
11.3
9.9
8.9
9.2
8.8
6.7
7.1
6.6
7.2
5.0
5.3
6.3




Summary of compuational 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 compuational 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=8059&T=0

[TABLE]
[ROW][C]Summary of compuational 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=8059&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=8059&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 compuational 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[78])
668.7-------
677.8-------
687.5-------
697.7-------
707.5-------
718.3-------
727.9-------
7310.4-------
7411.5-------
7514-------
7611.9-------
7711.9-------
7810.3-------
7911.310.63857.694713.58230.32980.58910.97060.5891
809.910.46435.811315.11740.40610.36240.89410.5276
818.911.00924.733517.28490.2550.63550.84930.5876
829.210.99183.81918.16460.31220.71620.830.575
838.811.13083.283118.97850.28020.68520.76020.5822
846.710.97842.645319.31140.15710.69580.76550.5634
857.110.97172.143119.80040.1950.82850.55050.5593
866.610.90031.582820.21780.18280.7880.44980.5502
877.210.93381.102520.76510.22830.80620.27050.5503
88510.93240.610621.25420.130.76080.42710.5478
895.310.9610.169321.75270.15190.86050.43230.5478
906.310.9561-0.27222.18420.20820.83830.54560.5456

\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[78]) \tabularnewline
66 & 8.7 & - & - & - & - & - & - & - \tabularnewline
67 & 7.8 & - & - & - & - & - & - & - \tabularnewline
68 & 7.5 & - & - & - & - & - & - & - \tabularnewline
69 & 7.7 & - & - & - & - & - & - & - \tabularnewline
70 & 7.5 & - & - & - & - & - & - & - \tabularnewline
71 & 8.3 & - & - & - & - & - & - & - \tabularnewline
72 & 7.9 & - & - & - & - & - & - & - \tabularnewline
73 & 10.4 & - & - & - & - & - & - & - \tabularnewline
74 & 11.5 & - & - & - & - & - & - & - \tabularnewline
75 & 14 & - & - & - & - & - & - & - \tabularnewline
76 & 11.9 & - & - & - & - & - & - & - \tabularnewline
77 & 11.9 & - & - & - & - & - & - & - \tabularnewline
78 & 10.3 & - & - & - & - & - & - & - \tabularnewline
79 & 11.3 & 10.6385 & 7.6947 & 13.5823 & 0.3298 & 0.5891 & 0.9706 & 0.5891 \tabularnewline
80 & 9.9 & 10.4643 & 5.8113 & 15.1174 & 0.4061 & 0.3624 & 0.8941 & 0.5276 \tabularnewline
81 & 8.9 & 11.0092 & 4.7335 & 17.2849 & 0.255 & 0.6355 & 0.8493 & 0.5876 \tabularnewline
82 & 9.2 & 10.9918 & 3.819 & 18.1646 & 0.3122 & 0.7162 & 0.83 & 0.575 \tabularnewline
83 & 8.8 & 11.1308 & 3.2831 & 18.9785 & 0.2802 & 0.6852 & 0.7602 & 0.5822 \tabularnewline
84 & 6.7 & 10.9784 & 2.6453 & 19.3114 & 0.1571 & 0.6958 & 0.7655 & 0.5634 \tabularnewline
85 & 7.1 & 10.9717 & 2.1431 & 19.8004 & 0.195 & 0.8285 & 0.5505 & 0.5593 \tabularnewline
86 & 6.6 & 10.9003 & 1.5828 & 20.2178 & 0.1828 & 0.788 & 0.4498 & 0.5502 \tabularnewline
87 & 7.2 & 10.9338 & 1.1025 & 20.7651 & 0.2283 & 0.8062 & 0.2705 & 0.5503 \tabularnewline
88 & 5 & 10.9324 & 0.6106 & 21.2542 & 0.13 & 0.7608 & 0.4271 & 0.5478 \tabularnewline
89 & 5.3 & 10.961 & 0.1693 & 21.7527 & 0.1519 & 0.8605 & 0.4323 & 0.5478 \tabularnewline
90 & 6.3 & 10.9561 & -0.272 & 22.1842 & 0.2082 & 0.8383 & 0.5456 & 0.5456 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=8059&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[78])[/C][/ROW]
[ROW][C]66[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]7.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]7.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]7.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]7.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]10.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]11.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]11.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]11.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]10.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]11.3[/C][C]10.6385[/C][C]7.6947[/C][C]13.5823[/C][C]0.3298[/C][C]0.5891[/C][C]0.9706[/C][C]0.5891[/C][/ROW]
[ROW][C]80[/C][C]9.9[/C][C]10.4643[/C][C]5.8113[/C][C]15.1174[/C][C]0.4061[/C][C]0.3624[/C][C]0.8941[/C][C]0.5276[/C][/ROW]
[ROW][C]81[/C][C]8.9[/C][C]11.0092[/C][C]4.7335[/C][C]17.2849[/C][C]0.255[/C][C]0.6355[/C][C]0.8493[/C][C]0.5876[/C][/ROW]
[ROW][C]82[/C][C]9.2[/C][C]10.9918[/C][C]3.819[/C][C]18.1646[/C][C]0.3122[/C][C]0.7162[/C][C]0.83[/C][C]0.575[/C][/ROW]
[ROW][C]83[/C][C]8.8[/C][C]11.1308[/C][C]3.2831[/C][C]18.9785[/C][C]0.2802[/C][C]0.6852[/C][C]0.7602[/C][C]0.5822[/C][/ROW]
[ROW][C]84[/C][C]6.7[/C][C]10.9784[/C][C]2.6453[/C][C]19.3114[/C][C]0.1571[/C][C]0.6958[/C][C]0.7655[/C][C]0.5634[/C][/ROW]
[ROW][C]85[/C][C]7.1[/C][C]10.9717[/C][C]2.1431[/C][C]19.8004[/C][C]0.195[/C][C]0.8285[/C][C]0.5505[/C][C]0.5593[/C][/ROW]
[ROW][C]86[/C][C]6.6[/C][C]10.9003[/C][C]1.5828[/C][C]20.2178[/C][C]0.1828[/C][C]0.788[/C][C]0.4498[/C][C]0.5502[/C][/ROW]
[ROW][C]87[/C][C]7.2[/C][C]10.9338[/C][C]1.1025[/C][C]20.7651[/C][C]0.2283[/C][C]0.8062[/C][C]0.2705[/C][C]0.5503[/C][/ROW]
[ROW][C]88[/C][C]5[/C][C]10.9324[/C][C]0.6106[/C][C]21.2542[/C][C]0.13[/C][C]0.7608[/C][C]0.4271[/C][C]0.5478[/C][/ROW]
[ROW][C]89[/C][C]5.3[/C][C]10.961[/C][C]0.1693[/C][C]21.7527[/C][C]0.1519[/C][C]0.8605[/C][C]0.4323[/C][C]0.5478[/C][/ROW]
[ROW][C]90[/C][C]6.3[/C][C]10.9561[/C][C]-0.272[/C][C]22.1842[/C][C]0.2082[/C][C]0.8383[/C][C]0.5456[/C][C]0.5456[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=8059&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=8059&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[78])
668.7-------
677.8-------
687.5-------
697.7-------
707.5-------
718.3-------
727.9-------
7310.4-------
7411.5-------
7514-------
7611.9-------
7711.9-------
7810.3-------
7911.310.63857.694713.58230.32980.58910.97060.5891
809.910.46435.811315.11740.40610.36240.89410.5276
818.911.00924.733517.28490.2550.63550.84930.5876
829.210.99183.81918.16460.31220.71620.830.575
838.811.13083.283118.97850.28020.68520.76020.5822
846.710.97842.645319.31140.15710.69580.76550.5634
857.110.97172.143119.80040.1950.82850.55050.5593
866.610.90031.582820.21780.18280.7880.44980.5502
877.210.93381.102520.76510.22830.80620.27050.5503
88510.93240.610621.25420.130.76080.42710.5478
895.310.9610.169321.75270.15190.86050.43230.5478
906.310.9561-0.27222.18420.20820.83830.54560.5456







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
790.14120.06220.00520.43760.03650.191
800.2269-0.05390.00450.31850.02650.1629
810.2908-0.19160.0164.44890.37070.6089
820.3329-0.1630.01363.21050.26750.5172
830.3597-0.20940.01755.43260.45270.6728
840.3873-0.38970.032518.30451.52541.2351
850.4105-0.35290.029414.99031.24921.1177
860.4361-0.39450.032918.49251.5411.2414
870.4588-0.34150.028513.94151.16181.0779
880.4817-0.54260.045235.19332.93281.7125
890.5023-0.51650.04332.04722.67061.6342
900.5229-0.4250.035421.67911.80661.3441

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
79 & 0.1412 & 0.0622 & 0.0052 & 0.4376 & 0.0365 & 0.191 \tabularnewline
80 & 0.2269 & -0.0539 & 0.0045 & 0.3185 & 0.0265 & 0.1629 \tabularnewline
81 & 0.2908 & -0.1916 & 0.016 & 4.4489 & 0.3707 & 0.6089 \tabularnewline
82 & 0.3329 & -0.163 & 0.0136 & 3.2105 & 0.2675 & 0.5172 \tabularnewline
83 & 0.3597 & -0.2094 & 0.0175 & 5.4326 & 0.4527 & 0.6728 \tabularnewline
84 & 0.3873 & -0.3897 & 0.0325 & 18.3045 & 1.5254 & 1.2351 \tabularnewline
85 & 0.4105 & -0.3529 & 0.0294 & 14.9903 & 1.2492 & 1.1177 \tabularnewline
86 & 0.4361 & -0.3945 & 0.0329 & 18.4925 & 1.541 & 1.2414 \tabularnewline
87 & 0.4588 & -0.3415 & 0.0285 & 13.9415 & 1.1618 & 1.0779 \tabularnewline
88 & 0.4817 & -0.5426 & 0.0452 & 35.1933 & 2.9328 & 1.7125 \tabularnewline
89 & 0.5023 & -0.5165 & 0.043 & 32.0472 & 2.6706 & 1.6342 \tabularnewline
90 & 0.5229 & -0.425 & 0.0354 & 21.6791 & 1.8066 & 1.3441 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=8059&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]79[/C][C]0.1412[/C][C]0.0622[/C][C]0.0052[/C][C]0.4376[/C][C]0.0365[/C][C]0.191[/C][/ROW]
[ROW][C]80[/C][C]0.2269[/C][C]-0.0539[/C][C]0.0045[/C][C]0.3185[/C][C]0.0265[/C][C]0.1629[/C][/ROW]
[ROW][C]81[/C][C]0.2908[/C][C]-0.1916[/C][C]0.016[/C][C]4.4489[/C][C]0.3707[/C][C]0.6089[/C][/ROW]
[ROW][C]82[/C][C]0.3329[/C][C]-0.163[/C][C]0.0136[/C][C]3.2105[/C][C]0.2675[/C][C]0.5172[/C][/ROW]
[ROW][C]83[/C][C]0.3597[/C][C]-0.2094[/C][C]0.0175[/C][C]5.4326[/C][C]0.4527[/C][C]0.6728[/C][/ROW]
[ROW][C]84[/C][C]0.3873[/C][C]-0.3897[/C][C]0.0325[/C][C]18.3045[/C][C]1.5254[/C][C]1.2351[/C][/ROW]
[ROW][C]85[/C][C]0.4105[/C][C]-0.3529[/C][C]0.0294[/C][C]14.9903[/C][C]1.2492[/C][C]1.1177[/C][/ROW]
[ROW][C]86[/C][C]0.4361[/C][C]-0.3945[/C][C]0.0329[/C][C]18.4925[/C][C]1.541[/C][C]1.2414[/C][/ROW]
[ROW][C]87[/C][C]0.4588[/C][C]-0.3415[/C][C]0.0285[/C][C]13.9415[/C][C]1.1618[/C][C]1.0779[/C][/ROW]
[ROW][C]88[/C][C]0.4817[/C][C]-0.5426[/C][C]0.0452[/C][C]35.1933[/C][C]2.9328[/C][C]1.7125[/C][/ROW]
[ROW][C]89[/C][C]0.5023[/C][C]-0.5165[/C][C]0.043[/C][C]32.0472[/C][C]2.6706[/C][C]1.6342[/C][/ROW]
[ROW][C]90[/C][C]0.5229[/C][C]-0.425[/C][C]0.0354[/C][C]21.6791[/C][C]1.8066[/C][C]1.3441[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=8059&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=8059&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
790.14120.06220.00520.43760.03650.191
800.2269-0.05390.00450.31850.02650.1629
810.2908-0.19160.0164.44890.37070.6089
820.3329-0.1630.01363.21050.26750.5172
830.3597-0.20940.01755.43260.45270.6728
840.3873-0.38970.032518.30451.52541.2351
850.4105-0.35290.029414.99031.24921.1177
860.4361-0.39450.032918.49251.5411.2414
870.4588-0.34150.028513.94151.16181.0779
880.4817-0.54260.045235.19332.93281.7125
890.5023-0.51650.04332.04722.67061.6342
900.5229-0.4250.035421.67911.80661.3441



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