Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 21 May 2024 15:00:13 +0200
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2024/May/21/t1716298540vw858bfnodneu4q.htm/, Retrieved Wed, 29 Apr 2026 13:37:10 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=320083, Retrieved Wed, 29 Apr 2026 13:37:10 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact271
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA(1,1,1) Brow...] [2024-05-21 13:00:13] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
5.9400
6.6000
7.1500
7.8900
8.4100
9.0000
9.6000
10.4100
11.1400
11.9200
12.8100
14.2400
15.0100
15.8100
16.5500
17.3300
18.2500
19.3000
20.5900
21.5100
22.0200
23.3600
23.9000
25.0800




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time1 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=320083&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]1 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=320083&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=320083&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R ServerBig Analytics Cloud Computing Center







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[12])
1112.81-------
1214.24-------
1315.0115.569815.152715.98690.0043111
1415.8116.87816.001117.75490.0085111
1516.5518.164816.742519.58720.0130.99940.99941
1617.3319.430717.390521.47090.02180.99720.99721
1718.2520.675917.955323.39660.04030.9920.9921
1819.321.900818.444625.35710.07010.98080.98081
1920.5923.105818.864727.34690.12250.96070.96071
2021.5124.291119.220729.36160.14120.92370.92370.9999
2122.0225.457119.516931.39730.12840.90360.90360.9999
2223.3626.604119.75733.45120.17650.90530.90530.9998
2323.927.732419.944435.52040.16740.86440.86440.9997
2425.0828.842320.081937.60260.20.86560.86560.9995

\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[12]) \tabularnewline
11 & 12.81 & - & - & - & - & - & - & - \tabularnewline
12 & 14.24 & - & - & - & - & - & - & - \tabularnewline
13 & 15.01 & 15.5698 & 15.1527 & 15.9869 & 0.0043 & 1 & 1 & 1 \tabularnewline
14 & 15.81 & 16.878 & 16.0011 & 17.7549 & 0.0085 & 1 & 1 & 1 \tabularnewline
15 & 16.55 & 18.1648 & 16.7425 & 19.5872 & 0.013 & 0.9994 & 0.9994 & 1 \tabularnewline
16 & 17.33 & 19.4307 & 17.3905 & 21.4709 & 0.0218 & 0.9972 & 0.9972 & 1 \tabularnewline
17 & 18.25 & 20.6759 & 17.9553 & 23.3966 & 0.0403 & 0.992 & 0.992 & 1 \tabularnewline
18 & 19.3 & 21.9008 & 18.4446 & 25.3571 & 0.0701 & 0.9808 & 0.9808 & 1 \tabularnewline
19 & 20.59 & 23.1058 & 18.8647 & 27.3469 & 0.1225 & 0.9607 & 0.9607 & 1 \tabularnewline
20 & 21.51 & 24.2911 & 19.2207 & 29.3616 & 0.1412 & 0.9237 & 0.9237 & 0.9999 \tabularnewline
21 & 22.02 & 25.4571 & 19.5169 & 31.3973 & 0.1284 & 0.9036 & 0.9036 & 0.9999 \tabularnewline
22 & 23.36 & 26.6041 & 19.757 & 33.4512 & 0.1765 & 0.9053 & 0.9053 & 0.9998 \tabularnewline
23 & 23.9 & 27.7324 & 19.9444 & 35.5204 & 0.1674 & 0.8644 & 0.8644 & 0.9997 \tabularnewline
24 & 25.08 & 28.8423 & 20.0819 & 37.6026 & 0.2 & 0.8656 & 0.8656 & 0.9995 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=320083&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[12])[/C][/ROW]
[ROW][C]11[/C][C]12.81[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]12[/C][C]14.24[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]13[/C][C]15.01[/C][C]15.5698[/C][C]15.1527[/C][C]15.9869[/C][C]0.0043[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]14[/C][C]15.81[/C][C]16.878[/C][C]16.0011[/C][C]17.7549[/C][C]0.0085[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]15[/C][C]16.55[/C][C]18.1648[/C][C]16.7425[/C][C]19.5872[/C][C]0.013[/C][C]0.9994[/C][C]0.9994[/C][C]1[/C][/ROW]
[ROW][C]16[/C][C]17.33[/C][C]19.4307[/C][C]17.3905[/C][C]21.4709[/C][C]0.0218[/C][C]0.9972[/C][C]0.9972[/C][C]1[/C][/ROW]
[ROW][C]17[/C][C]18.25[/C][C]20.6759[/C][C]17.9553[/C][C]23.3966[/C][C]0.0403[/C][C]0.992[/C][C]0.992[/C][C]1[/C][/ROW]
[ROW][C]18[/C][C]19.3[/C][C]21.9008[/C][C]18.4446[/C][C]25.3571[/C][C]0.0701[/C][C]0.9808[/C][C]0.9808[/C][C]1[/C][/ROW]
[ROW][C]19[/C][C]20.59[/C][C]23.1058[/C][C]18.8647[/C][C]27.3469[/C][C]0.1225[/C][C]0.9607[/C][C]0.9607[/C][C]1[/C][/ROW]
[ROW][C]20[/C][C]21.51[/C][C]24.2911[/C][C]19.2207[/C][C]29.3616[/C][C]0.1412[/C][C]0.9237[/C][C]0.9237[/C][C]0.9999[/C][/ROW]
[ROW][C]21[/C][C]22.02[/C][C]25.4571[/C][C]19.5169[/C][C]31.3973[/C][C]0.1284[/C][C]0.9036[/C][C]0.9036[/C][C]0.9999[/C][/ROW]
[ROW][C]22[/C][C]23.36[/C][C]26.6041[/C][C]19.757[/C][C]33.4512[/C][C]0.1765[/C][C]0.9053[/C][C]0.9053[/C][C]0.9998[/C][/ROW]
[ROW][C]23[/C][C]23.9[/C][C]27.7324[/C][C]19.9444[/C][C]35.5204[/C][C]0.1674[/C][C]0.8644[/C][C]0.8644[/C][C]0.9997[/C][/ROW]
[ROW][C]24[/C][C]25.08[/C][C]28.8423[/C][C]20.0819[/C][C]37.6026[/C][C]0.2[/C][C]0.8656[/C][C]0.8656[/C][C]0.9995[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=320083&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=320083&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[12])
1112.81-------
1214.24-------
1315.0115.569815.152715.98690.0043111
1415.8116.87816.001117.75490.0085111
1516.5518.164816.742519.58720.0130.99940.99941
1617.3319.430717.390521.47090.02180.99720.99721
1718.2520.675917.955323.39660.04030.9920.9921
1819.321.900818.444625.35710.07010.98080.98081
1920.5923.105818.864727.34690.12250.96070.96071
2021.5124.291119.220729.36160.14120.92370.92370.9999
2122.0225.457119.516931.39730.12840.90360.90360.9999
2223.3626.604119.75733.45120.17650.90530.90530.9998
2323.927.732419.944435.52040.16740.86440.86440.9997
2425.0828.842320.081937.60260.20.86560.86560.9995







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
130.0137-0.03730.03730.03660.313400-0.61150.6115
140.0265-0.06760.05240.0511.14060.7270.8527-1.16660.8891
150.0399-0.09760.06750.0652.60771.35391.1636-1.7641.1807
160.0536-0.12120.08090.07734.4132.11871.4556-2.29471.4592
170.0671-0.13290.09130.08685.88512.8721.6947-2.651.6974
180.0805-0.13480.09860.09346.76443.52071.8764-2.8411.888
190.0936-0.12220.10190.09656.32933.92191.9804-2.74812.0109
200.1065-0.12930.10540.09967.73464.39852.0973-3.0382.1392
210.1191-0.15610.1110.104611.81375.22242.2853-3.75452.3187
220.1313-0.13890.11380.107110.52415.75262.3985-3.54372.4412
230.1433-0.16030.1180.110914.6876.56482.5622-4.18632.5999
240.155-0.150.12070.113314.15457.19732.6828-4.10972.7257

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
13 & 0.0137 & -0.0373 & 0.0373 & 0.0366 & 0.3134 & 0 & 0 & -0.6115 & 0.6115 \tabularnewline
14 & 0.0265 & -0.0676 & 0.0524 & 0.051 & 1.1406 & 0.727 & 0.8527 & -1.1666 & 0.8891 \tabularnewline
15 & 0.0399 & -0.0976 & 0.0675 & 0.065 & 2.6077 & 1.3539 & 1.1636 & -1.764 & 1.1807 \tabularnewline
16 & 0.0536 & -0.1212 & 0.0809 & 0.0773 & 4.413 & 2.1187 & 1.4556 & -2.2947 & 1.4592 \tabularnewline
17 & 0.0671 & -0.1329 & 0.0913 & 0.0868 & 5.8851 & 2.872 & 1.6947 & -2.65 & 1.6974 \tabularnewline
18 & 0.0805 & -0.1348 & 0.0986 & 0.0934 & 6.7644 & 3.5207 & 1.8764 & -2.841 & 1.888 \tabularnewline
19 & 0.0936 & -0.1222 & 0.1019 & 0.0965 & 6.3293 & 3.9219 & 1.9804 & -2.7481 & 2.0109 \tabularnewline
20 & 0.1065 & -0.1293 & 0.1054 & 0.0996 & 7.7346 & 4.3985 & 2.0973 & -3.038 & 2.1392 \tabularnewline
21 & 0.1191 & -0.1561 & 0.111 & 0.1046 & 11.8137 & 5.2224 & 2.2853 & -3.7545 & 2.3187 \tabularnewline
22 & 0.1313 & -0.1389 & 0.1138 & 0.1071 & 10.5241 & 5.7526 & 2.3985 & -3.5437 & 2.4412 \tabularnewline
23 & 0.1433 & -0.1603 & 0.118 & 0.1109 & 14.687 & 6.5648 & 2.5622 & -4.1863 & 2.5999 \tabularnewline
24 & 0.155 & -0.15 & 0.1207 & 0.1133 & 14.1545 & 7.1973 & 2.6828 & -4.1097 & 2.7257 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=320083&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]sMAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][C]ScaledE[/C][C]MASE[/C][/ROW]
[ROW][C]13[/C][C]0.0137[/C][C]-0.0373[/C][C]0.0373[/C][C]0.0366[/C][C]0.3134[/C][C]0[/C][C]0[/C][C]-0.6115[/C][C]0.6115[/C][/ROW]
[ROW][C]14[/C][C]0.0265[/C][C]-0.0676[/C][C]0.0524[/C][C]0.051[/C][C]1.1406[/C][C]0.727[/C][C]0.8527[/C][C]-1.1666[/C][C]0.8891[/C][/ROW]
[ROW][C]15[/C][C]0.0399[/C][C]-0.0976[/C][C]0.0675[/C][C]0.065[/C][C]2.6077[/C][C]1.3539[/C][C]1.1636[/C][C]-1.764[/C][C]1.1807[/C][/ROW]
[ROW][C]16[/C][C]0.0536[/C][C]-0.1212[/C][C]0.0809[/C][C]0.0773[/C][C]4.413[/C][C]2.1187[/C][C]1.4556[/C][C]-2.2947[/C][C]1.4592[/C][/ROW]
[ROW][C]17[/C][C]0.0671[/C][C]-0.1329[/C][C]0.0913[/C][C]0.0868[/C][C]5.8851[/C][C]2.872[/C][C]1.6947[/C][C]-2.65[/C][C]1.6974[/C][/ROW]
[ROW][C]18[/C][C]0.0805[/C][C]-0.1348[/C][C]0.0986[/C][C]0.0934[/C][C]6.7644[/C][C]3.5207[/C][C]1.8764[/C][C]-2.841[/C][C]1.888[/C][/ROW]
[ROW][C]19[/C][C]0.0936[/C][C]-0.1222[/C][C]0.1019[/C][C]0.0965[/C][C]6.3293[/C][C]3.9219[/C][C]1.9804[/C][C]-2.7481[/C][C]2.0109[/C][/ROW]
[ROW][C]20[/C][C]0.1065[/C][C]-0.1293[/C][C]0.1054[/C][C]0.0996[/C][C]7.7346[/C][C]4.3985[/C][C]2.0973[/C][C]-3.038[/C][C]2.1392[/C][/ROW]
[ROW][C]21[/C][C]0.1191[/C][C]-0.1561[/C][C]0.111[/C][C]0.1046[/C][C]11.8137[/C][C]5.2224[/C][C]2.2853[/C][C]-3.7545[/C][C]2.3187[/C][/ROW]
[ROW][C]22[/C][C]0.1313[/C][C]-0.1389[/C][C]0.1138[/C][C]0.1071[/C][C]10.5241[/C][C]5.7526[/C][C]2.3985[/C][C]-3.5437[/C][C]2.4412[/C][/ROW]
[ROW][C]23[/C][C]0.1433[/C][C]-0.1603[/C][C]0.118[/C][C]0.1109[/C][C]14.687[/C][C]6.5648[/C][C]2.5622[/C][C]-4.1863[/C][C]2.5999[/C][/ROW]
[ROW][C]24[/C][C]0.155[/C][C]-0.15[/C][C]0.1207[/C][C]0.1133[/C][C]14.1545[/C][C]7.1973[/C][C]2.6828[/C][C]-4.1097[/C][C]2.7257[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=320083&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=320083&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.PEMAPEsMAPESq.EMSERMSEScaledEMASE
130.0137-0.03730.03730.03660.313400-0.61150.6115
140.0265-0.06760.05240.0511.14060.7270.8527-1.16660.8891
150.0399-0.09760.06750.0652.60771.35391.1636-1.7641.1807
160.0536-0.12120.08090.07734.4132.11871.4556-2.29471.4592
170.0671-0.13290.09130.08685.88512.8721.6947-2.651.6974
180.0805-0.13480.09860.09346.76443.52071.8764-2.8411.888
190.0936-0.12220.10190.09656.32933.92191.9804-2.74812.0109
200.1065-0.12930.10540.09967.73464.39852.0973-3.0382.1392
210.1191-0.15610.1110.104611.81375.22242.2853-3.75452.3187
220.1313-0.13890.11380.107110.52415.75262.3985-3.54372.4412
230.1433-0.16030.1180.110914.6876.56482.5622-4.18632.5999
240.155-0.150.12070.113314.15457.19732.6828-4.10972.7257



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 1 ; par6 = 1 ; par7 = 1 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 1 ; par6 = 1 ; par7 = 1 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
R code (references can be found in the software module):
par10 <- 'FALSE'
par9 <- '0'
par8 <- '0'
par7 <- '1'
par6 <- '1'
par5 <- '1'
par4 <- '0'
par3 <- '1'
par2 <- '1'
par1 <- '12'
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*2
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)
}
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.spe <- array(0, dim=fx)
perf.scalederr <- array(0, dim=fx)
perf.mase <- array(0, dim=fx)
perf.mase1 <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.smape <- array(0, dim=fx)
perf.mape1 <- array(0, dim=fx)
perf.smape1 <- 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)
perf.scaleddenom <- 0
for (i in 2:fx) {
perf.scaleddenom = perf.scaleddenom + abs(x[nx+i] - x[nx+i-1])
}
perf.scaleddenom = perf.scaleddenom / (fx-1)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.scalederr[i] = (x[nx+i] - forecast$pred[i]) / perf.scaleddenom
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / x[nx+i]
perf.spe[i] = 2*(x[nx+i] - forecast$pred[i]) / (x[nx+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.smape[1] = abs(perf.spe[1])
perf.mape1[1] = perf.mape[1]
perf.smape1[1] = perf.smape[1]
perf.mse[1] = perf.se[1]
perf.mase[1] = abs(perf.scalederr[1])
perf.mase1[1] = perf.mase[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.smape[i] = perf.smape[i-1] + abs(perf.spe[i])
perf.smape1[i] = perf.smape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
perf.mase[i] = perf.mase[i-1] + abs(perf.scalederr[i])
perf.mase1[i] = perf.mase[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<br />(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',10,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,'sMAPE',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.element(a,'ScaledE',1,header=TRUE)
a<-table.element(a,'MASE',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.smape1[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.element(a,round(perf.scalederr[i],4))
a<-table.element(a,round(perf.mase1[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')