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 computationFri, 10 Dec 2010 13:19:57 +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/10/t1291987135xmqbqmfzqrz7vna.htm/, Retrieved Mon, 29 Apr 2024 16:16:46 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=107660, Retrieved Mon, 29 Apr 2024 16:16:46 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact166
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Standard Deviation-Mean Plot] [workshop 9: SMP] [2010-12-04 15:56:47] [87d60b8864dc39f7ed759c345edfb471]
- RMP   [ARIMA Backward Selection] [workshop 9: Arima...] [2010-12-04 16:32:57] [87d60b8864dc39f7ed759c345edfb471]
- RMP     [ARIMA Forecasting] [workshop 9: arima...] [2010-12-04 16:48:19] [87d60b8864dc39f7ed759c345edfb471]
-    D      [ARIMA Forecasting] [] [2010-12-07 08:57:53] [1251ac2db27b84d4a3ba43449388906b]
-   P           [ARIMA Forecasting] [WS9 review verbet...] [2010-12-10 13:19:57] [67e3c2d70de1dbb070b545ca6c893d5e] [Current]
Feedback Forum

Post a new message
Dataseries X:
45
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 time1 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 & 1 seconds \tabularnewline
R Server & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107660&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]1 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=107660&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107660&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 time1 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[60])
4869-------
4960-------
5056-------
5158-------
5250-------
5351-------
5453-------
5537-------
5622-------
5755-------
5870-------
5962-------
6058-------
613952.800135.529870.07030.05870.27750.20690.2775
624952.435.129769.67030.34980.93580.34140.2625
635865.799948.529783.07020.1880.97170.8120.812
644750.833.529768.07030.33310.20690.53620.2069
654251.233.929768.47020.14820.68320.50910.2201
666259.241.929776.47020.37530.97450.75920.5542
673938.799921.529756.07020.49090.00420.58090.0147
684028.411.129745.67020.0940.11450.76624e-04
697254.837.529772.07020.02550.95350.49090.3582
707062.645.329779.87030.20050.1430.20050.6992
715448.431.129865.67030.26250.00710.06140.138
726555.438.129872.67030.1380.56310.3840.384

\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 & 52.8001 & 35.5298 & 70.0703 & 0.0587 & 0.2775 & 0.2069 & 0.2775 \tabularnewline
62 & 49 & 52.4 & 35.1297 & 69.6703 & 0.3498 & 0.9358 & 0.3414 & 0.2625 \tabularnewline
63 & 58 & 65.7999 & 48.5297 & 83.0702 & 0.188 & 0.9717 & 0.812 & 0.812 \tabularnewline
64 & 47 & 50.8 & 33.5297 & 68.0703 & 0.3331 & 0.2069 & 0.5362 & 0.2069 \tabularnewline
65 & 42 & 51.2 & 33.9297 & 68.4702 & 0.1482 & 0.6832 & 0.5091 & 0.2201 \tabularnewline
66 & 62 & 59.2 & 41.9297 & 76.4702 & 0.3753 & 0.9745 & 0.7592 & 0.5542 \tabularnewline
67 & 39 & 38.7999 & 21.5297 & 56.0702 & 0.4909 & 0.0042 & 0.5809 & 0.0147 \tabularnewline
68 & 40 & 28.4 & 11.1297 & 45.6702 & 0.094 & 0.1145 & 0.7662 & 4e-04 \tabularnewline
69 & 72 & 54.8 & 37.5297 & 72.0702 & 0.0255 & 0.9535 & 0.4909 & 0.3582 \tabularnewline
70 & 70 & 62.6 & 45.3297 & 79.8703 & 0.2005 & 0.143 & 0.2005 & 0.6992 \tabularnewline
71 & 54 & 48.4 & 31.1298 & 65.6703 & 0.2625 & 0.0071 & 0.0614 & 0.138 \tabularnewline
72 & 65 & 55.4 & 38.1298 & 72.6703 & 0.138 & 0.5631 & 0.384 & 0.384 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107660&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]52.8001[/C][C]35.5298[/C][C]70.0703[/C][C]0.0587[/C][C]0.2775[/C][C]0.2069[/C][C]0.2775[/C][/ROW]
[ROW][C]62[/C][C]49[/C][C]52.4[/C][C]35.1297[/C][C]69.6703[/C][C]0.3498[/C][C]0.9358[/C][C]0.3414[/C][C]0.2625[/C][/ROW]
[ROW][C]63[/C][C]58[/C][C]65.7999[/C][C]48.5297[/C][C]83.0702[/C][C]0.188[/C][C]0.9717[/C][C]0.812[/C][C]0.812[/C][/ROW]
[ROW][C]64[/C][C]47[/C][C]50.8[/C][C]33.5297[/C][C]68.0703[/C][C]0.3331[/C][C]0.2069[/C][C]0.5362[/C][C]0.2069[/C][/ROW]
[ROW][C]65[/C][C]42[/C][C]51.2[/C][C]33.9297[/C][C]68.4702[/C][C]0.1482[/C][C]0.6832[/C][C]0.5091[/C][C]0.2201[/C][/ROW]
[ROW][C]66[/C][C]62[/C][C]59.2[/C][C]41.9297[/C][C]76.4702[/C][C]0.3753[/C][C]0.9745[/C][C]0.7592[/C][C]0.5542[/C][/ROW]
[ROW][C]67[/C][C]39[/C][C]38.7999[/C][C]21.5297[/C][C]56.0702[/C][C]0.4909[/C][C]0.0042[/C][C]0.5809[/C][C]0.0147[/C][/ROW]
[ROW][C]68[/C][C]40[/C][C]28.4[/C][C]11.1297[/C][C]45.6702[/C][C]0.094[/C][C]0.1145[/C][C]0.7662[/C][C]4e-04[/C][/ROW]
[ROW][C]69[/C][C]72[/C][C]54.8[/C][C]37.5297[/C][C]72.0702[/C][C]0.0255[/C][C]0.9535[/C][C]0.4909[/C][C]0.3582[/C][/ROW]
[ROW][C]70[/C][C]70[/C][C]62.6[/C][C]45.3297[/C][C]79.8703[/C][C]0.2005[/C][C]0.143[/C][C]0.2005[/C][C]0.6992[/C][/ROW]
[ROW][C]71[/C][C]54[/C][C]48.4[/C][C]31.1298[/C][C]65.6703[/C][C]0.2625[/C][C]0.0071[/C][C]0.0614[/C][C]0.138[/C][/ROW]
[ROW][C]72[/C][C]65[/C][C]55.4[/C][C]38.1298[/C][C]72.6703[/C][C]0.138[/C][C]0.5631[/C][C]0.384[/C][C]0.384[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107660&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107660&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-------
613952.800135.529870.07030.05870.27750.20690.2775
624952.435.129769.67030.34980.93580.34140.2625
635865.799948.529783.07020.1880.97170.8120.812
644750.833.529768.07030.33310.20690.53620.2069
654251.233.929768.47020.14820.68320.50910.2201
666259.241.929776.47020.37530.97450.75920.5542
673938.799921.529756.07020.49090.00420.58090.0147
684028.411.129745.67020.0940.11450.76624e-04
697254.837.529772.07020.02550.95350.49090.3582
707062.645.329779.87030.20050.1430.20050.6992
715448.431.129865.67030.26250.00710.06140.138
726555.438.129872.67030.1380.56310.3840.384







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.1669-0.26140190.441700
620.1682-0.06490.163111.56101.000810.0499
630.1339-0.11850.148360.83987.61359.3602
640.1735-0.07480.129914.439969.32018.3259
650.1721-0.17970.139984.639172.38398.5079
660.14880.04730.12447.840161.62667.8503
670.22710.00520.10740.0452.82857.2683
680.31030.40850.145134.560963.04517.9401
690.16080.31390.1638295.841488.91139.4293
700.14080.11820.159254.759985.49629.2464
710.18210.11570.155331.359580.57478.9763
720.1590.17330.156892.159681.54019.03

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.1669 & -0.2614 & 0 & 190.4417 & 0 & 0 \tabularnewline
62 & 0.1682 & -0.0649 & 0.1631 & 11.56 & 101.0008 & 10.0499 \tabularnewline
63 & 0.1339 & -0.1185 & 0.1483 & 60.839 & 87.6135 & 9.3602 \tabularnewline
64 & 0.1735 & -0.0748 & 0.1299 & 14.4399 & 69.3201 & 8.3259 \tabularnewline
65 & 0.1721 & -0.1797 & 0.1399 & 84.6391 & 72.3839 & 8.5079 \tabularnewline
66 & 0.1488 & 0.0473 & 0.1244 & 7.8401 & 61.6266 & 7.8503 \tabularnewline
67 & 0.2271 & 0.0052 & 0.1074 & 0.04 & 52.8285 & 7.2683 \tabularnewline
68 & 0.3103 & 0.4085 & 0.145 & 134.5609 & 63.0451 & 7.9401 \tabularnewline
69 & 0.1608 & 0.3139 & 0.1638 & 295.8414 & 88.9113 & 9.4293 \tabularnewline
70 & 0.1408 & 0.1182 & 0.1592 & 54.7599 & 85.4962 & 9.2464 \tabularnewline
71 & 0.1821 & 0.1157 & 0.1553 & 31.3595 & 80.5747 & 8.9763 \tabularnewline
72 & 0.159 & 0.1733 & 0.1568 & 92.1596 & 81.5401 & 9.03 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107660&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.1669[/C][C]-0.2614[/C][C]0[/C][C]190.4417[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.1682[/C][C]-0.0649[/C][C]0.1631[/C][C]11.56[/C][C]101.0008[/C][C]10.0499[/C][/ROW]
[ROW][C]63[/C][C]0.1339[/C][C]-0.1185[/C][C]0.1483[/C][C]60.839[/C][C]87.6135[/C][C]9.3602[/C][/ROW]
[ROW][C]64[/C][C]0.1735[/C][C]-0.0748[/C][C]0.1299[/C][C]14.4399[/C][C]69.3201[/C][C]8.3259[/C][/ROW]
[ROW][C]65[/C][C]0.1721[/C][C]-0.1797[/C][C]0.1399[/C][C]84.6391[/C][C]72.3839[/C][C]8.5079[/C][/ROW]
[ROW][C]66[/C][C]0.1488[/C][C]0.0473[/C][C]0.1244[/C][C]7.8401[/C][C]61.6266[/C][C]7.8503[/C][/ROW]
[ROW][C]67[/C][C]0.2271[/C][C]0.0052[/C][C]0.1074[/C][C]0.04[/C][C]52.8285[/C][C]7.2683[/C][/ROW]
[ROW][C]68[/C][C]0.3103[/C][C]0.4085[/C][C]0.145[/C][C]134.5609[/C][C]63.0451[/C][C]7.9401[/C][/ROW]
[ROW][C]69[/C][C]0.1608[/C][C]0.3139[/C][C]0.1638[/C][C]295.8414[/C][C]88.9113[/C][C]9.4293[/C][/ROW]
[ROW][C]70[/C][C]0.1408[/C][C]0.1182[/C][C]0.1592[/C][C]54.7599[/C][C]85.4962[/C][C]9.2464[/C][/ROW]
[ROW][C]71[/C][C]0.1821[/C][C]0.1157[/C][C]0.1553[/C][C]31.3595[/C][C]80.5747[/C][C]8.9763[/C][/ROW]
[ROW][C]72[/C][C]0.159[/C][C]0.1733[/C][C]0.1568[/C][C]92.1596[/C][C]81.5401[/C][C]9.03[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107660&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107660&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.1669-0.26140190.441700
620.1682-0.06490.163111.56101.000810.0499
630.1339-0.11850.148360.83987.61359.3602
640.1735-0.07480.129914.439969.32018.3259
650.1721-0.17970.139984.639172.38398.5079
660.14880.04730.12447.840161.62667.8503
670.22710.00520.10740.0452.82857.2683
680.31030.40850.145134.560963.04517.9401
690.16080.31390.1638295.841488.91139.4293
700.14080.11820.159254.759985.49629.2464
710.18210.11570.155331.359580.57478.9763
720.1590.17330.156892.159681.54019.03



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