Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 08 Dec 2007 05:11:45 -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/2007/Dec/08/t1197115118cvxniu1reuzh25d.htm/, Retrieved Sun, 28 Apr 2024 21:47:24 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2911, Retrieved Sun, 28 Apr 2024 21:47:24 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordss0650532
Estimated Impact258
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [voorspelling van ...] [2007-12-08 12:11:45] [246ad84e93fbdd1336f5cbee368cde93] [Current]
Feedback Forum

Post a new message
Dataseries X:
0,3
2,1
2,5
2,3
2,4
3
1,7
3,5
4
3,7
3,7
3
2,7
2,5
2,2
2,9
3,1
3
2,8
2,5
1,9
1,9
1,8
2
2,6
2,5
2,5
1,6
1,4
0,8
1,1
1,3
1,2
1,3
1,1
1,3
1,2
1,6
1,7
1,5
0,9
1,5
1,4
1,6
1,7
1,4
1,8
1,7
1,4
1,2
1
1,7
2,4
2
2,1
2
1,8
2,7
2,3
1,9
2
2,3
2,8
2,4
2,3
2,7
2,7
2,9
3
2,2
2,3
2,8




Summary of compuational 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 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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2911&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2911&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2911&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'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])
481.7-------
491.4-------
501.2-------
511-------
521.7-------
532.4-------
542-------
552.1-------
562-------
571.8-------
582.7-------
592.3-------
601.9-------
6122.1521.2843.020.36570.71530.95530.7153
622.32.1280.90043.35550.39180.5810.93080.6421
632.82.22740.7243.73080.22770.46230.94520.6652
642.41.81770.08173.55370.25550.13370.55290.463
652.31.5726-0.36833.51350.23130.20170.20170.3705
662.71.6069-0.51933.7330.15680.26140.35850.3935
672.71.5777-0.71883.87420.16910.16910.32790.3916
682.91.5657-0.88944.02080.14340.18260.36440.3948
6931.6651-0.93894.26910.15750.17630.45960.4298
702.21.156-1.58883.90090.2280.0940.13510.2976
712.31.2726-1.60634.15140.24210.26390.24210.3346
722.81.5948-1.4124.60170.21610.32290.42120.4212

\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 & 1.7 & - & - & - & - & - & - & - \tabularnewline
49 & 1.4 & - & - & - & - & - & - & - \tabularnewline
50 & 1.2 & - & - & - & - & - & - & - \tabularnewline
51 & 1 & - & - & - & - & - & - & - \tabularnewline
52 & 1.7 & - & - & - & - & - & - & - \tabularnewline
53 & 2.4 & - & - & - & - & - & - & - \tabularnewline
54 & 2 & - & - & - & - & - & - & - \tabularnewline
55 & 2.1 & - & - & - & - & - & - & - \tabularnewline
56 & 2 & - & - & - & - & - & - & - \tabularnewline
57 & 1.8 & - & - & - & - & - & - & - \tabularnewline
58 & 2.7 & - & - & - & - & - & - & - \tabularnewline
59 & 2.3 & - & - & - & - & - & - & - \tabularnewline
60 & 1.9 & - & - & - & - & - & - & - \tabularnewline
61 & 2 & 2.152 & 1.284 & 3.02 & 0.3657 & 0.7153 & 0.9553 & 0.7153 \tabularnewline
62 & 2.3 & 2.128 & 0.9004 & 3.3555 & 0.3918 & 0.581 & 0.9308 & 0.6421 \tabularnewline
63 & 2.8 & 2.2274 & 0.724 & 3.7308 & 0.2277 & 0.4623 & 0.9452 & 0.6652 \tabularnewline
64 & 2.4 & 1.8177 & 0.0817 & 3.5537 & 0.2555 & 0.1337 & 0.5529 & 0.463 \tabularnewline
65 & 2.3 & 1.5726 & -0.3683 & 3.5135 & 0.2313 & 0.2017 & 0.2017 & 0.3705 \tabularnewline
66 & 2.7 & 1.6069 & -0.5193 & 3.733 & 0.1568 & 0.2614 & 0.3585 & 0.3935 \tabularnewline
67 & 2.7 & 1.5777 & -0.7188 & 3.8742 & 0.1691 & 0.1691 & 0.3279 & 0.3916 \tabularnewline
68 & 2.9 & 1.5657 & -0.8894 & 4.0208 & 0.1434 & 0.1826 & 0.3644 & 0.3948 \tabularnewline
69 & 3 & 1.6651 & -0.9389 & 4.2691 & 0.1575 & 0.1763 & 0.4596 & 0.4298 \tabularnewline
70 & 2.2 & 1.156 & -1.5888 & 3.9009 & 0.228 & 0.094 & 0.1351 & 0.2976 \tabularnewline
71 & 2.3 & 1.2726 & -1.6063 & 4.1514 & 0.2421 & 0.2639 & 0.2421 & 0.3346 \tabularnewline
72 & 2.8 & 1.5948 & -1.412 & 4.6017 & 0.2161 & 0.3229 & 0.4212 & 0.4212 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2911&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]1.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]1.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]1.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]2.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]2.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]1.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]2.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]2.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]1.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]2[/C][C]2.152[/C][C]1.284[/C][C]3.02[/C][C]0.3657[/C][C]0.7153[/C][C]0.9553[/C][C]0.7153[/C][/ROW]
[ROW][C]62[/C][C]2.3[/C][C]2.128[/C][C]0.9004[/C][C]3.3555[/C][C]0.3918[/C][C]0.581[/C][C]0.9308[/C][C]0.6421[/C][/ROW]
[ROW][C]63[/C][C]2.8[/C][C]2.2274[/C][C]0.724[/C][C]3.7308[/C][C]0.2277[/C][C]0.4623[/C][C]0.9452[/C][C]0.6652[/C][/ROW]
[ROW][C]64[/C][C]2.4[/C][C]1.8177[/C][C]0.0817[/C][C]3.5537[/C][C]0.2555[/C][C]0.1337[/C][C]0.5529[/C][C]0.463[/C][/ROW]
[ROW][C]65[/C][C]2.3[/C][C]1.5726[/C][C]-0.3683[/C][C]3.5135[/C][C]0.2313[/C][C]0.2017[/C][C]0.2017[/C][C]0.3705[/C][/ROW]
[ROW][C]66[/C][C]2.7[/C][C]1.6069[/C][C]-0.5193[/C][C]3.733[/C][C]0.1568[/C][C]0.2614[/C][C]0.3585[/C][C]0.3935[/C][/ROW]
[ROW][C]67[/C][C]2.7[/C][C]1.5777[/C][C]-0.7188[/C][C]3.8742[/C][C]0.1691[/C][C]0.1691[/C][C]0.3279[/C][C]0.3916[/C][/ROW]
[ROW][C]68[/C][C]2.9[/C][C]1.5657[/C][C]-0.8894[/C][C]4.0208[/C][C]0.1434[/C][C]0.1826[/C][C]0.3644[/C][C]0.3948[/C][/ROW]
[ROW][C]69[/C][C]3[/C][C]1.6651[/C][C]-0.9389[/C][C]4.2691[/C][C]0.1575[/C][C]0.1763[/C][C]0.4596[/C][C]0.4298[/C][/ROW]
[ROW][C]70[/C][C]2.2[/C][C]1.156[/C][C]-1.5888[/C][C]3.9009[/C][C]0.228[/C][C]0.094[/C][C]0.1351[/C][C]0.2976[/C][/ROW]
[ROW][C]71[/C][C]2.3[/C][C]1.2726[/C][C]-1.6063[/C][C]4.1514[/C][C]0.2421[/C][C]0.2639[/C][C]0.2421[/C][C]0.3346[/C][/ROW]
[ROW][C]72[/C][C]2.8[/C][C]1.5948[/C][C]-1.412[/C][C]4.6017[/C][C]0.2161[/C][C]0.3229[/C][C]0.4212[/C][C]0.4212[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2911&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2911&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])
481.7-------
491.4-------
501.2-------
511-------
521.7-------
532.4-------
542-------
552.1-------
562-------
571.8-------
582.7-------
592.3-------
601.9-------
6122.1521.2843.020.36570.71530.95530.7153
622.32.1280.90043.35550.39180.5810.93080.6421
632.82.22740.7243.73080.22770.46230.94520.6652
642.41.81770.08173.55370.25550.13370.55290.463
652.31.5726-0.36833.51350.23130.20170.20170.3705
662.71.6069-0.51933.7330.15680.26140.35850.3935
672.71.5777-0.71883.87420.16910.16910.32790.3916
682.91.5657-0.88944.02080.14340.18260.36440.3948
6931.6651-0.93894.26910.15750.17630.45960.4298
702.21.156-1.58883.90090.2280.0940.13510.2976
712.31.2726-1.60634.15140.24210.26390.24210.3346
722.81.5948-1.4124.60170.21610.32290.42120.4212







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.2058-0.07060.00590.02310.00190.0439
620.29430.08080.00670.02960.00250.0497
630.34440.25710.02140.32790.02730.1653
640.48730.32030.02670.33910.02830.1681
650.62970.46250.03850.52910.04410.21
660.67510.68030.05671.1950.09960.3156
670.74260.71130.05931.25950.1050.324
680.80.85220.0711.78030.14840.3852
690.79790.80170.06681.78190.14850.3853
701.21140.90310.07531.08990.09080.3014
711.15420.80740.06731.05560.0880.2966
720.96190.75570.0631.45240.1210.3479

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.2058 & -0.0706 & 0.0059 & 0.0231 & 0.0019 & 0.0439 \tabularnewline
62 & 0.2943 & 0.0808 & 0.0067 & 0.0296 & 0.0025 & 0.0497 \tabularnewline
63 & 0.3444 & 0.2571 & 0.0214 & 0.3279 & 0.0273 & 0.1653 \tabularnewline
64 & 0.4873 & 0.3203 & 0.0267 & 0.3391 & 0.0283 & 0.1681 \tabularnewline
65 & 0.6297 & 0.4625 & 0.0385 & 0.5291 & 0.0441 & 0.21 \tabularnewline
66 & 0.6751 & 0.6803 & 0.0567 & 1.195 & 0.0996 & 0.3156 \tabularnewline
67 & 0.7426 & 0.7113 & 0.0593 & 1.2595 & 0.105 & 0.324 \tabularnewline
68 & 0.8 & 0.8522 & 0.071 & 1.7803 & 0.1484 & 0.3852 \tabularnewline
69 & 0.7979 & 0.8017 & 0.0668 & 1.7819 & 0.1485 & 0.3853 \tabularnewline
70 & 1.2114 & 0.9031 & 0.0753 & 1.0899 & 0.0908 & 0.3014 \tabularnewline
71 & 1.1542 & 0.8074 & 0.0673 & 1.0556 & 0.088 & 0.2966 \tabularnewline
72 & 0.9619 & 0.7557 & 0.063 & 1.4524 & 0.121 & 0.3479 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2911&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.2058[/C][C]-0.0706[/C][C]0.0059[/C][C]0.0231[/C][C]0.0019[/C][C]0.0439[/C][/ROW]
[ROW][C]62[/C][C]0.2943[/C][C]0.0808[/C][C]0.0067[/C][C]0.0296[/C][C]0.0025[/C][C]0.0497[/C][/ROW]
[ROW][C]63[/C][C]0.3444[/C][C]0.2571[/C][C]0.0214[/C][C]0.3279[/C][C]0.0273[/C][C]0.1653[/C][/ROW]
[ROW][C]64[/C][C]0.4873[/C][C]0.3203[/C][C]0.0267[/C][C]0.3391[/C][C]0.0283[/C][C]0.1681[/C][/ROW]
[ROW][C]65[/C][C]0.6297[/C][C]0.4625[/C][C]0.0385[/C][C]0.5291[/C][C]0.0441[/C][C]0.21[/C][/ROW]
[ROW][C]66[/C][C]0.6751[/C][C]0.6803[/C][C]0.0567[/C][C]1.195[/C][C]0.0996[/C][C]0.3156[/C][/ROW]
[ROW][C]67[/C][C]0.7426[/C][C]0.7113[/C][C]0.0593[/C][C]1.2595[/C][C]0.105[/C][C]0.324[/C][/ROW]
[ROW][C]68[/C][C]0.8[/C][C]0.8522[/C][C]0.071[/C][C]1.7803[/C][C]0.1484[/C][C]0.3852[/C][/ROW]
[ROW][C]69[/C][C]0.7979[/C][C]0.8017[/C][C]0.0668[/C][C]1.7819[/C][C]0.1485[/C][C]0.3853[/C][/ROW]
[ROW][C]70[/C][C]1.2114[/C][C]0.9031[/C][C]0.0753[/C][C]1.0899[/C][C]0.0908[/C][C]0.3014[/C][/ROW]
[ROW][C]71[/C][C]1.1542[/C][C]0.8074[/C][C]0.0673[/C][C]1.0556[/C][C]0.088[/C][C]0.2966[/C][/ROW]
[ROW][C]72[/C][C]0.9619[/C][C]0.7557[/C][C]0.063[/C][C]1.4524[/C][C]0.121[/C][C]0.3479[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2911&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2911&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.2058-0.07060.00590.02310.00190.0439
620.29430.08080.00670.02960.00250.0497
630.34440.25710.02140.32790.02730.1653
640.48730.32030.02670.33910.02830.1681
650.62970.46250.03850.52910.04410.21
660.67510.68030.05671.1950.09960.3156
670.74260.71130.05931.25950.1050.324
680.80.85220.0711.78030.14840.3852
690.79790.80170.06681.78190.14850.3853
701.21140.90310.07531.08990.09080.3014
711.15420.80740.06731.05560.0880.2966
720.96190.75570.0631.45240.1210.3479



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