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 computationTue, 07 Dec 2010 15:02:49 +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/07/t1291734075jwic1an4akdfku1.htm/, Retrieved Fri, 03 May 2024 17:27:10 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106391, Retrieved Fri, 03 May 2024 17:27:10 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact117
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD        [ARIMA Forecasting] [] [2010-12-07 15:02:49] [6c31f786e793d35ef3a03978bc5de774] [Current]
-               [ARIMA Forecasting] [] [2010-12-07 15:19:10] [dd4fe494cff2ee46c12b15bdc7b848ca]
-   PD            [ARIMA Forecasting] [] [2010-12-22 16:09:24] [dd4fe494cff2ee46c12b15bdc7b848ca]
-   PD            [ARIMA Forecasting] [] [2010-12-22 16:14:39] [dd4fe494cff2ee46c12b15bdc7b848ca]
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 time3 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106391&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106391&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106391&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'George Udny Yule' @ 72.249.76.132







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-------
613951.699935.020671.61750.10570.26760.2070.2676
624950.548234.066770.27110.43890.87440.2940.2295
635863.901745.16185.8870.29940.9080.70060.7006
644749.322333.047668.84450.40780.19180.47290.1918
654249.506233.191269.07190.2260.59910.44050.1974
666257.611339.875778.60070.3410.92760.66660.4855
673936.989223.095454.13980.40910.00210.49950.0082
684027.112415.446942.03790.04530.05930.7490
697253.160936.166273.41860.03420.89860.42940.3198
707061.0242.68882.61820.20760.15950.20760.608
715447.046331.141966.21990.23860.00950.06320.1314
726553.742136.623974.13280.13960.49010.34120.3412

\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 & 51.6999 & 35.0206 & 71.6175 & 0.1057 & 0.2676 & 0.207 & 0.2676 \tabularnewline
62 & 49 & 50.5482 & 34.0667 & 70.2711 & 0.4389 & 0.8744 & 0.294 & 0.2295 \tabularnewline
63 & 58 & 63.9017 & 45.161 & 85.887 & 0.2994 & 0.908 & 0.7006 & 0.7006 \tabularnewline
64 & 47 & 49.3223 & 33.0476 & 68.8445 & 0.4078 & 0.1918 & 0.4729 & 0.1918 \tabularnewline
65 & 42 & 49.5062 & 33.1912 & 69.0719 & 0.226 & 0.5991 & 0.4405 & 0.1974 \tabularnewline
66 & 62 & 57.6113 & 39.8757 & 78.6007 & 0.341 & 0.9276 & 0.6666 & 0.4855 \tabularnewline
67 & 39 & 36.9892 & 23.0954 & 54.1398 & 0.4091 & 0.0021 & 0.4995 & 0.0082 \tabularnewline
68 & 40 & 27.1124 & 15.4469 & 42.0379 & 0.0453 & 0.0593 & 0.749 & 0 \tabularnewline
69 & 72 & 53.1609 & 36.1662 & 73.4186 & 0.0342 & 0.8986 & 0.4294 & 0.3198 \tabularnewline
70 & 70 & 61.02 & 42.688 & 82.6182 & 0.2076 & 0.1595 & 0.2076 & 0.608 \tabularnewline
71 & 54 & 47.0463 & 31.1419 & 66.2199 & 0.2386 & 0.0095 & 0.0632 & 0.1314 \tabularnewline
72 & 65 & 53.7421 & 36.6239 & 74.1328 & 0.1396 & 0.4901 & 0.3412 & 0.3412 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106391&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]51.6999[/C][C]35.0206[/C][C]71.6175[/C][C]0.1057[/C][C]0.2676[/C][C]0.207[/C][C]0.2676[/C][/ROW]
[ROW][C]62[/C][C]49[/C][C]50.5482[/C][C]34.0667[/C][C]70.2711[/C][C]0.4389[/C][C]0.8744[/C][C]0.294[/C][C]0.2295[/C][/ROW]
[ROW][C]63[/C][C]58[/C][C]63.9017[/C][C]45.161[/C][C]85.887[/C][C]0.2994[/C][C]0.908[/C][C]0.7006[/C][C]0.7006[/C][/ROW]
[ROW][C]64[/C][C]47[/C][C]49.3223[/C][C]33.0476[/C][C]68.8445[/C][C]0.4078[/C][C]0.1918[/C][C]0.4729[/C][C]0.1918[/C][/ROW]
[ROW][C]65[/C][C]42[/C][C]49.5062[/C][C]33.1912[/C][C]69.0719[/C][C]0.226[/C][C]0.5991[/C][C]0.4405[/C][C]0.1974[/C][/ROW]
[ROW][C]66[/C][C]62[/C][C]57.6113[/C][C]39.8757[/C][C]78.6007[/C][C]0.341[/C][C]0.9276[/C][C]0.6666[/C][C]0.4855[/C][/ROW]
[ROW][C]67[/C][C]39[/C][C]36.9892[/C][C]23.0954[/C][C]54.1398[/C][C]0.4091[/C][C]0.0021[/C][C]0.4995[/C][C]0.0082[/C][/ROW]
[ROW][C]68[/C][C]40[/C][C]27.1124[/C][C]15.4469[/C][C]42.0379[/C][C]0.0453[/C][C]0.0593[/C][C]0.749[/C][C]0[/C][/ROW]
[ROW][C]69[/C][C]72[/C][C]53.1609[/C][C]36.1662[/C][C]73.4186[/C][C]0.0342[/C][C]0.8986[/C][C]0.4294[/C][C]0.3198[/C][/ROW]
[ROW][C]70[/C][C]70[/C][C]61.02[/C][C]42.688[/C][C]82.6182[/C][C]0.2076[/C][C]0.1595[/C][C]0.2076[/C][C]0.608[/C][/ROW]
[ROW][C]71[/C][C]54[/C][C]47.0463[/C][C]31.1419[/C][C]66.2199[/C][C]0.2386[/C][C]0.0095[/C][C]0.0632[/C][C]0.1314[/C][/ROW]
[ROW][C]72[/C][C]65[/C][C]53.7421[/C][C]36.6239[/C][C]74.1328[/C][C]0.1396[/C][C]0.4901[/C][C]0.3412[/C][C]0.3412[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106391&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106391&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-------
613951.699935.020671.61750.10570.26760.2070.2676
624950.548234.066770.27110.43890.87440.2940.2295
635863.901745.16185.8870.29940.9080.70060.7006
644749.322333.047668.84450.40780.19180.47290.1918
654249.506233.191269.07190.2260.59910.44050.1974
666257.611339.875778.60070.3410.92760.66660.4855
673936.989223.095454.13980.40910.00210.49950.0082
684027.112415.446942.03790.04530.05930.7490
697253.160936.166273.41860.03420.89860.42940.3198
707061.0242.68882.61820.20760.15950.20760.608
715447.046331.141966.21990.23860.00950.06320.1314
726553.742136.623974.13280.13960.49010.34120.3412







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.1966-0.24560161.287800
620.1991-0.03060.13812.39781.84249.0467
630.1755-0.09240.122934.830666.17188.1346
640.2019-0.04710.10395.39350.97717.1398
650.2016-0.15160.113556.343752.05047.2146
660.18590.07620.107319.260546.58546.8254
670.23660.05440.09974.043540.5086.3646
680.28090.47530.1467166.089856.20577.497
690.19440.35440.1697354.912489.39549.4549
700.18060.14720.167580.6488.51989.4085
710.20790.14780.165748.354684.86849.2124
720.19360.20950.1693126.739688.35779.3999

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.1966 & -0.2456 & 0 & 161.2878 & 0 & 0 \tabularnewline
62 & 0.1991 & -0.0306 & 0.1381 & 2.397 & 81.8424 & 9.0467 \tabularnewline
63 & 0.1755 & -0.0924 & 0.1229 & 34.8306 & 66.1718 & 8.1346 \tabularnewline
64 & 0.2019 & -0.0471 & 0.1039 & 5.393 & 50.9771 & 7.1398 \tabularnewline
65 & 0.2016 & -0.1516 & 0.1135 & 56.3437 & 52.0504 & 7.2146 \tabularnewline
66 & 0.1859 & 0.0762 & 0.1073 & 19.2605 & 46.5854 & 6.8254 \tabularnewline
67 & 0.2366 & 0.0544 & 0.0997 & 4.0435 & 40.508 & 6.3646 \tabularnewline
68 & 0.2809 & 0.4753 & 0.1467 & 166.0898 & 56.2057 & 7.497 \tabularnewline
69 & 0.1944 & 0.3544 & 0.1697 & 354.9124 & 89.3954 & 9.4549 \tabularnewline
70 & 0.1806 & 0.1472 & 0.1675 & 80.64 & 88.5198 & 9.4085 \tabularnewline
71 & 0.2079 & 0.1478 & 0.1657 & 48.3546 & 84.8684 & 9.2124 \tabularnewline
72 & 0.1936 & 0.2095 & 0.1693 & 126.7396 & 88.3577 & 9.3999 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106391&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.1966[/C][C]-0.2456[/C][C]0[/C][C]161.2878[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.1991[/C][C]-0.0306[/C][C]0.1381[/C][C]2.397[/C][C]81.8424[/C][C]9.0467[/C][/ROW]
[ROW][C]63[/C][C]0.1755[/C][C]-0.0924[/C][C]0.1229[/C][C]34.8306[/C][C]66.1718[/C][C]8.1346[/C][/ROW]
[ROW][C]64[/C][C]0.2019[/C][C]-0.0471[/C][C]0.1039[/C][C]5.393[/C][C]50.9771[/C][C]7.1398[/C][/ROW]
[ROW][C]65[/C][C]0.2016[/C][C]-0.1516[/C][C]0.1135[/C][C]56.3437[/C][C]52.0504[/C][C]7.2146[/C][/ROW]
[ROW][C]66[/C][C]0.1859[/C][C]0.0762[/C][C]0.1073[/C][C]19.2605[/C][C]46.5854[/C][C]6.8254[/C][/ROW]
[ROW][C]67[/C][C]0.2366[/C][C]0.0544[/C][C]0.0997[/C][C]4.0435[/C][C]40.508[/C][C]6.3646[/C][/ROW]
[ROW][C]68[/C][C]0.2809[/C][C]0.4753[/C][C]0.1467[/C][C]166.0898[/C][C]56.2057[/C][C]7.497[/C][/ROW]
[ROW][C]69[/C][C]0.1944[/C][C]0.3544[/C][C]0.1697[/C][C]354.9124[/C][C]89.3954[/C][C]9.4549[/C][/ROW]
[ROW][C]70[/C][C]0.1806[/C][C]0.1472[/C][C]0.1675[/C][C]80.64[/C][C]88.5198[/C][C]9.4085[/C][/ROW]
[ROW][C]71[/C][C]0.2079[/C][C]0.1478[/C][C]0.1657[/C][C]48.3546[/C][C]84.8684[/C][C]9.2124[/C][/ROW]
[ROW][C]72[/C][C]0.1936[/C][C]0.2095[/C][C]0.1693[/C][C]126.7396[/C][C]88.3577[/C][C]9.3999[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106391&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106391&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.1966-0.24560161.287800
620.1991-0.03060.13812.39781.84249.0467
630.1755-0.09240.122934.830666.17188.1346
640.2019-0.04710.10395.39350.97717.1398
650.2016-0.15160.113556.343752.05047.2146
660.18590.07620.107319.260546.58546.8254
670.23660.05440.09974.043540.5086.3646
680.28090.47530.1467166.089856.20577.497
690.19440.35440.1697354.912489.39549.4549
700.18060.14720.167580.6488.51989.4085
710.20790.14780.165748.354684.86849.2124
720.19360.20950.1693126.739688.35779.3999



Parameters (Session):
par1 = 48 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ;
Parameters (R input):
par1 = 12 ; par2 = 0.5 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; 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')