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 computationSun, 16 Dec 2012 05:39:55 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/16/t13556544243u4w3tcbnj844pd.htm/, Retrieved Sat, 27 Apr 2024 18:19:39 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=200218, Retrieved Sat, 27 Apr 2024 18:19:39 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact121
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [web server] [2010-10-19 15:51:23] [b98453cac15ba1066b407e146608df68]
- RMP   [Variance Reduction Matrix] [Pageviews] [2010-11-29 10:12:20] [b98453cac15ba1066b407e146608df68]
- RM      [Standard Deviation-Mean Plot] [Pageviews] [2010-11-29 11:10:57] [b98453cac15ba1066b407e146608df68]
- RMP       [ARIMA Forecasting] [Pageviews] [2010-11-29 21:25:44] [b98453cac15ba1066b407e146608df68]
-   P         [ARIMA Forecasting] [Voorspelling met ...] [2012-11-29 15:52:07] [74be16979710d4c4e7c6647856088456]
-    D          [ARIMA Forecasting] [Voorspelling met ...] [2012-11-29 15:59:18] [74be16979710d4c4e7c6647856088456]
-   P               [ARIMA Forecasting] [Voorspelling met ...] [2012-12-16 10:39:55] [d41d8cd98f00b204e9800998ecf8427e] [Current]
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 time6 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net

\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 & 6 seconds \tabularnewline
R Server & 'Sir Maurice George Kendall' @ kendall.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=200218&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]6 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Maurice George Kendall' @ kendall.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=200218&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=200218&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 time6 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net







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])
5351-------
5453-------
5537-------
5622-------
5755-------
5870-------
5962-------
6058-------
613955.444332.877878.01090.07660.41220.58410.4122
624943.736720.967266.50610.32520.65830.7190.1098
635844.122820.868967.37670.12110.34050.96890.1211
644737.990114.679161.30110.22440.04620.07630.0462
654248.652524.843572.46150.2920.55410.03940.2208
666246.153122.324169.98210.09620.63370.09620.1649
673948.32324.394972.25120.22250.13130.2140.214
684049.876425.04674.70690.21780.80470.80470.2607
697265.862640.979190.74610.31440.97920.90790.7321
707053.842128.935478.74880.10180.07650.37180.3718
715445.766720.833570.69990.25870.02840.46140.1681
726556.072431.088381.05660.24180.56460.86520.4399

\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
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 & 55.4443 & 32.8778 & 78.0109 & 0.0766 & 0.4122 & 0.5841 & 0.4122 \tabularnewline
62 & 49 & 43.7367 & 20.9672 & 66.5061 & 0.3252 & 0.6583 & 0.719 & 0.1098 \tabularnewline
63 & 58 & 44.1228 & 20.8689 & 67.3767 & 0.1211 & 0.3405 & 0.9689 & 0.1211 \tabularnewline
64 & 47 & 37.9901 & 14.6791 & 61.3011 & 0.2244 & 0.0462 & 0.0763 & 0.0462 \tabularnewline
65 & 42 & 48.6525 & 24.8435 & 72.4615 & 0.292 & 0.5541 & 0.0394 & 0.2208 \tabularnewline
66 & 62 & 46.1531 & 22.3241 & 69.9821 & 0.0962 & 0.6337 & 0.0962 & 0.1649 \tabularnewline
67 & 39 & 48.323 & 24.3949 & 72.2512 & 0.2225 & 0.1313 & 0.214 & 0.214 \tabularnewline
68 & 40 & 49.8764 & 25.046 & 74.7069 & 0.2178 & 0.8047 & 0.8047 & 0.2607 \tabularnewline
69 & 72 & 65.8626 & 40.9791 & 90.7461 & 0.3144 & 0.9792 & 0.9079 & 0.7321 \tabularnewline
70 & 70 & 53.8421 & 28.9354 & 78.7488 & 0.1018 & 0.0765 & 0.3718 & 0.3718 \tabularnewline
71 & 54 & 45.7667 & 20.8335 & 70.6999 & 0.2587 & 0.0284 & 0.4614 & 0.1681 \tabularnewline
72 & 65 & 56.0724 & 31.0883 & 81.0566 & 0.2418 & 0.5646 & 0.8652 & 0.4399 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=200218&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]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]55.4443[/C][C]32.8778[/C][C]78.0109[/C][C]0.0766[/C][C]0.4122[/C][C]0.5841[/C][C]0.4122[/C][/ROW]
[ROW][C]62[/C][C]49[/C][C]43.7367[/C][C]20.9672[/C][C]66.5061[/C][C]0.3252[/C][C]0.6583[/C][C]0.719[/C][C]0.1098[/C][/ROW]
[ROW][C]63[/C][C]58[/C][C]44.1228[/C][C]20.8689[/C][C]67.3767[/C][C]0.1211[/C][C]0.3405[/C][C]0.9689[/C][C]0.1211[/C][/ROW]
[ROW][C]64[/C][C]47[/C][C]37.9901[/C][C]14.6791[/C][C]61.3011[/C][C]0.2244[/C][C]0.0462[/C][C]0.0763[/C][C]0.0462[/C][/ROW]
[ROW][C]65[/C][C]42[/C][C]48.6525[/C][C]24.8435[/C][C]72.4615[/C][C]0.292[/C][C]0.5541[/C][C]0.0394[/C][C]0.2208[/C][/ROW]
[ROW][C]66[/C][C]62[/C][C]46.1531[/C][C]22.3241[/C][C]69.9821[/C][C]0.0962[/C][C]0.6337[/C][C]0.0962[/C][C]0.1649[/C][/ROW]
[ROW][C]67[/C][C]39[/C][C]48.323[/C][C]24.3949[/C][C]72.2512[/C][C]0.2225[/C][C]0.1313[/C][C]0.214[/C][C]0.214[/C][/ROW]
[ROW][C]68[/C][C]40[/C][C]49.8764[/C][C]25.046[/C][C]74.7069[/C][C]0.2178[/C][C]0.8047[/C][C]0.8047[/C][C]0.2607[/C][/ROW]
[ROW][C]69[/C][C]72[/C][C]65.8626[/C][C]40.9791[/C][C]90.7461[/C][C]0.3144[/C][C]0.9792[/C][C]0.9079[/C][C]0.7321[/C][/ROW]
[ROW][C]70[/C][C]70[/C][C]53.8421[/C][C]28.9354[/C][C]78.7488[/C][C]0.1018[/C][C]0.0765[/C][C]0.3718[/C][C]0.3718[/C][/ROW]
[ROW][C]71[/C][C]54[/C][C]45.7667[/C][C]20.8335[/C][C]70.6999[/C][C]0.2587[/C][C]0.0284[/C][C]0.4614[/C][C]0.1681[/C][/ROW]
[ROW][C]72[/C][C]65[/C][C]56.0724[/C][C]31.0883[/C][C]81.0566[/C][C]0.2418[/C][C]0.5646[/C][C]0.8652[/C][C]0.4399[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=200218&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=200218&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])
5351-------
5453-------
5537-------
5622-------
5755-------
5870-------
5962-------
6058-------
613955.444332.877878.01090.07660.41220.58410.4122
624943.736720.967266.50610.32520.65830.7190.1098
635844.122820.868967.37670.12110.34050.96890.1211
644737.990114.679161.30110.22440.04620.07630.0462
654248.652524.843572.46150.2920.55410.03940.2208
666246.153122.324169.98210.09620.63370.09620.1649
673948.32324.394972.25120.22250.13130.2140.214
684049.876425.04674.70690.21780.80470.80470.2607
697265.862640.979190.74610.31440.97920.90790.7321
707053.842128.935478.74880.10180.07650.37180.3718
715445.766720.833570.69990.25870.02840.46140.1681
726556.072431.088381.05660.24180.56460.86520.4399







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.2077-0.29660270.416200
620.26560.12030.208527.7028149.059512.209
630.26890.31450.2438192.5773163.565412.7893
640.31310.23720.242281.178142.968611.9569
650.2497-0.13670.221144.2556123.22611.1007
660.26340.34340.2415251.1251144.542512.0226
670.2526-0.19290.234586.9192136.310611.6752
680.254-0.1980.2397.5439131.464811.4658
690.19280.09320.214837.6678121.042911.0019
700.2360.30010.2233261.0768135.046311.6209
710.2780.17990.219367.7867128.931811.3548
720.22730.15920.214379.7013124.829211.1727

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.2077 & -0.2966 & 0 & 270.4162 & 0 & 0 \tabularnewline
62 & 0.2656 & 0.1203 & 0.2085 & 27.7028 & 149.0595 & 12.209 \tabularnewline
63 & 0.2689 & 0.3145 & 0.2438 & 192.5773 & 163.5654 & 12.7893 \tabularnewline
64 & 0.3131 & 0.2372 & 0.2422 & 81.178 & 142.9686 & 11.9569 \tabularnewline
65 & 0.2497 & -0.1367 & 0.2211 & 44.2556 & 123.226 & 11.1007 \tabularnewline
66 & 0.2634 & 0.3434 & 0.2415 & 251.1251 & 144.5425 & 12.0226 \tabularnewline
67 & 0.2526 & -0.1929 & 0.2345 & 86.9192 & 136.3106 & 11.6752 \tabularnewline
68 & 0.254 & -0.198 & 0.23 & 97.5439 & 131.4648 & 11.4658 \tabularnewline
69 & 0.1928 & 0.0932 & 0.2148 & 37.6678 & 121.0429 & 11.0019 \tabularnewline
70 & 0.236 & 0.3001 & 0.2233 & 261.0768 & 135.0463 & 11.6209 \tabularnewline
71 & 0.278 & 0.1799 & 0.2193 & 67.7867 & 128.9318 & 11.3548 \tabularnewline
72 & 0.2273 & 0.1592 & 0.2143 & 79.7013 & 124.8292 & 11.1727 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=200218&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.2077[/C][C]-0.2966[/C][C]0[/C][C]270.4162[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.2656[/C][C]0.1203[/C][C]0.2085[/C][C]27.7028[/C][C]149.0595[/C][C]12.209[/C][/ROW]
[ROW][C]63[/C][C]0.2689[/C][C]0.3145[/C][C]0.2438[/C][C]192.5773[/C][C]163.5654[/C][C]12.7893[/C][/ROW]
[ROW][C]64[/C][C]0.3131[/C][C]0.2372[/C][C]0.2422[/C][C]81.178[/C][C]142.9686[/C][C]11.9569[/C][/ROW]
[ROW][C]65[/C][C]0.2497[/C][C]-0.1367[/C][C]0.2211[/C][C]44.2556[/C][C]123.226[/C][C]11.1007[/C][/ROW]
[ROW][C]66[/C][C]0.2634[/C][C]0.3434[/C][C]0.2415[/C][C]251.1251[/C][C]144.5425[/C][C]12.0226[/C][/ROW]
[ROW][C]67[/C][C]0.2526[/C][C]-0.1929[/C][C]0.2345[/C][C]86.9192[/C][C]136.3106[/C][C]11.6752[/C][/ROW]
[ROW][C]68[/C][C]0.254[/C][C]-0.198[/C][C]0.23[/C][C]97.5439[/C][C]131.4648[/C][C]11.4658[/C][/ROW]
[ROW][C]69[/C][C]0.1928[/C][C]0.0932[/C][C]0.2148[/C][C]37.6678[/C][C]121.0429[/C][C]11.0019[/C][/ROW]
[ROW][C]70[/C][C]0.236[/C][C]0.3001[/C][C]0.2233[/C][C]261.0768[/C][C]135.0463[/C][C]11.6209[/C][/ROW]
[ROW][C]71[/C][C]0.278[/C][C]0.1799[/C][C]0.2193[/C][C]67.7867[/C][C]128.9318[/C][C]11.3548[/C][/ROW]
[ROW][C]72[/C][C]0.2273[/C][C]0.1592[/C][C]0.2143[/C][C]79.7013[/C][C]124.8292[/C][C]11.1727[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=200218&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=200218&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.2077-0.29660270.416200
620.26560.12030.208527.7028149.059512.209
630.26890.31450.2438192.5773163.565412.7893
640.31310.23720.242281.178142.968611.9569
650.2497-0.13670.221144.2556123.22611.1007
660.26340.34340.2415251.1251144.542512.0226
670.2526-0.19290.234586.9192136.310611.6752
680.254-0.1980.2397.5439131.464811.4658
690.19280.09320.214837.6678121.042911.0019
700.2360.30010.2233261.0768135.046311.6209
710.2780.17990.219367.7867128.931811.3548
720.22730.15920.214379.7013124.829211.1727



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; 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 <- 7 #seasonal period
par6 <- 4 #p
par7 <- as.numeric(par7) #q
par8 <- 4 #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')