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 computationThu, 31 Dec 2009 05:24:34 -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/31/t1262262349rn9ad9apq6zvpdd.htm/, Retrieved Thu, 02 May 2024 08:36:48 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=71454, Retrieved Thu, 02 May 2024 08:36:48 +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)
-       [ARIMA Forecasting] [] [2009-12-31 12:24:34] [abbb6febea381ea822009ab8520873eb] [Current]
Feedback Forum

Post a new message
Dataseries X:
-2
-2
-6
-7
-6
-6
-3
-2
-5
-11
-11
-11
-10
-14
-8
-9
-5
-1
-2
-5
-4
-6
-2
-2
-2
-2
2
1
-8
-1
1
-1
2
2
1
-1
-2
-2
-1
-8
-4
-6
-3
-3
-7
-9
-11
-13
-11
-9
-17
-22
-25
-20
-24
-24
-22
-19
-18
-17
-11
-11
-12
-10




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71454&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 time2 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[52])
40-8-------
41-4-------
42-6-------
43-3-------
44-3-------
45-7-------
46-9-------
47-11-------
48-13-------
49-11-------
50-9-------
51-17-------
52-22-------
53-25-22-28.5179-15.48210.18350.500.5
54-20-22-31.2178-12.78220.33530.73823e-040.5
55-24-22-33.2894-10.71060.36420.36425e-040.5
56-24-22-35.0359-8.96410.38180.61820.00210.5
57-22-22-36.5746-7.42540.50.6060.02180.5
58-19-22-37.9656-6.03440.35630.50.05530.5
59-18-22-39.2449-4.75510.32470.36660.10560.5
60-17-22-40.4355-3.56450.29750.33530.16930.5
61-11-22-41.5538-2.44620.13510.30810.13510.5
62-11-22-42.6115-1.38850.14780.14780.10820.5
63-12-22-43.6176-0.38240.18230.15930.32520.5
64-10-22-44.57880.57880.14880.19270.50.5

\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[52]) \tabularnewline
40 & -8 & - & - & - & - & - & - & - \tabularnewline
41 & -4 & - & - & - & - & - & - & - \tabularnewline
42 & -6 & - & - & - & - & - & - & - \tabularnewline
43 & -3 & - & - & - & - & - & - & - \tabularnewline
44 & -3 & - & - & - & - & - & - & - \tabularnewline
45 & -7 & - & - & - & - & - & - & - \tabularnewline
46 & -9 & - & - & - & - & - & - & - \tabularnewline
47 & -11 & - & - & - & - & - & - & - \tabularnewline
48 & -13 & - & - & - & - & - & - & - \tabularnewline
49 & -11 & - & - & - & - & - & - & - \tabularnewline
50 & -9 & - & - & - & - & - & - & - \tabularnewline
51 & -17 & - & - & - & - & - & - & - \tabularnewline
52 & -22 & - & - & - & - & - & - & - \tabularnewline
53 & -25 & -22 & -28.5179 & -15.4821 & 0.1835 & 0.5 & 0 & 0.5 \tabularnewline
54 & -20 & -22 & -31.2178 & -12.7822 & 0.3353 & 0.7382 & 3e-04 & 0.5 \tabularnewline
55 & -24 & -22 & -33.2894 & -10.7106 & 0.3642 & 0.3642 & 5e-04 & 0.5 \tabularnewline
56 & -24 & -22 & -35.0359 & -8.9641 & 0.3818 & 0.6182 & 0.0021 & 0.5 \tabularnewline
57 & -22 & -22 & -36.5746 & -7.4254 & 0.5 & 0.606 & 0.0218 & 0.5 \tabularnewline
58 & -19 & -22 & -37.9656 & -6.0344 & 0.3563 & 0.5 & 0.0553 & 0.5 \tabularnewline
59 & -18 & -22 & -39.2449 & -4.7551 & 0.3247 & 0.3666 & 0.1056 & 0.5 \tabularnewline
60 & -17 & -22 & -40.4355 & -3.5645 & 0.2975 & 0.3353 & 0.1693 & 0.5 \tabularnewline
61 & -11 & -22 & -41.5538 & -2.4462 & 0.1351 & 0.3081 & 0.1351 & 0.5 \tabularnewline
62 & -11 & -22 & -42.6115 & -1.3885 & 0.1478 & 0.1478 & 0.1082 & 0.5 \tabularnewline
63 & -12 & -22 & -43.6176 & -0.3824 & 0.1823 & 0.1593 & 0.3252 & 0.5 \tabularnewline
64 & -10 & -22 & -44.5788 & 0.5788 & 0.1488 & 0.1927 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=71454&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[52])[/C][/ROW]
[ROW][C]40[/C][C]-8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]-4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]-6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]-3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]-3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]-7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]-9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]-11[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]-13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]-11[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]-9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]-17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]-22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]-25[/C][C]-22[/C][C]-28.5179[/C][C]-15.4821[/C][C]0.1835[/C][C]0.5[/C][C]0[/C][C]0.5[/C][/ROW]
[ROW][C]54[/C][C]-20[/C][C]-22[/C][C]-31.2178[/C][C]-12.7822[/C][C]0.3353[/C][C]0.7382[/C][C]3e-04[/C][C]0.5[/C][/ROW]
[ROW][C]55[/C][C]-24[/C][C]-22[/C][C]-33.2894[/C][C]-10.7106[/C][C]0.3642[/C][C]0.3642[/C][C]5e-04[/C][C]0.5[/C][/ROW]
[ROW][C]56[/C][C]-24[/C][C]-22[/C][C]-35.0359[/C][C]-8.9641[/C][C]0.3818[/C][C]0.6182[/C][C]0.0021[/C][C]0.5[/C][/ROW]
[ROW][C]57[/C][C]-22[/C][C]-22[/C][C]-36.5746[/C][C]-7.4254[/C][C]0.5[/C][C]0.606[/C][C]0.0218[/C][C]0.5[/C][/ROW]
[ROW][C]58[/C][C]-19[/C][C]-22[/C][C]-37.9656[/C][C]-6.0344[/C][C]0.3563[/C][C]0.5[/C][C]0.0553[/C][C]0.5[/C][/ROW]
[ROW][C]59[/C][C]-18[/C][C]-22[/C][C]-39.2449[/C][C]-4.7551[/C][C]0.3247[/C][C]0.3666[/C][C]0.1056[/C][C]0.5[/C][/ROW]
[ROW][C]60[/C][C]-17[/C][C]-22[/C][C]-40.4355[/C][C]-3.5645[/C][C]0.2975[/C][C]0.3353[/C][C]0.1693[/C][C]0.5[/C][/ROW]
[ROW][C]61[/C][C]-11[/C][C]-22[/C][C]-41.5538[/C][C]-2.4462[/C][C]0.1351[/C][C]0.3081[/C][C]0.1351[/C][C]0.5[/C][/ROW]
[ROW][C]62[/C][C]-11[/C][C]-22[/C][C]-42.6115[/C][C]-1.3885[/C][C]0.1478[/C][C]0.1478[/C][C]0.1082[/C][C]0.5[/C][/ROW]
[ROW][C]63[/C][C]-12[/C][C]-22[/C][C]-43.6176[/C][C]-0.3824[/C][C]0.1823[/C][C]0.1593[/C][C]0.3252[/C][C]0.5[/C][/ROW]
[ROW][C]64[/C][C]-10[/C][C]-22[/C][C]-44.5788[/C][C]0.5788[/C][C]0.1488[/C][C]0.1927[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=71454&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71454&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[52])
40-8-------
41-4-------
42-6-------
43-3-------
44-3-------
45-7-------
46-9-------
47-11-------
48-13-------
49-11-------
50-9-------
51-17-------
52-22-------
53-25-22-28.5179-15.48210.18350.500.5
54-20-22-31.2178-12.78220.33530.73823e-040.5
55-24-22-33.2894-10.71060.36420.36425e-040.5
56-24-22-35.0359-8.96410.38180.61820.00210.5
57-22-22-36.5746-7.42540.50.6060.02180.5
58-19-22-37.9656-6.03440.35630.50.05530.5
59-18-22-39.2449-4.75510.32470.36660.10560.5
60-17-22-40.4355-3.56450.29750.33530.16930.5
61-11-22-41.5538-2.44620.13510.30810.13510.5
62-11-22-42.6115-1.38850.14780.14780.10820.5
63-12-22-43.6176-0.38240.18230.15930.32520.5
64-10-22-44.57880.57880.14880.19270.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
53-0.15120.13640900
54-0.2138-0.09090.113646.52.5495
55-0.26180.09090.106145.66672.3805
56-0.30230.09090.102345.252.2913
57-0.33800.081804.22.0494
58-0.3703-0.13640.0909952.2361
59-0.3999-0.18180.1039166.57142.5635
60-0.4275-0.22730.1193258.8752.9791
61-0.4535-0.50.161612121.33334.6188
62-0.478-0.50.195512131.35.5946
63-0.5013-0.45450.21910037.54556.1274
64-0.5236-0.54550.246214446.41676.813

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
53 & -0.1512 & 0.1364 & 0 & 9 & 0 & 0 \tabularnewline
54 & -0.2138 & -0.0909 & 0.1136 & 4 & 6.5 & 2.5495 \tabularnewline
55 & -0.2618 & 0.0909 & 0.1061 & 4 & 5.6667 & 2.3805 \tabularnewline
56 & -0.3023 & 0.0909 & 0.1023 & 4 & 5.25 & 2.2913 \tabularnewline
57 & -0.338 & 0 & 0.0818 & 0 & 4.2 & 2.0494 \tabularnewline
58 & -0.3703 & -0.1364 & 0.0909 & 9 & 5 & 2.2361 \tabularnewline
59 & -0.3999 & -0.1818 & 0.1039 & 16 & 6.5714 & 2.5635 \tabularnewline
60 & -0.4275 & -0.2273 & 0.1193 & 25 & 8.875 & 2.9791 \tabularnewline
61 & -0.4535 & -0.5 & 0.1616 & 121 & 21.3333 & 4.6188 \tabularnewline
62 & -0.478 & -0.5 & 0.1955 & 121 & 31.3 & 5.5946 \tabularnewline
63 & -0.5013 & -0.4545 & 0.219 & 100 & 37.5455 & 6.1274 \tabularnewline
64 & -0.5236 & -0.5455 & 0.2462 & 144 & 46.4167 & 6.813 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=71454&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]53[/C][C]-0.1512[/C][C]0.1364[/C][C]0[/C][C]9[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]54[/C][C]-0.2138[/C][C]-0.0909[/C][C]0.1136[/C][C]4[/C][C]6.5[/C][C]2.5495[/C][/ROW]
[ROW][C]55[/C][C]-0.2618[/C][C]0.0909[/C][C]0.1061[/C][C]4[/C][C]5.6667[/C][C]2.3805[/C][/ROW]
[ROW][C]56[/C][C]-0.3023[/C][C]0.0909[/C][C]0.1023[/C][C]4[/C][C]5.25[/C][C]2.2913[/C][/ROW]
[ROW][C]57[/C][C]-0.338[/C][C]0[/C][C]0.0818[/C][C]0[/C][C]4.2[/C][C]2.0494[/C][/ROW]
[ROW][C]58[/C][C]-0.3703[/C][C]-0.1364[/C][C]0.0909[/C][C]9[/C][C]5[/C][C]2.2361[/C][/ROW]
[ROW][C]59[/C][C]-0.3999[/C][C]-0.1818[/C][C]0.1039[/C][C]16[/C][C]6.5714[/C][C]2.5635[/C][/ROW]
[ROW][C]60[/C][C]-0.4275[/C][C]-0.2273[/C][C]0.1193[/C][C]25[/C][C]8.875[/C][C]2.9791[/C][/ROW]
[ROW][C]61[/C][C]-0.4535[/C][C]-0.5[/C][C]0.1616[/C][C]121[/C][C]21.3333[/C][C]4.6188[/C][/ROW]
[ROW][C]62[/C][C]-0.478[/C][C]-0.5[/C][C]0.1955[/C][C]121[/C][C]31.3[/C][C]5.5946[/C][/ROW]
[ROW][C]63[/C][C]-0.5013[/C][C]-0.4545[/C][C]0.219[/C][C]100[/C][C]37.5455[/C][C]6.1274[/C][/ROW]
[ROW][C]64[/C][C]-0.5236[/C][C]-0.5455[/C][C]0.2462[/C][C]144[/C][C]46.4167[/C][C]6.813[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=71454&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71454&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
53-0.15120.13640900
54-0.2138-0.09090.113646.52.5495
55-0.26180.09090.106145.66672.3805
56-0.30230.09090.102345.252.2913
57-0.33800.081804.22.0494
58-0.3703-0.13640.0909952.2361
59-0.3999-0.18180.1039166.57142.5635
60-0.4275-0.22730.1193258.8752.9791
61-0.4535-0.50.161612121.33334.6188
62-0.478-0.50.195512131.35.5946
63-0.5013-0.45450.21910037.54556.1274
64-0.5236-0.54550.246214446.41676.813



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