Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 11 Dec 2008 04:41:43 -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/11/t1228996001bgxbozr0q9xtleb.htm/, Retrieved Sat, 18 May 2024 06:48:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=32170, Retrieved Sat, 18 May 2024 06:48:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact192
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Standard Deviation-Mean Plot] [] [2008-12-02 13:23:50] [74be16979710d4c4e7c6647856088456]
- RMP     [ARIMA Forecasting] [] [2008-12-11 11:41:43] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
5.1
4.9
5.2
5.1
4.6
3.7
3.9
3.1
2.8
2.6
2.2
1.8
1.3
1.2
1.4
1.3
1.3
1.9
1.9
2.1
2.0
1.9
1.9
1.9
1.8
1.7
1.6
1.7
1.9
1.7
1.3
2.0
2.0
2.3
2.0
1.7
2.3
2.4
2.4
2.3
2.1
2.1
2.5
2.0
1.8
1.7
1.9
2.1
1.4
1.6
1.7
1.6
1.9
1.6
1.1
1.3
1.6
1.6
1.7
1.6
1.7
1.6
1.5
1.6
1.1
1.5
1.4
1.3
0.9
1.2
0.9
1.1
1.3
1.3
1.4
1.2
1.7
2.0
3.0
3.1
3.2
2.7
2.8
3.0
2.8
3.1
3.1
3.2
3.1
2.7
2.2
2.2
2.1
2.3
2.5
2.3
2.6




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32170&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[85])
731.3-------
741.3-------
751.4-------
761.2-------
771.7-------
782-------
793-------
803.1-------
813.2-------
822.7-------
832.8-------
843-------
852.8-------
863.12.76851.90384.39030.34440.48480.9620.4848
873.12.65951.67424.86110.34750.34750.86890.4502
883.22.89921.666.29830.43110.45390.83640.5228
893.12.41791.36095.43320.32870.30560.67960.4019
902.72.25451.22735.4250.39150.30060.56250.368
912.21.95271.05654.75970.43140.30090.23230.277
922.21.93321.0095.09810.43440.43440.2350.2957
932.11.91490.96725.44690.45910.43720.23790.3117
942.32.01950.97136.48430.4510.48590.38260.3659
952.51.99570.93396.89060.420.45150.37370.3737
962.31.95270.89387.16850.44810.41850.34690.3751
972.61.99570.88248.10820.42320.46110.39820.3982

\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[85]) \tabularnewline
73 & 1.3 & - & - & - & - & - & - & - \tabularnewline
74 & 1.3 & - & - & - & - & - & - & - \tabularnewline
75 & 1.4 & - & - & - & - & - & - & - \tabularnewline
76 & 1.2 & - & - & - & - & - & - & - \tabularnewline
77 & 1.7 & - & - & - & - & - & - & - \tabularnewline
78 & 2 & - & - & - & - & - & - & - \tabularnewline
79 & 3 & - & - & - & - & - & - & - \tabularnewline
80 & 3.1 & - & - & - & - & - & - & - \tabularnewline
81 & 3.2 & - & - & - & - & - & - & - \tabularnewline
82 & 2.7 & - & - & - & - & - & - & - \tabularnewline
83 & 2.8 & - & - & - & - & - & - & - \tabularnewline
84 & 3 & - & - & - & - & - & - & - \tabularnewline
85 & 2.8 & - & - & - & - & - & - & - \tabularnewline
86 & 3.1 & 2.7685 & 1.9038 & 4.3903 & 0.3444 & 0.4848 & 0.962 & 0.4848 \tabularnewline
87 & 3.1 & 2.6595 & 1.6742 & 4.8611 & 0.3475 & 0.3475 & 0.8689 & 0.4502 \tabularnewline
88 & 3.2 & 2.8992 & 1.66 & 6.2983 & 0.4311 & 0.4539 & 0.8364 & 0.5228 \tabularnewline
89 & 3.1 & 2.4179 & 1.3609 & 5.4332 & 0.3287 & 0.3056 & 0.6796 & 0.4019 \tabularnewline
90 & 2.7 & 2.2545 & 1.2273 & 5.425 & 0.3915 & 0.3006 & 0.5625 & 0.368 \tabularnewline
91 & 2.2 & 1.9527 & 1.0565 & 4.7597 & 0.4314 & 0.3009 & 0.2323 & 0.277 \tabularnewline
92 & 2.2 & 1.9332 & 1.009 & 5.0981 & 0.4344 & 0.4344 & 0.235 & 0.2957 \tabularnewline
93 & 2.1 & 1.9149 & 0.9672 & 5.4469 & 0.4591 & 0.4372 & 0.2379 & 0.3117 \tabularnewline
94 & 2.3 & 2.0195 & 0.9713 & 6.4843 & 0.451 & 0.4859 & 0.3826 & 0.3659 \tabularnewline
95 & 2.5 & 1.9957 & 0.9339 & 6.8906 & 0.42 & 0.4515 & 0.3737 & 0.3737 \tabularnewline
96 & 2.3 & 1.9527 & 0.8938 & 7.1685 & 0.4481 & 0.4185 & 0.3469 & 0.3751 \tabularnewline
97 & 2.6 & 1.9957 & 0.8824 & 8.1082 & 0.4232 & 0.4611 & 0.3982 & 0.3982 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32170&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[85])[/C][/ROW]
[ROW][C]73[/C][C]1.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]1.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]1.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]1.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]1.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]3.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]3.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]2.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]2.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]2.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]3.1[/C][C]2.7685[/C][C]1.9038[/C][C]4.3903[/C][C]0.3444[/C][C]0.4848[/C][C]0.962[/C][C]0.4848[/C][/ROW]
[ROW][C]87[/C][C]3.1[/C][C]2.6595[/C][C]1.6742[/C][C]4.8611[/C][C]0.3475[/C][C]0.3475[/C][C]0.8689[/C][C]0.4502[/C][/ROW]
[ROW][C]88[/C][C]3.2[/C][C]2.8992[/C][C]1.66[/C][C]6.2983[/C][C]0.4311[/C][C]0.4539[/C][C]0.8364[/C][C]0.5228[/C][/ROW]
[ROW][C]89[/C][C]3.1[/C][C]2.4179[/C][C]1.3609[/C][C]5.4332[/C][C]0.3287[/C][C]0.3056[/C][C]0.6796[/C][C]0.4019[/C][/ROW]
[ROW][C]90[/C][C]2.7[/C][C]2.2545[/C][C]1.2273[/C][C]5.425[/C][C]0.3915[/C][C]0.3006[/C][C]0.5625[/C][C]0.368[/C][/ROW]
[ROW][C]91[/C][C]2.2[/C][C]1.9527[/C][C]1.0565[/C][C]4.7597[/C][C]0.4314[/C][C]0.3009[/C][C]0.2323[/C][C]0.277[/C][/ROW]
[ROW][C]92[/C][C]2.2[/C][C]1.9332[/C][C]1.009[/C][C]5.0981[/C][C]0.4344[/C][C]0.4344[/C][C]0.235[/C][C]0.2957[/C][/ROW]
[ROW][C]93[/C][C]2.1[/C][C]1.9149[/C][C]0.9672[/C][C]5.4469[/C][C]0.4591[/C][C]0.4372[/C][C]0.2379[/C][C]0.3117[/C][/ROW]
[ROW][C]94[/C][C]2.3[/C][C]2.0195[/C][C]0.9713[/C][C]6.4843[/C][C]0.451[/C][C]0.4859[/C][C]0.3826[/C][C]0.3659[/C][/ROW]
[ROW][C]95[/C][C]2.5[/C][C]1.9957[/C][C]0.9339[/C][C]6.8906[/C][C]0.42[/C][C]0.4515[/C][C]0.3737[/C][C]0.3737[/C][/ROW]
[ROW][C]96[/C][C]2.3[/C][C]1.9527[/C][C]0.8938[/C][C]7.1685[/C][C]0.4481[/C][C]0.4185[/C][C]0.3469[/C][C]0.3751[/C][/ROW]
[ROW][C]97[/C][C]2.6[/C][C]1.9957[/C][C]0.8824[/C][C]8.1082[/C][C]0.4232[/C][C]0.4611[/C][C]0.3982[/C][C]0.3982[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32170&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32170&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[85])
731.3-------
741.3-------
751.4-------
761.2-------
771.7-------
782-------
793-------
803.1-------
813.2-------
822.7-------
832.8-------
843-------
852.8-------
863.12.76851.90384.39030.34440.48480.9620.4848
873.12.65951.67424.86110.34750.34750.86890.4502
883.22.89921.666.29830.43110.45390.83640.5228
893.12.41791.36095.43320.32870.30560.67960.4019
902.72.25451.22735.4250.39150.30060.56250.368
912.21.95271.05654.75970.43140.30090.23230.277
922.21.93321.0095.09810.43440.43440.2350.2957
932.11.91490.96725.44690.45910.43720.23790.3117
942.32.01950.97136.48430.4510.48590.38260.3659
952.51.99570.93396.89060.420.45150.37370.3737
962.31.95270.89387.16850.44810.41850.34690.3751
972.61.99570.88248.10820.42320.46110.39820.3982







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
860.29890.11970.010.10990.00920.0957
870.42240.16570.01380.19410.01620.1272
880.59820.10380.00860.09050.00750.0868
890.63630.28210.02350.46530.03880.1969
900.71750.19760.01650.19850.01650.1286
910.73340.12670.01060.06120.00510.0714
920.83530.1380.01150.07120.00590.077
930.9410.09660.00810.03420.00290.0534
941.1280.13890.01160.07870.00660.081
951.25140.25270.02110.25440.02120.1456
961.36280.17790.01480.12060.01010.1003
971.56270.30280.02520.36520.03040.1745

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
86 & 0.2989 & 0.1197 & 0.01 & 0.1099 & 0.0092 & 0.0957 \tabularnewline
87 & 0.4224 & 0.1657 & 0.0138 & 0.1941 & 0.0162 & 0.1272 \tabularnewline
88 & 0.5982 & 0.1038 & 0.0086 & 0.0905 & 0.0075 & 0.0868 \tabularnewline
89 & 0.6363 & 0.2821 & 0.0235 & 0.4653 & 0.0388 & 0.1969 \tabularnewline
90 & 0.7175 & 0.1976 & 0.0165 & 0.1985 & 0.0165 & 0.1286 \tabularnewline
91 & 0.7334 & 0.1267 & 0.0106 & 0.0612 & 0.0051 & 0.0714 \tabularnewline
92 & 0.8353 & 0.138 & 0.0115 & 0.0712 & 0.0059 & 0.077 \tabularnewline
93 & 0.941 & 0.0966 & 0.0081 & 0.0342 & 0.0029 & 0.0534 \tabularnewline
94 & 1.128 & 0.1389 & 0.0116 & 0.0787 & 0.0066 & 0.081 \tabularnewline
95 & 1.2514 & 0.2527 & 0.0211 & 0.2544 & 0.0212 & 0.1456 \tabularnewline
96 & 1.3628 & 0.1779 & 0.0148 & 0.1206 & 0.0101 & 0.1003 \tabularnewline
97 & 1.5627 & 0.3028 & 0.0252 & 0.3652 & 0.0304 & 0.1745 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32170&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]86[/C][C]0.2989[/C][C]0.1197[/C][C]0.01[/C][C]0.1099[/C][C]0.0092[/C][C]0.0957[/C][/ROW]
[ROW][C]87[/C][C]0.4224[/C][C]0.1657[/C][C]0.0138[/C][C]0.1941[/C][C]0.0162[/C][C]0.1272[/C][/ROW]
[ROW][C]88[/C][C]0.5982[/C][C]0.1038[/C][C]0.0086[/C][C]0.0905[/C][C]0.0075[/C][C]0.0868[/C][/ROW]
[ROW][C]89[/C][C]0.6363[/C][C]0.2821[/C][C]0.0235[/C][C]0.4653[/C][C]0.0388[/C][C]0.1969[/C][/ROW]
[ROW][C]90[/C][C]0.7175[/C][C]0.1976[/C][C]0.0165[/C][C]0.1985[/C][C]0.0165[/C][C]0.1286[/C][/ROW]
[ROW][C]91[/C][C]0.7334[/C][C]0.1267[/C][C]0.0106[/C][C]0.0612[/C][C]0.0051[/C][C]0.0714[/C][/ROW]
[ROW][C]92[/C][C]0.8353[/C][C]0.138[/C][C]0.0115[/C][C]0.0712[/C][C]0.0059[/C][C]0.077[/C][/ROW]
[ROW][C]93[/C][C]0.941[/C][C]0.0966[/C][C]0.0081[/C][C]0.0342[/C][C]0.0029[/C][C]0.0534[/C][/ROW]
[ROW][C]94[/C][C]1.128[/C][C]0.1389[/C][C]0.0116[/C][C]0.0787[/C][C]0.0066[/C][C]0.081[/C][/ROW]
[ROW][C]95[/C][C]1.2514[/C][C]0.2527[/C][C]0.0211[/C][C]0.2544[/C][C]0.0212[/C][C]0.1456[/C][/ROW]
[ROW][C]96[/C][C]1.3628[/C][C]0.1779[/C][C]0.0148[/C][C]0.1206[/C][C]0.0101[/C][C]0.1003[/C][/ROW]
[ROW][C]97[/C][C]1.5627[/C][C]0.3028[/C][C]0.0252[/C][C]0.3652[/C][C]0.0304[/C][C]0.1745[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32170&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32170&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
860.29890.11970.010.10990.00920.0957
870.42240.16570.01380.19410.01620.1272
880.59820.10380.00860.09050.00750.0868
890.63630.28210.02350.46530.03880.1969
900.71750.19760.01650.19850.01650.1286
910.73340.12670.01060.06120.00510.0714
920.83530.1380.01150.07120.00590.077
930.9410.09660.00810.03420.00290.0534
941.1280.13890.01160.07870.00660.081
951.25140.25270.02110.25440.02120.1456
961.36280.17790.01480.12060.01010.1003
971.56270.30280.02520.36520.03040.1745



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