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 computationSun, 18 Dec 2016 14:31:53 +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/Dec/18/t1482067936eclu17ptax56k5h.htm/, Retrieved Thu, 09 May 2024 01:58:20 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=301074, Retrieved Thu, 09 May 2024 01:58:20 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact100
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Exponential Smoothing] [] [2016-12-18 12:31:12] [683f400e1b95307fc738e729f07c4fce]
- RM D    [ARIMA Forecasting] [] [2016-12-18 13:31:53] [404ac5ee4f7301873f6a96ef36861981] [Current]
- R P       [ARIMA Forecasting] [] [2016-12-19 19:45:05] [683f400e1b95307fc738e729f07c4fce]
Feedback Forum

Post a new message
Dataseries X:
2280
3640
3950
3860
3500
4740
3690
4810
6150
4530
4760
4670
3510
2990
3240
2700
2610
3280
3170
3440
4710
4320
3650
3340
3050
2960
2810
2670
2440
2580
2520
2860
3500
3460
3310
3050
2730
2760
2800
2490
2310
2350
2370
2560
2740
2830
3010
2500
2630
2270
2410
2210
2330
2690
3150
2330
2260
2330
2240
2230
2270
2220
2290
2240
2110
2240
2230
2320
2320
2540
2530
2400
2470
2290
2110
2050
2170
2070
2330
2190
2260
2300
2220
2220
2380
2280
2150
2190
2080
2120
2140
2130
2210
2210
2190
2160
2290
2270
2200
2120
2050
2080
2180
2070
2170
2240
2320
2250




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 time2 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301074&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]2 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=301074&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301074&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 time2 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[98])
952190-------
962160-------
972290-------
982270-------
9922002211.51291504.74032918.28550.48730.43560.55680.4356
10021202262.74991344.45553181.04420.38030.55330.47680.4938
10120502193.4671028.87273358.06120.40460.54920.44880.4488
10220802220.0725752.29963687.84550.42580.58980.51070.4734
10321802261.1921598.60633923.77790.46190.58460.56610.4959
10420702249.2974380.22384118.37090.42540.5290.58280.4913
10521702279.2356176.56014381.91120.45940.57730.57370.5034
10622402317.5806-5.36184640.52310.47390.54950.54620.516
10723202284.1912-241.76614810.14850.48890.51370.5660.5044
10822502259.82-536.35025055.99010.49730.48320.52510.4972

\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[98]) \tabularnewline
95 & 2190 & - & - & - & - & - & - & - \tabularnewline
96 & 2160 & - & - & - & - & - & - & - \tabularnewline
97 & 2290 & - & - & - & - & - & - & - \tabularnewline
98 & 2270 & - & - & - & - & - & - & - \tabularnewline
99 & 2200 & 2211.5129 & 1504.7403 & 2918.2855 & 0.4873 & 0.4356 & 0.5568 & 0.4356 \tabularnewline
100 & 2120 & 2262.7499 & 1344.4555 & 3181.0442 & 0.3803 & 0.5533 & 0.4768 & 0.4938 \tabularnewline
101 & 2050 & 2193.467 & 1028.8727 & 3358.0612 & 0.4046 & 0.5492 & 0.4488 & 0.4488 \tabularnewline
102 & 2080 & 2220.0725 & 752.2996 & 3687.8455 & 0.4258 & 0.5898 & 0.5107 & 0.4734 \tabularnewline
103 & 2180 & 2261.1921 & 598.6063 & 3923.7779 & 0.4619 & 0.5846 & 0.5661 & 0.4959 \tabularnewline
104 & 2070 & 2249.2974 & 380.2238 & 4118.3709 & 0.4254 & 0.529 & 0.5828 & 0.4913 \tabularnewline
105 & 2170 & 2279.2356 & 176.5601 & 4381.9112 & 0.4594 & 0.5773 & 0.5737 & 0.5034 \tabularnewline
106 & 2240 & 2317.5806 & -5.3618 & 4640.5231 & 0.4739 & 0.5495 & 0.5462 & 0.516 \tabularnewline
107 & 2320 & 2284.1912 & -241.7661 & 4810.1485 & 0.4889 & 0.5137 & 0.566 & 0.5044 \tabularnewline
108 & 2250 & 2259.82 & -536.3502 & 5055.9901 & 0.4973 & 0.4832 & 0.5251 & 0.4972 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301074&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[98])[/C][/ROW]
[ROW][C]95[/C][C]2190[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]2160[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]2290[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]2270[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]2200[/C][C]2211.5129[/C][C]1504.7403[/C][C]2918.2855[/C][C]0.4873[/C][C]0.4356[/C][C]0.5568[/C][C]0.4356[/C][/ROW]
[ROW][C]100[/C][C]2120[/C][C]2262.7499[/C][C]1344.4555[/C][C]3181.0442[/C][C]0.3803[/C][C]0.5533[/C][C]0.4768[/C][C]0.4938[/C][/ROW]
[ROW][C]101[/C][C]2050[/C][C]2193.467[/C][C]1028.8727[/C][C]3358.0612[/C][C]0.4046[/C][C]0.5492[/C][C]0.4488[/C][C]0.4488[/C][/ROW]
[ROW][C]102[/C][C]2080[/C][C]2220.0725[/C][C]752.2996[/C][C]3687.8455[/C][C]0.4258[/C][C]0.5898[/C][C]0.5107[/C][C]0.4734[/C][/ROW]
[ROW][C]103[/C][C]2180[/C][C]2261.1921[/C][C]598.6063[/C][C]3923.7779[/C][C]0.4619[/C][C]0.5846[/C][C]0.5661[/C][C]0.4959[/C][/ROW]
[ROW][C]104[/C][C]2070[/C][C]2249.2974[/C][C]380.2238[/C][C]4118.3709[/C][C]0.4254[/C][C]0.529[/C][C]0.5828[/C][C]0.4913[/C][/ROW]
[ROW][C]105[/C][C]2170[/C][C]2279.2356[/C][C]176.5601[/C][C]4381.9112[/C][C]0.4594[/C][C]0.5773[/C][C]0.5737[/C][C]0.5034[/C][/ROW]
[ROW][C]106[/C][C]2240[/C][C]2317.5806[/C][C]-5.3618[/C][C]4640.5231[/C][C]0.4739[/C][C]0.5495[/C][C]0.5462[/C][C]0.516[/C][/ROW]
[ROW][C]107[/C][C]2320[/C][C]2284.1912[/C][C]-241.7661[/C][C]4810.1485[/C][C]0.4889[/C][C]0.5137[/C][C]0.566[/C][C]0.5044[/C][/ROW]
[ROW][C]108[/C][C]2250[/C][C]2259.82[/C][C]-536.3502[/C][C]5055.9901[/C][C]0.4973[/C][C]0.4832[/C][C]0.5251[/C][C]0.4972[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=301074&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301074&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[98])
952190-------
962160-------
972290-------
982270-------
9922002211.51291504.74032918.28550.48730.43560.55680.4356
10021202262.74991344.45553181.04420.38030.55330.47680.4938
10120502193.4671028.87273358.06120.40460.54920.44880.4488
10220802220.0725752.29963687.84550.42580.58980.51070.4734
10321802261.1921598.60633923.77790.46190.58460.56610.4959
10420702249.2974380.22384118.37090.42540.5290.58280.4913
10521702279.2356176.56014381.91120.45940.57730.57370.5034
10622402317.5806-5.36184640.52310.47390.54950.54620.516
10723202284.1912-241.76614810.14850.48890.51370.5660.5044
10822502259.82-536.35025055.99010.49730.48320.52510.4972







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
990.1631-0.00520.00520.0052132.547300-0.14590.1459
1000.2071-0.06730.03630.035220377.521310255.0343101.2671-1.80950.9777
1010.2709-0.070.04750.04620582.772313697.6136117.0368-1.81861.258
1020.3373-0.06730.05250.050819620.314815178.2889123.2002-1.77561.3874
1030.3751-0.03720.04940.04796592.152713461.0617116.0218-1.02921.3158
1040.424-0.08660.05560.053832147.544516575.4755128.7458-2.27281.4753
1050.4707-0.05030.05490.053111932.419415912.1817126.1435-1.38471.4623
1060.5114-0.03460.05230.05076018.753614675.5032121.1425-0.98341.4025
1070.56420.01540.04820.04681282.272513187.3665114.83630.45391.2971
1080.6313-0.00440.04390.042696.431511878.273108.9875-0.12451.1798

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
99 & 0.1631 & -0.0052 & 0.0052 & 0.0052 & 132.5473 & 0 & 0 & -0.1459 & 0.1459 \tabularnewline
100 & 0.2071 & -0.0673 & 0.0363 & 0.0352 & 20377.5213 & 10255.0343 & 101.2671 & -1.8095 & 0.9777 \tabularnewline
101 & 0.2709 & -0.07 & 0.0475 & 0.046 & 20582.7723 & 13697.6136 & 117.0368 & -1.8186 & 1.258 \tabularnewline
102 & 0.3373 & -0.0673 & 0.0525 & 0.0508 & 19620.3148 & 15178.2889 & 123.2002 & -1.7756 & 1.3874 \tabularnewline
103 & 0.3751 & -0.0372 & 0.0494 & 0.0479 & 6592.1527 & 13461.0617 & 116.0218 & -1.0292 & 1.3158 \tabularnewline
104 & 0.424 & -0.0866 & 0.0556 & 0.0538 & 32147.5445 & 16575.4755 & 128.7458 & -2.2728 & 1.4753 \tabularnewline
105 & 0.4707 & -0.0503 & 0.0549 & 0.0531 & 11932.4194 & 15912.1817 & 126.1435 & -1.3847 & 1.4623 \tabularnewline
106 & 0.5114 & -0.0346 & 0.0523 & 0.0507 & 6018.7536 & 14675.5032 & 121.1425 & -0.9834 & 1.4025 \tabularnewline
107 & 0.5642 & 0.0154 & 0.0482 & 0.0468 & 1282.2725 & 13187.3665 & 114.8363 & 0.4539 & 1.2971 \tabularnewline
108 & 0.6313 & -0.0044 & 0.0439 & 0.0426 & 96.4315 & 11878.273 & 108.9875 & -0.1245 & 1.1798 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301074&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]99[/C][C]0.1631[/C][C]-0.0052[/C][C]0.0052[/C][C]0.0052[/C][C]132.5473[/C][C]0[/C][C]0[/C][C]-0.1459[/C][C]0.1459[/C][/ROW]
[ROW][C]100[/C][C]0.2071[/C][C]-0.0673[/C][C]0.0363[/C][C]0.0352[/C][C]20377.5213[/C][C]10255.0343[/C][C]101.2671[/C][C]-1.8095[/C][C]0.9777[/C][/ROW]
[ROW][C]101[/C][C]0.2709[/C][C]-0.07[/C][C]0.0475[/C][C]0.046[/C][C]20582.7723[/C][C]13697.6136[/C][C]117.0368[/C][C]-1.8186[/C][C]1.258[/C][/ROW]
[ROW][C]102[/C][C]0.3373[/C][C]-0.0673[/C][C]0.0525[/C][C]0.0508[/C][C]19620.3148[/C][C]15178.2889[/C][C]123.2002[/C][C]-1.7756[/C][C]1.3874[/C][/ROW]
[ROW][C]103[/C][C]0.3751[/C][C]-0.0372[/C][C]0.0494[/C][C]0.0479[/C][C]6592.1527[/C][C]13461.0617[/C][C]116.0218[/C][C]-1.0292[/C][C]1.3158[/C][/ROW]
[ROW][C]104[/C][C]0.424[/C][C]-0.0866[/C][C]0.0556[/C][C]0.0538[/C][C]32147.5445[/C][C]16575.4755[/C][C]128.7458[/C][C]-2.2728[/C][C]1.4753[/C][/ROW]
[ROW][C]105[/C][C]0.4707[/C][C]-0.0503[/C][C]0.0549[/C][C]0.0531[/C][C]11932.4194[/C][C]15912.1817[/C][C]126.1435[/C][C]-1.3847[/C][C]1.4623[/C][/ROW]
[ROW][C]106[/C][C]0.5114[/C][C]-0.0346[/C][C]0.0523[/C][C]0.0507[/C][C]6018.7536[/C][C]14675.5032[/C][C]121.1425[/C][C]-0.9834[/C][C]1.4025[/C][/ROW]
[ROW][C]107[/C][C]0.5642[/C][C]0.0154[/C][C]0.0482[/C][C]0.0468[/C][C]1282.2725[/C][C]13187.3665[/C][C]114.8363[/C][C]0.4539[/C][C]1.2971[/C][/ROW]
[ROW][C]108[/C][C]0.6313[/C][C]-0.0044[/C][C]0.0439[/C][C]0.0426[/C][C]96.4315[/C][C]11878.273[/C][C]108.9875[/C][C]-0.1245[/C][C]1.1798[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=301074&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301074&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
990.1631-0.00520.00520.0052132.547300-0.14590.1459
1000.2071-0.06730.03630.035220377.521310255.0343101.2671-1.80950.9777
1010.2709-0.070.04750.04620582.772313697.6136117.0368-1.81861.258
1020.3373-0.06730.05250.050819620.314815178.2889123.2002-1.77561.3874
1030.3751-0.03720.04940.04796592.152713461.0617116.0218-1.02921.3158
1040.424-0.08660.05560.053832147.544516575.4755128.7458-2.27281.4753
1050.4707-0.05030.05490.053111932.419415912.1817126.1435-1.38471.4623
1060.5114-0.03460.05230.05076018.753614675.5032121.1425-0.98341.4025
1070.56420.01540.04820.04681282.272513187.3665114.83630.45391.2971
1080.6313-0.00440.04390.042696.431511878.273108.9875-0.12451.1798



Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = additive ; par4 = 12 ;
Parameters (R input):
par1 = 10 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 3 ; par6 = 3 ; par7 = 2 ; par8 = 2 ; par9 = 1 ; 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*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
(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')