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, 03 Sep 2015 08:58:41 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2015/Sep/03/t14412671275nhfso02m1xiazy.htm/, Retrieved Thu, 16 May 2024 19:57:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=280575, Retrieved Thu, 16 May 2024 19:57:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact58
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2015-09-03 07:58:41] [e9774d91d06602b4e3bbce6871390c37] [Current]
Feedback Forum

Post a new message
Dataseries X:
1.4
1.5
1.8
1.8
1.8
1.7
1.5
1.1
1.3
1.6
1.9
1.9
2
2.2
2.2
2
2.3
2.6
3.2
3.2
3.1
2.8
2.3
1.9
1.9
2
2
1.8
1.6
1.4
0.2
0.3
0.4
0.7
1
1.1
0.8
0.8
1
1.1
1
0.8
1.6
1.5
1.6
1.6
1.6
1.9
2
1.9
2
2.1
2.3
2.3
2.6
2.6
2.7
2.6
2.6
2.4
2.5
2.5
2.5
2.4
2.1
2.1
2.3
2.3
2.3
2.9
2.8
2.9
3
3
2.9
2.6
2.8
2.9
3.1
2.8
2.4
1.6
1.5
1.7




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=280575&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' @ jenkins.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[72])
712.8-------
722.9-------
7332.92.37213.42790.35520.50.50.5
7432.92.15353.64650.39640.39640.39640.5
752.92.91.98573.81430.50.41510.41510.5
762.62.91.84433.95570.28880.50.50.5
772.82.91.71964.08040.43410.69080.69080.5
782.92.91.6074.1930.50.56020.56020.5
793.12.91.50344.29660.38950.50.50.5
802.82.91.40694.39310.44780.39640.39640.5
812.42.91.31644.48360.2680.54930.54930.5
821.62.91.23074.56930.06350.72140.72140.5
831.52.91.14924.65080.05850.92720.92720.5
841.72.91.07144.72860.09920.93330.93330.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[72]) \tabularnewline
71 & 2.8 & - & - & - & - & - & - & - \tabularnewline
72 & 2.9 & - & - & - & - & - & - & - \tabularnewline
73 & 3 & 2.9 & 2.3721 & 3.4279 & 0.3552 & 0.5 & 0.5 & 0.5 \tabularnewline
74 & 3 & 2.9 & 2.1535 & 3.6465 & 0.3964 & 0.3964 & 0.3964 & 0.5 \tabularnewline
75 & 2.9 & 2.9 & 1.9857 & 3.8143 & 0.5 & 0.4151 & 0.4151 & 0.5 \tabularnewline
76 & 2.6 & 2.9 & 1.8443 & 3.9557 & 0.2888 & 0.5 & 0.5 & 0.5 \tabularnewline
77 & 2.8 & 2.9 & 1.7196 & 4.0804 & 0.4341 & 0.6908 & 0.6908 & 0.5 \tabularnewline
78 & 2.9 & 2.9 & 1.607 & 4.193 & 0.5 & 0.5602 & 0.5602 & 0.5 \tabularnewline
79 & 3.1 & 2.9 & 1.5034 & 4.2966 & 0.3895 & 0.5 & 0.5 & 0.5 \tabularnewline
80 & 2.8 & 2.9 & 1.4069 & 4.3931 & 0.4478 & 0.3964 & 0.3964 & 0.5 \tabularnewline
81 & 2.4 & 2.9 & 1.3164 & 4.4836 & 0.268 & 0.5493 & 0.5493 & 0.5 \tabularnewline
82 & 1.6 & 2.9 & 1.2307 & 4.5693 & 0.0635 & 0.7214 & 0.7214 & 0.5 \tabularnewline
83 & 1.5 & 2.9 & 1.1492 & 4.6508 & 0.0585 & 0.9272 & 0.9272 & 0.5 \tabularnewline
84 & 1.7 & 2.9 & 1.0714 & 4.7286 & 0.0992 & 0.9333 & 0.9333 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=280575&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[72])[/C][/ROW]
[ROW][C]71[/C][C]2.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]2.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]3[/C][C]2.9[/C][C]2.3721[/C][C]3.4279[/C][C]0.3552[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]74[/C][C]3[/C][C]2.9[/C][C]2.1535[/C][C]3.6465[/C][C]0.3964[/C][C]0.3964[/C][C]0.3964[/C][C]0.5[/C][/ROW]
[ROW][C]75[/C][C]2.9[/C][C]2.9[/C][C]1.9857[/C][C]3.8143[/C][C]0.5[/C][C]0.4151[/C][C]0.4151[/C][C]0.5[/C][/ROW]
[ROW][C]76[/C][C]2.6[/C][C]2.9[/C][C]1.8443[/C][C]3.9557[/C][C]0.2888[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]77[/C][C]2.8[/C][C]2.9[/C][C]1.7196[/C][C]4.0804[/C][C]0.4341[/C][C]0.6908[/C][C]0.6908[/C][C]0.5[/C][/ROW]
[ROW][C]78[/C][C]2.9[/C][C]2.9[/C][C]1.607[/C][C]4.193[/C][C]0.5[/C][C]0.5602[/C][C]0.5602[/C][C]0.5[/C][/ROW]
[ROW][C]79[/C][C]3.1[/C][C]2.9[/C][C]1.5034[/C][C]4.2966[/C][C]0.3895[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]80[/C][C]2.8[/C][C]2.9[/C][C]1.4069[/C][C]4.3931[/C][C]0.4478[/C][C]0.3964[/C][C]0.3964[/C][C]0.5[/C][/ROW]
[ROW][C]81[/C][C]2.4[/C][C]2.9[/C][C]1.3164[/C][C]4.4836[/C][C]0.268[/C][C]0.5493[/C][C]0.5493[/C][C]0.5[/C][/ROW]
[ROW][C]82[/C][C]1.6[/C][C]2.9[/C][C]1.2307[/C][C]4.5693[/C][C]0.0635[/C][C]0.7214[/C][C]0.7214[/C][C]0.5[/C][/ROW]
[ROW][C]83[/C][C]1.5[/C][C]2.9[/C][C]1.1492[/C][C]4.6508[/C][C]0.0585[/C][C]0.9272[/C][C]0.9272[/C][C]0.5[/C][/ROW]
[ROW][C]84[/C][C]1.7[/C][C]2.9[/C][C]1.0714[/C][C]4.7286[/C][C]0.0992[/C][C]0.9333[/C][C]0.9333[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=280575&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=280575&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[72])
712.8-------
722.9-------
7332.92.37213.42790.35520.50.50.5
7432.92.15353.64650.39640.39640.39640.5
752.92.91.98573.81430.50.41510.41510.5
762.62.91.84433.95570.28880.50.50.5
772.82.91.71964.08040.43410.69080.69080.5
782.92.91.6074.1930.50.56020.56020.5
793.12.91.50344.29660.38950.50.50.5
802.82.91.40694.39310.44780.39640.39640.5
812.42.91.31644.48360.2680.54930.54930.5
821.62.91.23074.56930.06350.72140.72140.5
831.52.91.14924.65080.05850.92720.92720.5
841.72.91.07144.72860.09920.93330.93330.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
730.09290.03330.03330.03390.01000.40740.4074
740.13130.03330.03330.03390.010.010.10.40740.4074
750.160900.02220.022600.00670.081600.2716
760.1857-0.11540.04550.04420.090.02750.1658-1.22220.5093
770.2077-0.03570.04360.04240.010.0240.1549-0.40740.4889
780.227500.03630.035300.020.141400.4074
790.24570.06450.04030.03980.040.02290.15120.81480.4656
800.2627-0.03570.03970.03920.010.02130.1458-0.40740.4583
810.2786-0.20830.05850.05580.250.04670.216-2.0370.6337
820.2937-0.81250.13390.1081.690.2110.4593-5.29631.1
830.308-0.93330.20660.15611.960.370.6083-5.70371.5185
840.3217-0.70590.24820.18651.440.45920.6776-4.88891.7994

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
73 & 0.0929 & 0.0333 & 0.0333 & 0.0339 & 0.01 & 0 & 0 & 0.4074 & 0.4074 \tabularnewline
74 & 0.1313 & 0.0333 & 0.0333 & 0.0339 & 0.01 & 0.01 & 0.1 & 0.4074 & 0.4074 \tabularnewline
75 & 0.1609 & 0 & 0.0222 & 0.0226 & 0 & 0.0067 & 0.0816 & 0 & 0.2716 \tabularnewline
76 & 0.1857 & -0.1154 & 0.0455 & 0.0442 & 0.09 & 0.0275 & 0.1658 & -1.2222 & 0.5093 \tabularnewline
77 & 0.2077 & -0.0357 & 0.0436 & 0.0424 & 0.01 & 0.024 & 0.1549 & -0.4074 & 0.4889 \tabularnewline
78 & 0.2275 & 0 & 0.0363 & 0.0353 & 0 & 0.02 & 0.1414 & 0 & 0.4074 \tabularnewline
79 & 0.2457 & 0.0645 & 0.0403 & 0.0398 & 0.04 & 0.0229 & 0.1512 & 0.8148 & 0.4656 \tabularnewline
80 & 0.2627 & -0.0357 & 0.0397 & 0.0392 & 0.01 & 0.0213 & 0.1458 & -0.4074 & 0.4583 \tabularnewline
81 & 0.2786 & -0.2083 & 0.0585 & 0.0558 & 0.25 & 0.0467 & 0.216 & -2.037 & 0.6337 \tabularnewline
82 & 0.2937 & -0.8125 & 0.1339 & 0.108 & 1.69 & 0.211 & 0.4593 & -5.2963 & 1.1 \tabularnewline
83 & 0.308 & -0.9333 & 0.2066 & 0.1561 & 1.96 & 0.37 & 0.6083 & -5.7037 & 1.5185 \tabularnewline
84 & 0.3217 & -0.7059 & 0.2482 & 0.1865 & 1.44 & 0.4592 & 0.6776 & -4.8889 & 1.7994 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=280575&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]73[/C][C]0.0929[/C][C]0.0333[/C][C]0.0333[/C][C]0.0339[/C][C]0.01[/C][C]0[/C][C]0[/C][C]0.4074[/C][C]0.4074[/C][/ROW]
[ROW][C]74[/C][C]0.1313[/C][C]0.0333[/C][C]0.0333[/C][C]0.0339[/C][C]0.01[/C][C]0.01[/C][C]0.1[/C][C]0.4074[/C][C]0.4074[/C][/ROW]
[ROW][C]75[/C][C]0.1609[/C][C]0[/C][C]0.0222[/C][C]0.0226[/C][C]0[/C][C]0.0067[/C][C]0.0816[/C][C]0[/C][C]0.2716[/C][/ROW]
[ROW][C]76[/C][C]0.1857[/C][C]-0.1154[/C][C]0.0455[/C][C]0.0442[/C][C]0.09[/C][C]0.0275[/C][C]0.1658[/C][C]-1.2222[/C][C]0.5093[/C][/ROW]
[ROW][C]77[/C][C]0.2077[/C][C]-0.0357[/C][C]0.0436[/C][C]0.0424[/C][C]0.01[/C][C]0.024[/C][C]0.1549[/C][C]-0.4074[/C][C]0.4889[/C][/ROW]
[ROW][C]78[/C][C]0.2275[/C][C]0[/C][C]0.0363[/C][C]0.0353[/C][C]0[/C][C]0.02[/C][C]0.1414[/C][C]0[/C][C]0.4074[/C][/ROW]
[ROW][C]79[/C][C]0.2457[/C][C]0.0645[/C][C]0.0403[/C][C]0.0398[/C][C]0.04[/C][C]0.0229[/C][C]0.1512[/C][C]0.8148[/C][C]0.4656[/C][/ROW]
[ROW][C]80[/C][C]0.2627[/C][C]-0.0357[/C][C]0.0397[/C][C]0.0392[/C][C]0.01[/C][C]0.0213[/C][C]0.1458[/C][C]-0.4074[/C][C]0.4583[/C][/ROW]
[ROW][C]81[/C][C]0.2786[/C][C]-0.2083[/C][C]0.0585[/C][C]0.0558[/C][C]0.25[/C][C]0.0467[/C][C]0.216[/C][C]-2.037[/C][C]0.6337[/C][/ROW]
[ROW][C]82[/C][C]0.2937[/C][C]-0.8125[/C][C]0.1339[/C][C]0.108[/C][C]1.69[/C][C]0.211[/C][C]0.4593[/C][C]-5.2963[/C][C]1.1[/C][/ROW]
[ROW][C]83[/C][C]0.308[/C][C]-0.9333[/C][C]0.2066[/C][C]0.1561[/C][C]1.96[/C][C]0.37[/C][C]0.6083[/C][C]-5.7037[/C][C]1.5185[/C][/ROW]
[ROW][C]84[/C][C]0.3217[/C][C]-0.7059[/C][C]0.2482[/C][C]0.1865[/C][C]1.44[/C][C]0.4592[/C][C]0.6776[/C][C]-4.8889[/C][C]1.7994[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=280575&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=280575&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
730.09290.03330.03330.03390.01000.40740.4074
740.13130.03330.03330.03390.010.010.10.40740.4074
750.160900.02220.022600.00670.081600.2716
760.1857-0.11540.04550.04420.090.02750.1658-1.22220.5093
770.2077-0.03570.04360.04240.010.0240.1549-0.40740.4889
780.227500.03630.035300.020.141400.4074
790.24570.06450.04030.03980.040.02290.15120.81480.4656
800.2627-0.03570.03970.03920.010.02130.1458-0.40740.4583
810.2786-0.20830.05850.05580.250.04670.216-2.0370.6337
820.2937-0.81250.13390.1081.690.2110.4593-5.29631.1
830.308-0.93330.20660.15611.960.370.6083-5.70371.5185
840.3217-0.70590.24820.18651.440.45920.6776-4.88891.7994



Parameters (Session):
par1 = 9 ; par2 = 0.36 ; par3 = 5.35 ; par4 = 5.2 ; par5 = 0.1 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 1 ; 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.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
(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')