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 computationWed, 22 Dec 2010 15:29:06 +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/22/t1293031679rfnuo4w8l6h8epc.htm/, Retrieved Sun, 05 May 2024 22:37:42 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114307, Retrieved Sun, 05 May 2024 22:37:42 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact114
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2010-12-22 15:29:06] [5a59313293e5c9f616ad36f6edd018c5] [Current]
-   P     [ARIMA Forecasting] [] [2010-12-22 19:40:54] [afd301b68d203992295e6972aed62880]
Feedback Forum

Post a new message
Dataseries X:
9.769
9.321
9.939
9.336
10.195
9.464
10.010
10.213
9.563
9.890
9.305
9.391
9.928
8.686
9.843
9.627
10.074
9.503
10.119
10.000
9.313
9.866
9.172
9.241
9.659
8.904
9.755
9.080
9.435
8.971
10.063
9.793
9.454
9.759
8.820
9.403
9.676
8.642
9.402
9.610
9.294
9.448
10.319
9.548
9.801
9.596
8.923
9.746
9.829
9.125
9.782
9.441
9.162
9.915
10.444
10.209
9.985
9.842
9.429
10.132
9.849
9.172
10.313
9.819
9.955
10.048
10.082
10.541
10.208
10.233
9.439
9.963
10.158
9.225
10.474
9.757
10.490
10.281
10.444
10.640
10.695
10.786
9.832
9.747
10.411
9.511
10.402
9.701
10.540
10.112
10.915
11.183
10.384
10.834
9.886
10.216




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 3 seconds \tabularnewline
R Server & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114307&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114307&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114307&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 time3 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk







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[84])
729.963-------
7310.158-------
749.225-------
7510.474-------
769.757-------
7710.49-------
7810.281-------
7910.444-------
8010.64-------
8110.695-------
8210.786-------
839.832-------
849.747-------
8510.41110.34779.790310.9650.42040.97180.72650.9718
869.5119.42838.94979.95520.37921e-040.77530.1179
8710.40210.55489.964411.21140.32410.99910.59530.9921
889.7019.94699.409310.54240.20920.06710.7340.7447
8910.5410.50079.903311.16620.45390.99070.51250.9868
9010.11210.28029.699210.9270.30510.21550.4990.9469
9110.91510.663610.038311.36270.24040.9390.73090.9949
9211.18310.733110.095111.44760.10860.30890.60080.9966
9310.38410.589.952711.28220.29220.04620.37410.99
9410.83410.71210.065811.43690.37070.81240.42070.9955
959.8869.83529.274810.45960.43669e-040.5040.609
9610.2169.97499.396310.6210.23220.60630.75530.7553

\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[84]) \tabularnewline
72 & 9.963 & - & - & - & - & - & - & - \tabularnewline
73 & 10.158 & - & - & - & - & - & - & - \tabularnewline
74 & 9.225 & - & - & - & - & - & - & - \tabularnewline
75 & 10.474 & - & - & - & - & - & - & - \tabularnewline
76 & 9.757 & - & - & - & - & - & - & - \tabularnewline
77 & 10.49 & - & - & - & - & - & - & - \tabularnewline
78 & 10.281 & - & - & - & - & - & - & - \tabularnewline
79 & 10.444 & - & - & - & - & - & - & - \tabularnewline
80 & 10.64 & - & - & - & - & - & - & - \tabularnewline
81 & 10.695 & - & - & - & - & - & - & - \tabularnewline
82 & 10.786 & - & - & - & - & - & - & - \tabularnewline
83 & 9.832 & - & - & - & - & - & - & - \tabularnewline
84 & 9.747 & - & - & - & - & - & - & - \tabularnewline
85 & 10.411 & 10.3477 & 9.7903 & 10.965 & 0.4204 & 0.9718 & 0.7265 & 0.9718 \tabularnewline
86 & 9.511 & 9.4283 & 8.9497 & 9.9552 & 0.3792 & 1e-04 & 0.7753 & 0.1179 \tabularnewline
87 & 10.402 & 10.5548 & 9.9644 & 11.2114 & 0.3241 & 0.9991 & 0.5953 & 0.9921 \tabularnewline
88 & 9.701 & 9.9469 & 9.4093 & 10.5424 & 0.2092 & 0.0671 & 0.734 & 0.7447 \tabularnewline
89 & 10.54 & 10.5007 & 9.9033 & 11.1662 & 0.4539 & 0.9907 & 0.5125 & 0.9868 \tabularnewline
90 & 10.112 & 10.2802 & 9.6992 & 10.927 & 0.3051 & 0.2155 & 0.499 & 0.9469 \tabularnewline
91 & 10.915 & 10.6636 & 10.0383 & 11.3627 & 0.2404 & 0.939 & 0.7309 & 0.9949 \tabularnewline
92 & 11.183 & 10.7331 & 10.0951 & 11.4476 & 0.1086 & 0.3089 & 0.6008 & 0.9966 \tabularnewline
93 & 10.384 & 10.58 & 9.9527 & 11.2822 & 0.2922 & 0.0462 & 0.3741 & 0.99 \tabularnewline
94 & 10.834 & 10.712 & 10.0658 & 11.4369 & 0.3707 & 0.8124 & 0.4207 & 0.9955 \tabularnewline
95 & 9.886 & 9.8352 & 9.2748 & 10.4596 & 0.4366 & 9e-04 & 0.504 & 0.609 \tabularnewline
96 & 10.216 & 9.9749 & 9.3963 & 10.621 & 0.2322 & 0.6063 & 0.7553 & 0.7553 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114307&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[84])[/C][/ROW]
[ROW][C]72[/C][C]9.963[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]10.158[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]9.225[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]10.474[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]9.757[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]10.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]10.281[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]10.444[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]10.64[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]10.695[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]10.786[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]9.832[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]9.747[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]10.411[/C][C]10.3477[/C][C]9.7903[/C][C]10.965[/C][C]0.4204[/C][C]0.9718[/C][C]0.7265[/C][C]0.9718[/C][/ROW]
[ROW][C]86[/C][C]9.511[/C][C]9.4283[/C][C]8.9497[/C][C]9.9552[/C][C]0.3792[/C][C]1e-04[/C][C]0.7753[/C][C]0.1179[/C][/ROW]
[ROW][C]87[/C][C]10.402[/C][C]10.5548[/C][C]9.9644[/C][C]11.2114[/C][C]0.3241[/C][C]0.9991[/C][C]0.5953[/C][C]0.9921[/C][/ROW]
[ROW][C]88[/C][C]9.701[/C][C]9.9469[/C][C]9.4093[/C][C]10.5424[/C][C]0.2092[/C][C]0.0671[/C][C]0.734[/C][C]0.7447[/C][/ROW]
[ROW][C]89[/C][C]10.54[/C][C]10.5007[/C][C]9.9033[/C][C]11.1662[/C][C]0.4539[/C][C]0.9907[/C][C]0.5125[/C][C]0.9868[/C][/ROW]
[ROW][C]90[/C][C]10.112[/C][C]10.2802[/C][C]9.6992[/C][C]10.927[/C][C]0.3051[/C][C]0.2155[/C][C]0.499[/C][C]0.9469[/C][/ROW]
[ROW][C]91[/C][C]10.915[/C][C]10.6636[/C][C]10.0383[/C][C]11.3627[/C][C]0.2404[/C][C]0.939[/C][C]0.7309[/C][C]0.9949[/C][/ROW]
[ROW][C]92[/C][C]11.183[/C][C]10.7331[/C][C]10.0951[/C][C]11.4476[/C][C]0.1086[/C][C]0.3089[/C][C]0.6008[/C][C]0.9966[/C][/ROW]
[ROW][C]93[/C][C]10.384[/C][C]10.58[/C][C]9.9527[/C][C]11.2822[/C][C]0.2922[/C][C]0.0462[/C][C]0.3741[/C][C]0.99[/C][/ROW]
[ROW][C]94[/C][C]10.834[/C][C]10.712[/C][C]10.0658[/C][C]11.4369[/C][C]0.3707[/C][C]0.8124[/C][C]0.4207[/C][C]0.9955[/C][/ROW]
[ROW][C]95[/C][C]9.886[/C][C]9.8352[/C][C]9.2748[/C][C]10.4596[/C][C]0.4366[/C][C]9e-04[/C][C]0.504[/C][C]0.609[/C][/ROW]
[ROW][C]96[/C][C]10.216[/C][C]9.9749[/C][C]9.3963[/C][C]10.621[/C][C]0.2322[/C][C]0.6063[/C][C]0.7553[/C][C]0.7553[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114307&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114307&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[84])
729.963-------
7310.158-------
749.225-------
7510.474-------
769.757-------
7710.49-------
7810.281-------
7910.444-------
8010.64-------
8110.695-------
8210.786-------
839.832-------
849.747-------
8510.41110.34779.790310.9650.42040.97180.72650.9718
869.5119.42838.94979.95520.37921e-040.77530.1179
8710.40210.55489.964411.21140.32410.99910.59530.9921
889.7019.94699.409310.54240.20920.06710.7340.7447
8910.5410.50079.903311.16620.45390.99070.51250.9868
9010.11210.28029.699210.9270.30510.21550.4990.9469
9110.91510.663610.038311.36270.24040.9390.73090.9949
9211.18310.733110.095111.44760.10860.30890.60080.9966
9310.38410.589.952711.28220.29220.04620.37410.99
9410.83410.71210.065811.43690.37070.81240.42070.9955
959.8869.83529.274810.45960.43669e-040.5040.609
9610.2169.97499.396310.6210.23220.60630.75530.7553







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
850.03040.006100.00400
860.02850.00880.00740.00680.00540.0736
870.0317-0.01450.00980.02340.01140.1068
880.0305-0.02470.01350.06040.02370.1538
890.03230.00370.01160.00150.01920.1387
900.0321-0.01640.01240.02830.02070.144
910.03340.02360.0140.06320.02680.1637
920.0340.04190.01750.20240.04880.2208
930.0339-0.01850.01760.03840.04760.2182
940.03450.01140.0170.01490.04430.2106
950.03240.00520.01590.00260.04050.2013
960.0330.02420.01660.05810.0420.205

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & 0.0304 & 0.0061 & 0 & 0.004 & 0 & 0 \tabularnewline
86 & 0.0285 & 0.0088 & 0.0074 & 0.0068 & 0.0054 & 0.0736 \tabularnewline
87 & 0.0317 & -0.0145 & 0.0098 & 0.0234 & 0.0114 & 0.1068 \tabularnewline
88 & 0.0305 & -0.0247 & 0.0135 & 0.0604 & 0.0237 & 0.1538 \tabularnewline
89 & 0.0323 & 0.0037 & 0.0116 & 0.0015 & 0.0192 & 0.1387 \tabularnewline
90 & 0.0321 & -0.0164 & 0.0124 & 0.0283 & 0.0207 & 0.144 \tabularnewline
91 & 0.0334 & 0.0236 & 0.014 & 0.0632 & 0.0268 & 0.1637 \tabularnewline
92 & 0.034 & 0.0419 & 0.0175 & 0.2024 & 0.0488 & 0.2208 \tabularnewline
93 & 0.0339 & -0.0185 & 0.0176 & 0.0384 & 0.0476 & 0.2182 \tabularnewline
94 & 0.0345 & 0.0114 & 0.017 & 0.0149 & 0.0443 & 0.2106 \tabularnewline
95 & 0.0324 & 0.0052 & 0.0159 & 0.0026 & 0.0405 & 0.2013 \tabularnewline
96 & 0.033 & 0.0242 & 0.0166 & 0.0581 & 0.042 & 0.205 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114307&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]85[/C][C]0.0304[/C][C]0.0061[/C][C]0[/C][C]0.004[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]86[/C][C]0.0285[/C][C]0.0088[/C][C]0.0074[/C][C]0.0068[/C][C]0.0054[/C][C]0.0736[/C][/ROW]
[ROW][C]87[/C][C]0.0317[/C][C]-0.0145[/C][C]0.0098[/C][C]0.0234[/C][C]0.0114[/C][C]0.1068[/C][/ROW]
[ROW][C]88[/C][C]0.0305[/C][C]-0.0247[/C][C]0.0135[/C][C]0.0604[/C][C]0.0237[/C][C]0.1538[/C][/ROW]
[ROW][C]89[/C][C]0.0323[/C][C]0.0037[/C][C]0.0116[/C][C]0.0015[/C][C]0.0192[/C][C]0.1387[/C][/ROW]
[ROW][C]90[/C][C]0.0321[/C][C]-0.0164[/C][C]0.0124[/C][C]0.0283[/C][C]0.0207[/C][C]0.144[/C][/ROW]
[ROW][C]91[/C][C]0.0334[/C][C]0.0236[/C][C]0.014[/C][C]0.0632[/C][C]0.0268[/C][C]0.1637[/C][/ROW]
[ROW][C]92[/C][C]0.034[/C][C]0.0419[/C][C]0.0175[/C][C]0.2024[/C][C]0.0488[/C][C]0.2208[/C][/ROW]
[ROW][C]93[/C][C]0.0339[/C][C]-0.0185[/C][C]0.0176[/C][C]0.0384[/C][C]0.0476[/C][C]0.2182[/C][/ROW]
[ROW][C]94[/C][C]0.0345[/C][C]0.0114[/C][C]0.017[/C][C]0.0149[/C][C]0.0443[/C][C]0.2106[/C][/ROW]
[ROW][C]95[/C][C]0.0324[/C][C]0.0052[/C][C]0.0159[/C][C]0.0026[/C][C]0.0405[/C][C]0.2013[/C][/ROW]
[ROW][C]96[/C][C]0.033[/C][C]0.0242[/C][C]0.0166[/C][C]0.0581[/C][C]0.042[/C][C]0.205[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114307&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114307&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
850.03040.006100.00400
860.02850.00880.00740.00680.00540.0736
870.0317-0.01450.00980.02340.01140.1068
880.0305-0.02470.01350.06040.02370.1538
890.03230.00370.01160.00150.01920.1387
900.0321-0.01640.01240.02830.02070.144
910.03340.02360.0140.06320.02680.1637
920.0340.04190.01750.20240.04880.2208
930.0339-0.01850.01760.03840.04760.2182
940.03450.01140.0170.01490.04430.2106
950.03240.00520.01590.00260.04050.2013
960.0330.02420.01660.05810.0420.205



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