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, 18 Dec 2009 06:22:49 -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/2009/Dec/18/t12611426415vhqj3javmj8f2j.htm/, Retrieved Sat, 27 Apr 2024 07:11:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=69316, Retrieved Sat, 27 Apr 2024 07:11:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact218
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-12 13:32:37] [76963dc1903f0f612b6153510a3818cf]
- R  D  [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-17 12:14:40] [76963dc1903f0f612b6153510a3818cf]
-         [Univariate Explorative Data Analysis] [Run Sequence Plot...] [2008-12-22 18:19:51] [1ce0d16c8f4225c977b42c8fa93bc163]
- RMP       [Univariate Data Series] [Identifying Integ...] [2009-11-22 12:08:06] [b98453cac15ba1066b407e146608df68]
-   PD        [Univariate Data Series] [Totaal Werkzoeken...] [2009-11-24 16:54:07] [ee7c2e7343f5b1451e62c5c16ec521f1]
-   P           [Univariate Data Series] [Totaal Werkzoeken...] [2009-11-24 17:23:40] [ee7c2e7343f5b1451e62c5c16ec521f1]
- RMPD            [(Partial) Autocorrelation Function] [] [2009-11-26 08:57:08] [5edbdb7a459c4059b6c3b063ba86821c]
- RMP               [Spectral Analysis] [] [2009-11-26 10:31:07] [5edbdb7a459c4059b6c3b063ba86821c]
-                     [Spectral Analysis] [] [2009-11-26 10:38:09] [5edbdb7a459c4059b6c3b063ba86821c]
-   P                   [Spectral Analysis] [] [2009-12-18 10:36:19] [5edbdb7a459c4059b6c3b063ba86821c]
- RMPD                      [ARIMA Forecasting] [] [2009-12-18 13:22:49] [24029b2c7217429de6ff94b5379eb52c] [Current]
-                             [ARIMA Forecasting] [] [2009-12-18 13:28:02] [5edbdb7a459c4059b6c3b063ba86821c]
Feedback Forum

Post a new message
Dataseries X:
80.2
74.8
77.8
73
72
75.8
72.6
71.9
74.8
72.9
72.9
79.9
74
76
69.6
77.3
75.2
75.8
77.6
76.7
77
77.9
76.7
71.9
73.4
72.5
73.7
69.5
74.7
72.5
72.1
70.7
71.4
69.5
73.5
72.4
74.5
72.2
73
73.3
71.3
73.6
71.3
71.2
81.4
76.1
71.1
75.7
70
68.5
56.7
57.9
58.8
59.3
61.3
62.9
61.4
64.5
63.8
61.6




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69316&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69316&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69316&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'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[47])
4676.1-------
4771.1-------
4875.773.729267.747879.71050.25920.80550.80550.8055
497072.346765.72778.96630.24360.16040.16040.644
5068.573.073665.074981.07240.13120.77430.77430.6857
5156.772.691463.911581.47132e-040.82530.82530.6388
5257.972.892463.211882.5730.00120.99950.99950.6417
5358.872.786762.373383.20.00420.99750.99750.6246
5459.372.842361.700183.98440.00860.99320.99320.6204
5561.372.81361.00984.61710.0280.98760.98760.612
5662.972.828460.386785.27010.05890.96530.96530.6073
5761.472.820359.777685.86310.04310.9320.9320.602
5864.572.824659.204586.44460.11550.94990.94990.598
5963.872.822358.649886.99480.10610.87510.87510.5941
6061.672.823558.118687.52840.06730.88550.88550.5908

\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[47]) \tabularnewline
46 & 76.1 & - & - & - & - & - & - & - \tabularnewline
47 & 71.1 & - & - & - & - & - & - & - \tabularnewline
48 & 75.7 & 73.7292 & 67.7478 & 79.7105 & 0.2592 & 0.8055 & 0.8055 & 0.8055 \tabularnewline
49 & 70 & 72.3467 & 65.727 & 78.9663 & 0.2436 & 0.1604 & 0.1604 & 0.644 \tabularnewline
50 & 68.5 & 73.0736 & 65.0749 & 81.0724 & 0.1312 & 0.7743 & 0.7743 & 0.6857 \tabularnewline
51 & 56.7 & 72.6914 & 63.9115 & 81.4713 & 2e-04 & 0.8253 & 0.8253 & 0.6388 \tabularnewline
52 & 57.9 & 72.8924 & 63.2118 & 82.573 & 0.0012 & 0.9995 & 0.9995 & 0.6417 \tabularnewline
53 & 58.8 & 72.7867 & 62.3733 & 83.2 & 0.0042 & 0.9975 & 0.9975 & 0.6246 \tabularnewline
54 & 59.3 & 72.8423 & 61.7001 & 83.9844 & 0.0086 & 0.9932 & 0.9932 & 0.6204 \tabularnewline
55 & 61.3 & 72.813 & 61.009 & 84.6171 & 0.028 & 0.9876 & 0.9876 & 0.612 \tabularnewline
56 & 62.9 & 72.8284 & 60.3867 & 85.2701 & 0.0589 & 0.9653 & 0.9653 & 0.6073 \tabularnewline
57 & 61.4 & 72.8203 & 59.7776 & 85.8631 & 0.0431 & 0.932 & 0.932 & 0.602 \tabularnewline
58 & 64.5 & 72.8246 & 59.2045 & 86.4446 & 0.1155 & 0.9499 & 0.9499 & 0.598 \tabularnewline
59 & 63.8 & 72.8223 & 58.6498 & 86.9948 & 0.1061 & 0.8751 & 0.8751 & 0.5941 \tabularnewline
60 & 61.6 & 72.8235 & 58.1186 & 87.5284 & 0.0673 & 0.8855 & 0.8855 & 0.5908 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69316&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[47])[/C][/ROW]
[ROW][C]46[/C][C]76.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]71.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]75.7[/C][C]73.7292[/C][C]67.7478[/C][C]79.7105[/C][C]0.2592[/C][C]0.8055[/C][C]0.8055[/C][C]0.8055[/C][/ROW]
[ROW][C]49[/C][C]70[/C][C]72.3467[/C][C]65.727[/C][C]78.9663[/C][C]0.2436[/C][C]0.1604[/C][C]0.1604[/C][C]0.644[/C][/ROW]
[ROW][C]50[/C][C]68.5[/C][C]73.0736[/C][C]65.0749[/C][C]81.0724[/C][C]0.1312[/C][C]0.7743[/C][C]0.7743[/C][C]0.6857[/C][/ROW]
[ROW][C]51[/C][C]56.7[/C][C]72.6914[/C][C]63.9115[/C][C]81.4713[/C][C]2e-04[/C][C]0.8253[/C][C]0.8253[/C][C]0.6388[/C][/ROW]
[ROW][C]52[/C][C]57.9[/C][C]72.8924[/C][C]63.2118[/C][C]82.573[/C][C]0.0012[/C][C]0.9995[/C][C]0.9995[/C][C]0.6417[/C][/ROW]
[ROW][C]53[/C][C]58.8[/C][C]72.7867[/C][C]62.3733[/C][C]83.2[/C][C]0.0042[/C][C]0.9975[/C][C]0.9975[/C][C]0.6246[/C][/ROW]
[ROW][C]54[/C][C]59.3[/C][C]72.8423[/C][C]61.7001[/C][C]83.9844[/C][C]0.0086[/C][C]0.9932[/C][C]0.9932[/C][C]0.6204[/C][/ROW]
[ROW][C]55[/C][C]61.3[/C][C]72.813[/C][C]61.009[/C][C]84.6171[/C][C]0.028[/C][C]0.9876[/C][C]0.9876[/C][C]0.612[/C][/ROW]
[ROW][C]56[/C][C]62.9[/C][C]72.8284[/C][C]60.3867[/C][C]85.2701[/C][C]0.0589[/C][C]0.9653[/C][C]0.9653[/C][C]0.6073[/C][/ROW]
[ROW][C]57[/C][C]61.4[/C][C]72.8203[/C][C]59.7776[/C][C]85.8631[/C][C]0.0431[/C][C]0.932[/C][C]0.932[/C][C]0.602[/C][/ROW]
[ROW][C]58[/C][C]64.5[/C][C]72.8246[/C][C]59.2045[/C][C]86.4446[/C][C]0.1155[/C][C]0.9499[/C][C]0.9499[/C][C]0.598[/C][/ROW]
[ROW][C]59[/C][C]63.8[/C][C]72.8223[/C][C]58.6498[/C][C]86.9948[/C][C]0.1061[/C][C]0.8751[/C][C]0.8751[/C][C]0.5941[/C][/ROW]
[ROW][C]60[/C][C]61.6[/C][C]72.8235[/C][C]58.1186[/C][C]87.5284[/C][C]0.0673[/C][C]0.8855[/C][C]0.8855[/C][C]0.5908[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69316&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69316&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[47])
4676.1-------
4771.1-------
4875.773.729267.747879.71050.25920.80550.80550.8055
497072.346765.72778.96630.24360.16040.16040.644
5068.573.073665.074981.07240.13120.77430.77430.6857
5156.772.691463.911581.47132e-040.82530.82530.6388
5257.972.892463.211882.5730.00120.99950.99950.6417
5358.872.786762.373383.20.00420.99750.99750.6246
5459.372.842361.700183.98440.00860.99320.99320.6204
5561.372.81361.00984.61710.0280.98760.98760.612
5662.972.828460.386785.27010.05890.96530.96530.6073
5761.472.820359.777685.86310.04310.9320.9320.602
5864.572.824659.204586.44460.11550.94990.94990.598
5963.872.822358.649886.99480.10610.87510.87510.5941
6061.672.823558.118687.52840.06730.88550.88550.5908







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
480.04140.026703.884200
490.0467-0.03240.02965.50684.69552.1669
500.0558-0.06260.040620.918110.1033.1785
510.0616-0.220.0854255.723871.50828.4563
520.0678-0.20570.1095224.7713102.160810.1075
530.073-0.19220.1233195.6272117.738610.8507
540.078-0.18590.1322183.3927127.117711.2747
550.0827-0.15810.1355132.5499127.796811.3047
560.0872-0.13630.135598.5731124.549711.1602
570.0914-0.15680.1377130.4237125.137111.1865
580.0954-0.11430.135669.2984120.060810.9572
590.0993-0.12390.134681.4025116.839310.8092
600.103-0.15410.1361125.9671117.541510.8417

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
48 & 0.0414 & 0.0267 & 0 & 3.8842 & 0 & 0 \tabularnewline
49 & 0.0467 & -0.0324 & 0.0296 & 5.5068 & 4.6955 & 2.1669 \tabularnewline
50 & 0.0558 & -0.0626 & 0.0406 & 20.9181 & 10.103 & 3.1785 \tabularnewline
51 & 0.0616 & -0.22 & 0.0854 & 255.7238 & 71.5082 & 8.4563 \tabularnewline
52 & 0.0678 & -0.2057 & 0.1095 & 224.7713 & 102.1608 & 10.1075 \tabularnewline
53 & 0.073 & -0.1922 & 0.1233 & 195.6272 & 117.7386 & 10.8507 \tabularnewline
54 & 0.078 & -0.1859 & 0.1322 & 183.3927 & 127.1177 & 11.2747 \tabularnewline
55 & 0.0827 & -0.1581 & 0.1355 & 132.5499 & 127.7968 & 11.3047 \tabularnewline
56 & 0.0872 & -0.1363 & 0.1355 & 98.5731 & 124.5497 & 11.1602 \tabularnewline
57 & 0.0914 & -0.1568 & 0.1377 & 130.4237 & 125.1371 & 11.1865 \tabularnewline
58 & 0.0954 & -0.1143 & 0.1356 & 69.2984 & 120.0608 & 10.9572 \tabularnewline
59 & 0.0993 & -0.1239 & 0.1346 & 81.4025 & 116.8393 & 10.8092 \tabularnewline
60 & 0.103 & -0.1541 & 0.1361 & 125.9671 & 117.5415 & 10.8417 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69316&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]48[/C][C]0.0414[/C][C]0.0267[/C][C]0[/C][C]3.8842[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]49[/C][C]0.0467[/C][C]-0.0324[/C][C]0.0296[/C][C]5.5068[/C][C]4.6955[/C][C]2.1669[/C][/ROW]
[ROW][C]50[/C][C]0.0558[/C][C]-0.0626[/C][C]0.0406[/C][C]20.9181[/C][C]10.103[/C][C]3.1785[/C][/ROW]
[ROW][C]51[/C][C]0.0616[/C][C]-0.22[/C][C]0.0854[/C][C]255.7238[/C][C]71.5082[/C][C]8.4563[/C][/ROW]
[ROW][C]52[/C][C]0.0678[/C][C]-0.2057[/C][C]0.1095[/C][C]224.7713[/C][C]102.1608[/C][C]10.1075[/C][/ROW]
[ROW][C]53[/C][C]0.073[/C][C]-0.1922[/C][C]0.1233[/C][C]195.6272[/C][C]117.7386[/C][C]10.8507[/C][/ROW]
[ROW][C]54[/C][C]0.078[/C][C]-0.1859[/C][C]0.1322[/C][C]183.3927[/C][C]127.1177[/C][C]11.2747[/C][/ROW]
[ROW][C]55[/C][C]0.0827[/C][C]-0.1581[/C][C]0.1355[/C][C]132.5499[/C][C]127.7968[/C][C]11.3047[/C][/ROW]
[ROW][C]56[/C][C]0.0872[/C][C]-0.1363[/C][C]0.1355[/C][C]98.5731[/C][C]124.5497[/C][C]11.1602[/C][/ROW]
[ROW][C]57[/C][C]0.0914[/C][C]-0.1568[/C][C]0.1377[/C][C]130.4237[/C][C]125.1371[/C][C]11.1865[/C][/ROW]
[ROW][C]58[/C][C]0.0954[/C][C]-0.1143[/C][C]0.1356[/C][C]69.2984[/C][C]120.0608[/C][C]10.9572[/C][/ROW]
[ROW][C]59[/C][C]0.0993[/C][C]-0.1239[/C][C]0.1346[/C][C]81.4025[/C][C]116.8393[/C][C]10.8092[/C][/ROW]
[ROW][C]60[/C][C]0.103[/C][C]-0.1541[/C][C]0.1361[/C][C]125.9671[/C][C]117.5415[/C][C]10.8417[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69316&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69316&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
480.04140.026703.884200
490.0467-0.03240.02965.50684.69552.1669
500.0558-0.06260.040620.918110.1033.1785
510.0616-0.220.0854255.723871.50828.4563
520.0678-0.20570.1095224.7713102.160810.1075
530.073-0.19220.1233195.6272117.738610.8507
540.078-0.18590.1322183.3927127.117711.2747
550.0827-0.15810.1355132.5499127.796811.3047
560.0872-0.13630.135598.5731124.549711.1602
570.0914-0.15680.1377130.4237125.137111.1865
580.0954-0.11430.135669.2984120.060810.9572
590.0993-0.12390.134681.4025116.839310.8092
600.103-0.15410.1361125.9671117.541510.8417



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