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 computationWed, 31 Aug 2016 08:31:06 +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/2016/Aug/31/t14726287168mcqnsyukpcezxp.htm/, Retrieved Sun, 05 May 2024 16:00:58 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Sun, 05 May 2024 16:00:58 +0200
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact0
Dataseries X:
3035
2552
2704
2554
2014
1655
1721
1524
1596
2074
2199
2512
2933
2889
2938
2497
1870
1726
1607
1545
1396
1787
2076
2837
2787
3891
3179
2011
1636
1580
1489
1300
1356
1653
2013
2823
3102
2294
2385
2444
1748
1554
1498
1361
1346
1564
1640
2293
2815
3137
2679
1969
1870
1633
1529
1366
1357
1570
1535
2491
3084
2605
2573
2143
1693
1504
1461
1354
1333
1492
1781
1915




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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 time1 seconds
R Server'Gertrude Mary Cox' @ cox.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])
591535-------
602491-------
61308424911651.91643330.08360.0830.50.50.5
62260524911304.35663677.64340.42530.16370.16370.5
63257324911037.66463944.33540.4560.43890.43890.5
6421432491812.83294169.16710.34220.46190.46190.5
6516932491614.75214367.24790.20220.64190.64190.5
6615042491435.67344546.32660.17330.77670.77670.5
6714612491270.99364711.00640.18160.80820.80820.5
6813542491117.71334864.28670.17390.80250.80250.5
6913332491-26.25075008.25070.18360.8120.8120.5
7014922491-162.41525144.41520.23030.80380.80380.5
7117812491-291.92545273.92540.30850.75920.75920.5
7219152491-415.67075397.67070.34890.68390.68390.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[60]) \tabularnewline
59 & 1535 & - & - & - & - & - & - & - \tabularnewline
60 & 2491 & - & - & - & - & - & - & - \tabularnewline
61 & 3084 & 2491 & 1651.9164 & 3330.0836 & 0.083 & 0.5 & 0.5 & 0.5 \tabularnewline
62 & 2605 & 2491 & 1304.3566 & 3677.6434 & 0.4253 & 0.1637 & 0.1637 & 0.5 \tabularnewline
63 & 2573 & 2491 & 1037.6646 & 3944.3354 & 0.456 & 0.4389 & 0.4389 & 0.5 \tabularnewline
64 & 2143 & 2491 & 812.8329 & 4169.1671 & 0.3422 & 0.4619 & 0.4619 & 0.5 \tabularnewline
65 & 1693 & 2491 & 614.7521 & 4367.2479 & 0.2022 & 0.6419 & 0.6419 & 0.5 \tabularnewline
66 & 1504 & 2491 & 435.6734 & 4546.3266 & 0.1733 & 0.7767 & 0.7767 & 0.5 \tabularnewline
67 & 1461 & 2491 & 270.9936 & 4711.0064 & 0.1816 & 0.8082 & 0.8082 & 0.5 \tabularnewline
68 & 1354 & 2491 & 117.7133 & 4864.2867 & 0.1739 & 0.8025 & 0.8025 & 0.5 \tabularnewline
69 & 1333 & 2491 & -26.2507 & 5008.2507 & 0.1836 & 0.812 & 0.812 & 0.5 \tabularnewline
70 & 1492 & 2491 & -162.4152 & 5144.4152 & 0.2303 & 0.8038 & 0.8038 & 0.5 \tabularnewline
71 & 1781 & 2491 & -291.9254 & 5273.9254 & 0.3085 & 0.7592 & 0.7592 & 0.5 \tabularnewline
72 & 1915 & 2491 & -415.6707 & 5397.6707 & 0.3489 & 0.6839 & 0.6839 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&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]59[/C][C]1535[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]2491[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]3084[/C][C]2491[/C][C]1651.9164[/C][C]3330.0836[/C][C]0.083[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]62[/C][C]2605[/C][C]2491[/C][C]1304.3566[/C][C]3677.6434[/C][C]0.4253[/C][C]0.1637[/C][C]0.1637[/C][C]0.5[/C][/ROW]
[ROW][C]63[/C][C]2573[/C][C]2491[/C][C]1037.6646[/C][C]3944.3354[/C][C]0.456[/C][C]0.4389[/C][C]0.4389[/C][C]0.5[/C][/ROW]
[ROW][C]64[/C][C]2143[/C][C]2491[/C][C]812.8329[/C][C]4169.1671[/C][C]0.3422[/C][C]0.4619[/C][C]0.4619[/C][C]0.5[/C][/ROW]
[ROW][C]65[/C][C]1693[/C][C]2491[/C][C]614.7521[/C][C]4367.2479[/C][C]0.2022[/C][C]0.6419[/C][C]0.6419[/C][C]0.5[/C][/ROW]
[ROW][C]66[/C][C]1504[/C][C]2491[/C][C]435.6734[/C][C]4546.3266[/C][C]0.1733[/C][C]0.7767[/C][C]0.7767[/C][C]0.5[/C][/ROW]
[ROW][C]67[/C][C]1461[/C][C]2491[/C][C]270.9936[/C][C]4711.0064[/C][C]0.1816[/C][C]0.8082[/C][C]0.8082[/C][C]0.5[/C][/ROW]
[ROW][C]68[/C][C]1354[/C][C]2491[/C][C]117.7133[/C][C]4864.2867[/C][C]0.1739[/C][C]0.8025[/C][C]0.8025[/C][C]0.5[/C][/ROW]
[ROW][C]69[/C][C]1333[/C][C]2491[/C][C]-26.2507[/C][C]5008.2507[/C][C]0.1836[/C][C]0.812[/C][C]0.812[/C][C]0.5[/C][/ROW]
[ROW][C]70[/C][C]1492[/C][C]2491[/C][C]-162.4152[/C][C]5144.4152[/C][C]0.2303[/C][C]0.8038[/C][C]0.8038[/C][C]0.5[/C][/ROW]
[ROW][C]71[/C][C]1781[/C][C]2491[/C][C]-291.9254[/C][C]5273.9254[/C][C]0.3085[/C][C]0.7592[/C][C]0.7592[/C][C]0.5[/C][/ROW]
[ROW][C]72[/C][C]1915[/C][C]2491[/C][C]-415.6707[/C][C]5397.6707[/C][C]0.3489[/C][C]0.6839[/C][C]0.6839[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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])
591535-------
602491-------
61308424911651.91643330.08360.0830.50.50.5
62260524911304.35663677.64340.42530.16370.16370.5
63257324911037.66463944.33540.4560.43890.43890.5
6421432491812.83294169.16710.34220.46190.46190.5
6516932491614.75214367.24790.20220.64190.64190.5
6615042491435.67344546.32660.17330.77670.77670.5
6714612491270.99364711.00640.18160.80820.80820.5
6813542491117.71334864.28670.17390.80250.80250.5
6913332491-26.25075008.25070.18360.8120.8120.5
7014922491-162.41525144.41520.23030.80380.80380.5
7117812491-291.92545273.92540.30850.75920.75920.5
7219152491-415.67075397.67070.34890.68390.68390.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
610.17190.19230.19230.2127351649002.7962.796
620.2430.04380.1180.128712996182322.5426.99240.53751.6667
630.29770.03190.08930.09666724123789.6667351.83760.38661.24
640.3437-0.16240.10760.11121104123118.25350.8821-1.64081.3402
650.3843-0.47140.18030.1643636804225855.4475.2425-3.76251.8247
660.421-0.65620.25970.2193974169350574.3333592.0932-4.65372.2962
670.4547-0.7050.32330.26241060900452049.4286672.3462-4.85642.6619
680.4861-0.83970.38780.30351292769557139.375746.4177-5.36092.9993
690.5156-0.86870.44130.33711340964644231802.64-5.45993.2727
700.5435-0.66960.46410.3536998001679608824.3834-4.71023.4165
710.57-0.39870.45810.3516504100663652.7273814.6488-3.34763.4102
720.5953-0.30080.4450.3441331776635996.3333797.4938-2.71583.3523

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
61 & 0.1719 & 0.1923 & 0.1923 & 0.2127 & 351649 & 0 & 0 & 2.796 & 2.796 \tabularnewline
62 & 0.243 & 0.0438 & 0.118 & 0.1287 & 12996 & 182322.5 & 426.9924 & 0.5375 & 1.6667 \tabularnewline
63 & 0.2977 & 0.0319 & 0.0893 & 0.0966 & 6724 & 123789.6667 & 351.8376 & 0.3866 & 1.24 \tabularnewline
64 & 0.3437 & -0.1624 & 0.1076 & 0.11 & 121104 & 123118.25 & 350.8821 & -1.6408 & 1.3402 \tabularnewline
65 & 0.3843 & -0.4714 & 0.1803 & 0.1643 & 636804 & 225855.4 & 475.2425 & -3.7625 & 1.8247 \tabularnewline
66 & 0.421 & -0.6562 & 0.2597 & 0.2193 & 974169 & 350574.3333 & 592.0932 & -4.6537 & 2.2962 \tabularnewline
67 & 0.4547 & -0.705 & 0.3233 & 0.2624 & 1060900 & 452049.4286 & 672.3462 & -4.8564 & 2.6619 \tabularnewline
68 & 0.4861 & -0.8397 & 0.3878 & 0.3035 & 1292769 & 557139.375 & 746.4177 & -5.3609 & 2.9993 \tabularnewline
69 & 0.5156 & -0.8687 & 0.4413 & 0.3371 & 1340964 & 644231 & 802.64 & -5.4599 & 3.2727 \tabularnewline
70 & 0.5435 & -0.6696 & 0.4641 & 0.3536 & 998001 & 679608 & 824.3834 & -4.7102 & 3.4165 \tabularnewline
71 & 0.57 & -0.3987 & 0.4581 & 0.3516 & 504100 & 663652.7273 & 814.6488 & -3.3476 & 3.4102 \tabularnewline
72 & 0.5953 & -0.3008 & 0.445 & 0.3441 & 331776 & 635996.3333 & 797.4938 & -2.7158 & 3.3523 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&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]61[/C][C]0.1719[/C][C]0.1923[/C][C]0.1923[/C][C]0.2127[/C][C]351649[/C][C]0[/C][C]0[/C][C]2.796[/C][C]2.796[/C][/ROW]
[ROW][C]62[/C][C]0.243[/C][C]0.0438[/C][C]0.118[/C][C]0.1287[/C][C]12996[/C][C]182322.5[/C][C]426.9924[/C][C]0.5375[/C][C]1.6667[/C][/ROW]
[ROW][C]63[/C][C]0.2977[/C][C]0.0319[/C][C]0.0893[/C][C]0.0966[/C][C]6724[/C][C]123789.6667[/C][C]351.8376[/C][C]0.3866[/C][C]1.24[/C][/ROW]
[ROW][C]64[/C][C]0.3437[/C][C]-0.1624[/C][C]0.1076[/C][C]0.11[/C][C]121104[/C][C]123118.25[/C][C]350.8821[/C][C]-1.6408[/C][C]1.3402[/C][/ROW]
[ROW][C]65[/C][C]0.3843[/C][C]-0.4714[/C][C]0.1803[/C][C]0.1643[/C][C]636804[/C][C]225855.4[/C][C]475.2425[/C][C]-3.7625[/C][C]1.8247[/C][/ROW]
[ROW][C]66[/C][C]0.421[/C][C]-0.6562[/C][C]0.2597[/C][C]0.2193[/C][C]974169[/C][C]350574.3333[/C][C]592.0932[/C][C]-4.6537[/C][C]2.2962[/C][/ROW]
[ROW][C]67[/C][C]0.4547[/C][C]-0.705[/C][C]0.3233[/C][C]0.2624[/C][C]1060900[/C][C]452049.4286[/C][C]672.3462[/C][C]-4.8564[/C][C]2.6619[/C][/ROW]
[ROW][C]68[/C][C]0.4861[/C][C]-0.8397[/C][C]0.3878[/C][C]0.3035[/C][C]1292769[/C][C]557139.375[/C][C]746.4177[/C][C]-5.3609[/C][C]2.9993[/C][/ROW]
[ROW][C]69[/C][C]0.5156[/C][C]-0.8687[/C][C]0.4413[/C][C]0.3371[/C][C]1340964[/C][C]644231[/C][C]802.64[/C][C]-5.4599[/C][C]3.2727[/C][/ROW]
[ROW][C]70[/C][C]0.5435[/C][C]-0.6696[/C][C]0.4641[/C][C]0.3536[/C][C]998001[/C][C]679608[/C][C]824.3834[/C][C]-4.7102[/C][C]3.4165[/C][/ROW]
[ROW][C]71[/C][C]0.57[/C][C]-0.3987[/C][C]0.4581[/C][C]0.3516[/C][C]504100[/C][C]663652.7273[/C][C]814.6488[/C][C]-3.3476[/C][C]3.4102[/C][/ROW]
[ROW][C]72[/C][C]0.5953[/C][C]-0.3008[/C][C]0.445[/C][C]0.3441[/C][C]331776[/C][C]635996.3333[/C][C]797.4938[/C][C]-2.7158[/C][C]3.3523[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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
610.17190.19230.19230.2127351649002.7962.796
620.2430.04380.1180.128712996182322.5426.99240.53751.6667
630.29770.03190.08930.09666724123789.6667351.83760.38661.24
640.3437-0.16240.10760.11121104123118.25350.8821-1.64081.3402
650.3843-0.47140.18030.1643636804225855.4475.2425-3.76251.8247
660.421-0.65620.25970.2193974169350574.3333592.0932-4.65372.2962
670.4547-0.7050.32330.26241060900452049.4286672.3462-4.85642.6619
680.4861-0.83970.38780.30351292769557139.375746.4177-5.36092.9993
690.5156-0.86870.44130.33711340964644231802.64-5.45993.2727
700.5435-0.66960.46410.3536998001679608824.3834-4.71023.4165
710.57-0.39870.45810.3516504100663652.7273814.6488-3.34763.4102
720.5953-0.30080.4450.3441331776635996.3333797.4938-2.71583.3523



Parameters (Session):
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')