Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 05 Dec 2007 13:42:09 -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/05/t119688668969jqrdbcb1yjo8y.htm/, Retrieved Thu, 02 May 2024 14:45:22 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2515, Retrieved Thu, 02 May 2024 14:45:22 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact209
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMAFORCfinsitaG3] [2007-12-05 20:42:09] [142ab5472309a9ae9a3b52678758dc4a] [Current]
Feedback Forum

Post a new message
Dataseries X:
22
27
24
24
22
23
25
23
21
21
22
20
22
22
20
21
20
21
21
21
19
21
21
22
19
24
22
22
22
24
22
23
24
21
20
22
23
23
22
20
21
21
20
20
17
18
19
19
20
21
20
21
19
22
20
18
16
17
18
19




Summary of compuational 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 compuational 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=2515&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]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=2515&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2515&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 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[48])
3622-------
3723-------
3823-------
3922-------
4020-------
4121-------
4221-------
4320-------
4420-------
4517-------
4618-------
4719-------
4819-------
492018.191215.277221.10530.11190.29326e-040.2932
502118.375915.301521.45030.04720.15020.00160.3454
512018.622615.409721.83550.20040.07350.01970.409
522118.659415.343221.97550.08330.21410.21410.4202
531918.457314.776222.13830.38630.08790.08790.3863
542218.487714.631322.34420.03710.39730.10080.3973
552018.546814.527622.56610.23930.04610.23930.4126
561818.564914.404422.72530.39510.24950.24950.4188
571618.515214.162722.86770.12870.59170.75250.4136
581718.519114.010623.02770.25450.86330.58930.4172
591818.532913.874723.19110.41130.74050.42210.4221
601918.539413.741523.33740.42540.58720.42540.4254

\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[48]) \tabularnewline
36 & 22 & - & - & - & - & - & - & - \tabularnewline
37 & 23 & - & - & - & - & - & - & - \tabularnewline
38 & 23 & - & - & - & - & - & - & - \tabularnewline
39 & 22 & - & - & - & - & - & - & - \tabularnewline
40 & 20 & - & - & - & - & - & - & - \tabularnewline
41 & 21 & - & - & - & - & - & - & - \tabularnewline
42 & 21 & - & - & - & - & - & - & - \tabularnewline
43 & 20 & - & - & - & - & - & - & - \tabularnewline
44 & 20 & - & - & - & - & - & - & - \tabularnewline
45 & 17 & - & - & - & - & - & - & - \tabularnewline
46 & 18 & - & - & - & - & - & - & - \tabularnewline
47 & 19 & - & - & - & - & - & - & - \tabularnewline
48 & 19 & - & - & - & - & - & - & - \tabularnewline
49 & 20 & 18.1912 & 15.2772 & 21.1053 & 0.1119 & 0.2932 & 6e-04 & 0.2932 \tabularnewline
50 & 21 & 18.3759 & 15.3015 & 21.4503 & 0.0472 & 0.1502 & 0.0016 & 0.3454 \tabularnewline
51 & 20 & 18.6226 & 15.4097 & 21.8355 & 0.2004 & 0.0735 & 0.0197 & 0.409 \tabularnewline
52 & 21 & 18.6594 & 15.3432 & 21.9755 & 0.0833 & 0.2141 & 0.2141 & 0.4202 \tabularnewline
53 & 19 & 18.4573 & 14.7762 & 22.1383 & 0.3863 & 0.0879 & 0.0879 & 0.3863 \tabularnewline
54 & 22 & 18.4877 & 14.6313 & 22.3442 & 0.0371 & 0.3973 & 0.1008 & 0.3973 \tabularnewline
55 & 20 & 18.5468 & 14.5276 & 22.5661 & 0.2393 & 0.0461 & 0.2393 & 0.4126 \tabularnewline
56 & 18 & 18.5649 & 14.4044 & 22.7253 & 0.3951 & 0.2495 & 0.2495 & 0.4188 \tabularnewline
57 & 16 & 18.5152 & 14.1627 & 22.8677 & 0.1287 & 0.5917 & 0.7525 & 0.4136 \tabularnewline
58 & 17 & 18.5191 & 14.0106 & 23.0277 & 0.2545 & 0.8633 & 0.5893 & 0.4172 \tabularnewline
59 & 18 & 18.5329 & 13.8747 & 23.1911 & 0.4113 & 0.7405 & 0.4221 & 0.4221 \tabularnewline
60 & 19 & 18.5394 & 13.7415 & 23.3374 & 0.4254 & 0.5872 & 0.4254 & 0.4254 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2515&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[48])[/C][/ROW]
[ROW][C]36[/C][C]22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]20[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]20[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]20[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]20[/C][C]18.1912[/C][C]15.2772[/C][C]21.1053[/C][C]0.1119[/C][C]0.2932[/C][C]6e-04[/C][C]0.2932[/C][/ROW]
[ROW][C]50[/C][C]21[/C][C]18.3759[/C][C]15.3015[/C][C]21.4503[/C][C]0.0472[/C][C]0.1502[/C][C]0.0016[/C][C]0.3454[/C][/ROW]
[ROW][C]51[/C][C]20[/C][C]18.6226[/C][C]15.4097[/C][C]21.8355[/C][C]0.2004[/C][C]0.0735[/C][C]0.0197[/C][C]0.409[/C][/ROW]
[ROW][C]52[/C][C]21[/C][C]18.6594[/C][C]15.3432[/C][C]21.9755[/C][C]0.0833[/C][C]0.2141[/C][C]0.2141[/C][C]0.4202[/C][/ROW]
[ROW][C]53[/C][C]19[/C][C]18.4573[/C][C]14.7762[/C][C]22.1383[/C][C]0.3863[/C][C]0.0879[/C][C]0.0879[/C][C]0.3863[/C][/ROW]
[ROW][C]54[/C][C]22[/C][C]18.4877[/C][C]14.6313[/C][C]22.3442[/C][C]0.0371[/C][C]0.3973[/C][C]0.1008[/C][C]0.3973[/C][/ROW]
[ROW][C]55[/C][C]20[/C][C]18.5468[/C][C]14.5276[/C][C]22.5661[/C][C]0.2393[/C][C]0.0461[/C][C]0.2393[/C][C]0.4126[/C][/ROW]
[ROW][C]56[/C][C]18[/C][C]18.5649[/C][C]14.4044[/C][C]22.7253[/C][C]0.3951[/C][C]0.2495[/C][C]0.2495[/C][C]0.4188[/C][/ROW]
[ROW][C]57[/C][C]16[/C][C]18.5152[/C][C]14.1627[/C][C]22.8677[/C][C]0.1287[/C][C]0.5917[/C][C]0.7525[/C][C]0.4136[/C][/ROW]
[ROW][C]58[/C][C]17[/C][C]18.5191[/C][C]14.0106[/C][C]23.0277[/C][C]0.2545[/C][C]0.8633[/C][C]0.5893[/C][C]0.4172[/C][/ROW]
[ROW][C]59[/C][C]18[/C][C]18.5329[/C][C]13.8747[/C][C]23.1911[/C][C]0.4113[/C][C]0.7405[/C][C]0.4221[/C][C]0.4221[/C][/ROW]
[ROW][C]60[/C][C]19[/C][C]18.5394[/C][C]13.7415[/C][C]23.3374[/C][C]0.4254[/C][C]0.5872[/C][C]0.4254[/C][C]0.4254[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2515&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2515&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[48])
3622-------
3723-------
3823-------
3922-------
4020-------
4121-------
4221-------
4320-------
4420-------
4517-------
4618-------
4719-------
4819-------
492018.191215.277221.10530.11190.29326e-040.2932
502118.375915.301521.45030.04720.15020.00160.3454
512018.622615.409721.83550.20040.07350.01970.409
522118.659415.343221.97550.08330.21410.21410.4202
531918.457314.776222.13830.38630.08790.08790.3863
542218.487714.631322.34420.03710.39730.10080.3973
552018.546814.527622.56610.23930.04610.23930.4126
561818.564914.404422.72530.39510.24950.24950.4188
571618.515214.162722.86770.12870.59170.75250.4136
581718.519114.010623.02770.25450.86330.58930.4172
591818.532913.874723.19110.41130.74050.42210.4221
601918.539413.741523.33740.42540.58720.42540.4254







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.08170.09940.00833.27160.27260.5221
500.08540.14280.01196.88590.57380.7575
510.0880.0740.00621.89720.15810.3976
520.09070.12540.01055.47860.45660.6757
530.10180.02940.00250.29450.02450.1567
540.10640.190.015812.33591.0281.0139
550.11060.07840.00652.11160.1760.4195
560.1143-0.03040.00250.31910.02660.1631
570.1199-0.13580.01136.32620.52720.7261
580.1242-0.0820.00682.30770.19230.4385
590.1282-0.02880.00240.28390.02370.1538
600.1320.02480.00210.21210.01770.133

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0817 & 0.0994 & 0.0083 & 3.2716 & 0.2726 & 0.5221 \tabularnewline
50 & 0.0854 & 0.1428 & 0.0119 & 6.8859 & 0.5738 & 0.7575 \tabularnewline
51 & 0.088 & 0.074 & 0.0062 & 1.8972 & 0.1581 & 0.3976 \tabularnewline
52 & 0.0907 & 0.1254 & 0.0105 & 5.4786 & 0.4566 & 0.6757 \tabularnewline
53 & 0.1018 & 0.0294 & 0.0025 & 0.2945 & 0.0245 & 0.1567 \tabularnewline
54 & 0.1064 & 0.19 & 0.0158 & 12.3359 & 1.028 & 1.0139 \tabularnewline
55 & 0.1106 & 0.0784 & 0.0065 & 2.1116 & 0.176 & 0.4195 \tabularnewline
56 & 0.1143 & -0.0304 & 0.0025 & 0.3191 & 0.0266 & 0.1631 \tabularnewline
57 & 0.1199 & -0.1358 & 0.0113 & 6.3262 & 0.5272 & 0.7261 \tabularnewline
58 & 0.1242 & -0.082 & 0.0068 & 2.3077 & 0.1923 & 0.4385 \tabularnewline
59 & 0.1282 & -0.0288 & 0.0024 & 0.2839 & 0.0237 & 0.1538 \tabularnewline
60 & 0.132 & 0.0248 & 0.0021 & 0.2121 & 0.0177 & 0.133 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2515&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]49[/C][C]0.0817[/C][C]0.0994[/C][C]0.0083[/C][C]3.2716[/C][C]0.2726[/C][C]0.5221[/C][/ROW]
[ROW][C]50[/C][C]0.0854[/C][C]0.1428[/C][C]0.0119[/C][C]6.8859[/C][C]0.5738[/C][C]0.7575[/C][/ROW]
[ROW][C]51[/C][C]0.088[/C][C]0.074[/C][C]0.0062[/C][C]1.8972[/C][C]0.1581[/C][C]0.3976[/C][/ROW]
[ROW][C]52[/C][C]0.0907[/C][C]0.1254[/C][C]0.0105[/C][C]5.4786[/C][C]0.4566[/C][C]0.6757[/C][/ROW]
[ROW][C]53[/C][C]0.1018[/C][C]0.0294[/C][C]0.0025[/C][C]0.2945[/C][C]0.0245[/C][C]0.1567[/C][/ROW]
[ROW][C]54[/C][C]0.1064[/C][C]0.19[/C][C]0.0158[/C][C]12.3359[/C][C]1.028[/C][C]1.0139[/C][/ROW]
[ROW][C]55[/C][C]0.1106[/C][C]0.0784[/C][C]0.0065[/C][C]2.1116[/C][C]0.176[/C][C]0.4195[/C][/ROW]
[ROW][C]56[/C][C]0.1143[/C][C]-0.0304[/C][C]0.0025[/C][C]0.3191[/C][C]0.0266[/C][C]0.1631[/C][/ROW]
[ROW][C]57[/C][C]0.1199[/C][C]-0.1358[/C][C]0.0113[/C][C]6.3262[/C][C]0.5272[/C][C]0.7261[/C][/ROW]
[ROW][C]58[/C][C]0.1242[/C][C]-0.082[/C][C]0.0068[/C][C]2.3077[/C][C]0.1923[/C][C]0.4385[/C][/ROW]
[ROW][C]59[/C][C]0.1282[/C][C]-0.0288[/C][C]0.0024[/C][C]0.2839[/C][C]0.0237[/C][C]0.1538[/C][/ROW]
[ROW][C]60[/C][C]0.132[/C][C]0.0248[/C][C]0.0021[/C][C]0.2121[/C][C]0.0177[/C][C]0.133[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2515&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2515&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
490.08170.09940.00833.27160.27260.5221
500.08540.14280.01196.88590.57380.7575
510.0880.0740.00621.89720.15810.3976
520.09070.12540.01055.47860.45660.6757
530.10180.02940.00250.29450.02450.1567
540.10640.190.015812.33591.0281.0139
550.11060.07840.00652.11160.1760.4195
560.1143-0.03040.00250.31910.02660.1631
570.1199-0.13580.01136.32620.52720.7261
580.1242-0.0820.00682.30770.19230.4385
590.1282-0.02880.00240.28390.02370.1538
600.1320.02480.00210.21210.01770.133



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