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 computationTue, 08 Dec 2009 23:58:55 -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/09/t1260342689k48hvi3jld497vq.htm/, Retrieved Mon, 29 Apr 2024 10:19:51 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=64885, Retrieved Mon, 29 Apr 2024 10:19:51 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact167
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-07 09:54:52] [b98453cac15ba1066b407e146608df68]
- R PD    [ARIMA Forecasting] [Forecasting] [2009-12-09 06:58:55] [2ecea65fec1cd5f6b1ab182881aa2a91] [Current]
Feedback Forum

Post a new message
Dataseries X:
21
19
25
21
23
23
19
18
19
19
22
23
20
14
14
14
15
11
17
16
20
24
23
20
21
19
23
23
23
23
27
26
17
24
26
24
27
27
26
24
23
23
24
17
21
19
22
22
18
16
14
12
14
16
8
3
0
5
1
1
3




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64885&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'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[49])
3727-------
3827-------
3926-------
4024-------
4123-------
4223-------
4324-------
4417-------
4521-------
4619-------
4722-------
4822-------
4918-------
501619.630112.347424.86410.0870.72920.00290.7292
511420.2412.052325.96260.01630.92680.02430.7785
521220.201111.441726.17740.00360.9790.10640.7648
531420.453611.206726.66660.02090.99620.21090.7805
541620.605711.015926.97850.07830.97890.23070.7885
55820.513610.524827.03411e-040.91260.14730.775
56321.175711.533527.6369010.89740.8323
57020.987711.001527.5669010.49850.8133
58521.138911.152427.7368010.73740.8244
59120.903410.589627.6001010.37410.8023
60120.953310.602427.6708010.380.8056
61321.277611.166227.9426010.83240.8324

\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[49]) \tabularnewline
37 & 27 & - & - & - & - & - & - & - \tabularnewline
38 & 27 & - & - & - & - & - & - & - \tabularnewline
39 & 26 & - & - & - & - & - & - & - \tabularnewline
40 & 24 & - & - & - & - & - & - & - \tabularnewline
41 & 23 & - & - & - & - & - & - & - \tabularnewline
42 & 23 & - & - & - & - & - & - & - \tabularnewline
43 & 24 & - & - & - & - & - & - & - \tabularnewline
44 & 17 & - & - & - & - & - & - & - \tabularnewline
45 & 21 & - & - & - & - & - & - & - \tabularnewline
46 & 19 & - & - & - & - & - & - & - \tabularnewline
47 & 22 & - & - & - & - & - & - & - \tabularnewline
48 & 22 & - & - & - & - & - & - & - \tabularnewline
49 & 18 & - & - & - & - & - & - & - \tabularnewline
50 & 16 & 19.6301 & 12.3474 & 24.8641 & 0.087 & 0.7292 & 0.0029 & 0.7292 \tabularnewline
51 & 14 & 20.24 & 12.0523 & 25.9626 & 0.0163 & 0.9268 & 0.0243 & 0.7785 \tabularnewline
52 & 12 & 20.2011 & 11.4417 & 26.1774 & 0.0036 & 0.979 & 0.1064 & 0.7648 \tabularnewline
53 & 14 & 20.4536 & 11.2067 & 26.6666 & 0.0209 & 0.9962 & 0.2109 & 0.7805 \tabularnewline
54 & 16 & 20.6057 & 11.0159 & 26.9785 & 0.0783 & 0.9789 & 0.2307 & 0.7885 \tabularnewline
55 & 8 & 20.5136 & 10.5248 & 27.0341 & 1e-04 & 0.9126 & 0.1473 & 0.775 \tabularnewline
56 & 3 & 21.1757 & 11.5335 & 27.6369 & 0 & 1 & 0.8974 & 0.8323 \tabularnewline
57 & 0 & 20.9877 & 11.0015 & 27.5669 & 0 & 1 & 0.4985 & 0.8133 \tabularnewline
58 & 5 & 21.1389 & 11.1524 & 27.7368 & 0 & 1 & 0.7374 & 0.8244 \tabularnewline
59 & 1 & 20.9034 & 10.5896 & 27.6001 & 0 & 1 & 0.3741 & 0.8023 \tabularnewline
60 & 1 & 20.9533 & 10.6024 & 27.6708 & 0 & 1 & 0.38 & 0.8056 \tabularnewline
61 & 3 & 21.2776 & 11.1662 & 27.9426 & 0 & 1 & 0.8324 & 0.8324 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64885&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[49])[/C][/ROW]
[ROW][C]37[/C][C]27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]24[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]24[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]16[/C][C]19.6301[/C][C]12.3474[/C][C]24.8641[/C][C]0.087[/C][C]0.7292[/C][C]0.0029[/C][C]0.7292[/C][/ROW]
[ROW][C]51[/C][C]14[/C][C]20.24[/C][C]12.0523[/C][C]25.9626[/C][C]0.0163[/C][C]0.9268[/C][C]0.0243[/C][C]0.7785[/C][/ROW]
[ROW][C]52[/C][C]12[/C][C]20.2011[/C][C]11.4417[/C][C]26.1774[/C][C]0.0036[/C][C]0.979[/C][C]0.1064[/C][C]0.7648[/C][/ROW]
[ROW][C]53[/C][C]14[/C][C]20.4536[/C][C]11.2067[/C][C]26.6666[/C][C]0.0209[/C][C]0.9962[/C][C]0.2109[/C][C]0.7805[/C][/ROW]
[ROW][C]54[/C][C]16[/C][C]20.6057[/C][C]11.0159[/C][C]26.9785[/C][C]0.0783[/C][C]0.9789[/C][C]0.2307[/C][C]0.7885[/C][/ROW]
[ROW][C]55[/C][C]8[/C][C]20.5136[/C][C]10.5248[/C][C]27.0341[/C][C]1e-04[/C][C]0.9126[/C][C]0.1473[/C][C]0.775[/C][/ROW]
[ROW][C]56[/C][C]3[/C][C]21.1757[/C][C]11.5335[/C][C]27.6369[/C][C]0[/C][C]1[/C][C]0.8974[/C][C]0.8323[/C][/ROW]
[ROW][C]57[/C][C]0[/C][C]20.9877[/C][C]11.0015[/C][C]27.5669[/C][C]0[/C][C]1[/C][C]0.4985[/C][C]0.8133[/C][/ROW]
[ROW][C]58[/C][C]5[/C][C]21.1389[/C][C]11.1524[/C][C]27.7368[/C][C]0[/C][C]1[/C][C]0.7374[/C][C]0.8244[/C][/ROW]
[ROW][C]59[/C][C]1[/C][C]20.9034[/C][C]10.5896[/C][C]27.6001[/C][C]0[/C][C]1[/C][C]0.3741[/C][C]0.8023[/C][/ROW]
[ROW][C]60[/C][C]1[/C][C]20.9533[/C][C]10.6024[/C][C]27.6708[/C][C]0[/C][C]1[/C][C]0.38[/C][C]0.8056[/C][/ROW]
[ROW][C]61[/C][C]3[/C][C]21.2776[/C][C]11.1662[/C][C]27.9426[/C][C]0[/C][C]1[/C][C]0.8324[/C][C]0.8324[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64885&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64885&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[49])
3727-------
3827-------
3926-------
4024-------
4123-------
4223-------
4324-------
4417-------
4521-------
4619-------
4722-------
4822-------
4918-------
501619.630112.347424.86410.0870.72920.00290.7292
511420.2412.052325.96260.01630.92680.02430.7785
521220.201111.441726.17740.00360.9790.10640.7648
531420.453611.206726.66660.02090.99620.21090.7805
541620.605711.015926.97850.07830.97890.23070.7885
55820.513610.524827.03411e-040.91260.14730.775
56321.175711.533527.6369010.89740.8323
57020.987711.001527.5669010.49850.8133
58521.138911.152427.7368010.73740.8244
59120.903410.589627.6001010.37410.8023
60120.953310.602427.6708010.380.8056
61321.277611.166227.9426010.83240.8324







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.136-0.1849013.177300
510.1443-0.30830.246638.937226.05735.1046
520.1509-0.4060.299767.258439.7916.308
530.155-0.31550.303741.648640.25546.3447
540.1578-0.22350.287621.212336.44686.0371
550.1622-0.610.3414156.589456.47057.5147
560.1557-0.85830.4152330.356295.59719.7774
570.1599-10.4883440.4832138.707811.7774
580.1592-0.76350.5189260.4636152.236312.3384
590.1635-0.95220.5622396.1454176.627213.2901
600.1636-0.95230.5977398.1357196.764314.0273
610.1598-0.8590.6195334.0703208.206514.4294

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.136 & -0.1849 & 0 & 13.1773 & 0 & 0 \tabularnewline
51 & 0.1443 & -0.3083 & 0.2466 & 38.9372 & 26.0573 & 5.1046 \tabularnewline
52 & 0.1509 & -0.406 & 0.2997 & 67.2584 & 39.791 & 6.308 \tabularnewline
53 & 0.155 & -0.3155 & 0.3037 & 41.6486 & 40.2554 & 6.3447 \tabularnewline
54 & 0.1578 & -0.2235 & 0.2876 & 21.2123 & 36.4468 & 6.0371 \tabularnewline
55 & 0.1622 & -0.61 & 0.3414 & 156.5894 & 56.4705 & 7.5147 \tabularnewline
56 & 0.1557 & -0.8583 & 0.4152 & 330.3562 & 95.5971 & 9.7774 \tabularnewline
57 & 0.1599 & -1 & 0.4883 & 440.4832 & 138.7078 & 11.7774 \tabularnewline
58 & 0.1592 & -0.7635 & 0.5189 & 260.4636 & 152.2363 & 12.3384 \tabularnewline
59 & 0.1635 & -0.9522 & 0.5622 & 396.1454 & 176.6272 & 13.2901 \tabularnewline
60 & 0.1636 & -0.9523 & 0.5977 & 398.1357 & 196.7643 & 14.0273 \tabularnewline
61 & 0.1598 & -0.859 & 0.6195 & 334.0703 & 208.2065 & 14.4294 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64885&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]50[/C][C]0.136[/C][C]-0.1849[/C][C]0[/C][C]13.1773[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.1443[/C][C]-0.3083[/C][C]0.2466[/C][C]38.9372[/C][C]26.0573[/C][C]5.1046[/C][/ROW]
[ROW][C]52[/C][C]0.1509[/C][C]-0.406[/C][C]0.2997[/C][C]67.2584[/C][C]39.791[/C][C]6.308[/C][/ROW]
[ROW][C]53[/C][C]0.155[/C][C]-0.3155[/C][C]0.3037[/C][C]41.6486[/C][C]40.2554[/C][C]6.3447[/C][/ROW]
[ROW][C]54[/C][C]0.1578[/C][C]-0.2235[/C][C]0.2876[/C][C]21.2123[/C][C]36.4468[/C][C]6.0371[/C][/ROW]
[ROW][C]55[/C][C]0.1622[/C][C]-0.61[/C][C]0.3414[/C][C]156.5894[/C][C]56.4705[/C][C]7.5147[/C][/ROW]
[ROW][C]56[/C][C]0.1557[/C][C]-0.8583[/C][C]0.4152[/C][C]330.3562[/C][C]95.5971[/C][C]9.7774[/C][/ROW]
[ROW][C]57[/C][C]0.1599[/C][C]-1[/C][C]0.4883[/C][C]440.4832[/C][C]138.7078[/C][C]11.7774[/C][/ROW]
[ROW][C]58[/C][C]0.1592[/C][C]-0.7635[/C][C]0.5189[/C][C]260.4636[/C][C]152.2363[/C][C]12.3384[/C][/ROW]
[ROW][C]59[/C][C]0.1635[/C][C]-0.9522[/C][C]0.5622[/C][C]396.1454[/C][C]176.6272[/C][C]13.2901[/C][/ROW]
[ROW][C]60[/C][C]0.1636[/C][C]-0.9523[/C][C]0.5977[/C][C]398.1357[/C][C]196.7643[/C][C]14.0273[/C][/ROW]
[ROW][C]61[/C][C]0.1598[/C][C]-0.859[/C][C]0.6195[/C][C]334.0703[/C][C]208.2065[/C][C]14.4294[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64885&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64885&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
500.136-0.1849013.177300
510.1443-0.30830.246638.937226.05735.1046
520.1509-0.4060.299767.258439.7916.308
530.155-0.31550.303741.648640.25546.3447
540.1578-0.22350.287621.212336.44686.0371
550.1622-0.610.3414156.589456.47057.5147
560.1557-0.85830.4152330.356295.59719.7774
570.1599-10.4883440.4832138.707811.7774
580.1592-0.76350.5189260.4636152.236312.3384
590.1635-0.95220.5622396.1454176.627213.2901
600.1636-0.95230.5977398.1357196.764314.0273
610.1598-0.8590.6195334.0703208.206514.4294



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