Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 07 Dec 2007 06:53:30 -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/2007/Dec/07/t1197034844mdat3vshfvbeumb.htm/, Retrieved Mon, 29 Apr 2024 01:47:46 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2827, Retrieved Mon, 29 Apr 2024 01:47:46 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact185
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [arima forecast] [2007-12-07 13:53:30] [48417d3bca90ce1366e1b8b67acac5c5] [Current]
Feedback Forum

Post a new message
Dataseries X:
130
124
93
95
102
105
111
117
116
123
134
149
150
144
112
111
114
117
123
125
132
137
147
157
157
149
113
112
117
122
127
130
135
139
149
161




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\begin{tabular}{lllllllll}
\hline
Summary of compuational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2827&T=0

[TABLE]
[ROW][C]Summary of compuational 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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2827&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2827&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[24])
12149-------
13150-------
14144-------
15112-------
16111-------
17114-------
18117-------
19123-------
20125-------
21132-------
22137-------
23147-------
24157-------
25157159.5907149.913169.89320.31110.68890.9660.6889
26149153.6996142.6434165.61280.21970.29360.94470.2936
27113121.7326111.8079132.53820.056600.96120
28112118.84108.1458130.59180.1270.8350.90450
29117119.3781107.7242132.29270.35910.86860.79280
30122122.3365109.538136.63050.48160.76780.76780
31127128.2551114.0056144.28580.4390.77780.73972e-04
32130127.9897112.9933144.97630.40830.54550.63494e-04
33135139.4776122.3387159.01750.32670.82910.77340.0394
34139143.2246124.851164.30220.34720.77780.71860.1001
35149152.5201132.1697176.00390.38450.87040.67750.3542
36161159.657137.5705185.28940.45910.79240.58050.5805

\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[24]) \tabularnewline
12 & 149 & - & - & - & - & - & - & - \tabularnewline
13 & 150 & - & - & - & - & - & - & - \tabularnewline
14 & 144 & - & - & - & - & - & - & - \tabularnewline
15 & 112 & - & - & - & - & - & - & - \tabularnewline
16 & 111 & - & - & - & - & - & - & - \tabularnewline
17 & 114 & - & - & - & - & - & - & - \tabularnewline
18 & 117 & - & - & - & - & - & - & - \tabularnewline
19 & 123 & - & - & - & - & - & - & - \tabularnewline
20 & 125 & - & - & - & - & - & - & - \tabularnewline
21 & 132 & - & - & - & - & - & - & - \tabularnewline
22 & 137 & - & - & - & - & - & - & - \tabularnewline
23 & 147 & - & - & - & - & - & - & - \tabularnewline
24 & 157 & - & - & - & - & - & - & - \tabularnewline
25 & 157 & 159.5907 & 149.913 & 169.8932 & 0.3111 & 0.6889 & 0.966 & 0.6889 \tabularnewline
26 & 149 & 153.6996 & 142.6434 & 165.6128 & 0.2197 & 0.2936 & 0.9447 & 0.2936 \tabularnewline
27 & 113 & 121.7326 & 111.8079 & 132.5382 & 0.0566 & 0 & 0.9612 & 0 \tabularnewline
28 & 112 & 118.84 & 108.1458 & 130.5918 & 0.127 & 0.835 & 0.9045 & 0 \tabularnewline
29 & 117 & 119.3781 & 107.7242 & 132.2927 & 0.3591 & 0.8686 & 0.7928 & 0 \tabularnewline
30 & 122 & 122.3365 & 109.538 & 136.6305 & 0.4816 & 0.7678 & 0.7678 & 0 \tabularnewline
31 & 127 & 128.2551 & 114.0056 & 144.2858 & 0.439 & 0.7778 & 0.7397 & 2e-04 \tabularnewline
32 & 130 & 127.9897 & 112.9933 & 144.9763 & 0.4083 & 0.5455 & 0.6349 & 4e-04 \tabularnewline
33 & 135 & 139.4776 & 122.3387 & 159.0175 & 0.3267 & 0.8291 & 0.7734 & 0.0394 \tabularnewline
34 & 139 & 143.2246 & 124.851 & 164.3022 & 0.3472 & 0.7778 & 0.7186 & 0.1001 \tabularnewline
35 & 149 & 152.5201 & 132.1697 & 176.0039 & 0.3845 & 0.8704 & 0.6775 & 0.3542 \tabularnewline
36 & 161 & 159.657 & 137.5705 & 185.2894 & 0.4591 & 0.7924 & 0.5805 & 0.5805 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2827&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[24])[/C][/ROW]
[ROW][C]12[/C][C]149[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]13[/C][C]150[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]14[/C][C]144[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]15[/C][C]112[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]16[/C][C]111[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]17[/C][C]114[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]18[/C][C]117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]19[/C][C]123[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]20[/C][C]125[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]21[/C][C]132[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]22[/C][C]137[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]23[/C][C]147[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]24[/C][C]157[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]157[/C][C]159.5907[/C][C]149.913[/C][C]169.8932[/C][C]0.3111[/C][C]0.6889[/C][C]0.966[/C][C]0.6889[/C][/ROW]
[ROW][C]26[/C][C]149[/C][C]153.6996[/C][C]142.6434[/C][C]165.6128[/C][C]0.2197[/C][C]0.2936[/C][C]0.9447[/C][C]0.2936[/C][/ROW]
[ROW][C]27[/C][C]113[/C][C]121.7326[/C][C]111.8079[/C][C]132.5382[/C][C]0.0566[/C][C]0[/C][C]0.9612[/C][C]0[/C][/ROW]
[ROW][C]28[/C][C]112[/C][C]118.84[/C][C]108.1458[/C][C]130.5918[/C][C]0.127[/C][C]0.835[/C][C]0.9045[/C][C]0[/C][/ROW]
[ROW][C]29[/C][C]117[/C][C]119.3781[/C][C]107.7242[/C][C]132.2927[/C][C]0.3591[/C][C]0.8686[/C][C]0.7928[/C][C]0[/C][/ROW]
[ROW][C]30[/C][C]122[/C][C]122.3365[/C][C]109.538[/C][C]136.6305[/C][C]0.4816[/C][C]0.7678[/C][C]0.7678[/C][C]0[/C][/ROW]
[ROW][C]31[/C][C]127[/C][C]128.2551[/C][C]114.0056[/C][C]144.2858[/C][C]0.439[/C][C]0.7778[/C][C]0.7397[/C][C]2e-04[/C][/ROW]
[ROW][C]32[/C][C]130[/C][C]127.9897[/C][C]112.9933[/C][C]144.9763[/C][C]0.4083[/C][C]0.5455[/C][C]0.6349[/C][C]4e-04[/C][/ROW]
[ROW][C]33[/C][C]135[/C][C]139.4776[/C][C]122.3387[/C][C]159.0175[/C][C]0.3267[/C][C]0.8291[/C][C]0.7734[/C][C]0.0394[/C][/ROW]
[ROW][C]34[/C][C]139[/C][C]143.2246[/C][C]124.851[/C][C]164.3022[/C][C]0.3472[/C][C]0.7778[/C][C]0.7186[/C][C]0.1001[/C][/ROW]
[ROW][C]35[/C][C]149[/C][C]152.5201[/C][C]132.1697[/C][C]176.0039[/C][C]0.3845[/C][C]0.8704[/C][C]0.6775[/C][C]0.3542[/C][/ROW]
[ROW][C]36[/C][C]161[/C][C]159.657[/C][C]137.5705[/C][C]185.2894[/C][C]0.4591[/C][C]0.7924[/C][C]0.5805[/C][C]0.5805[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2827&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2827&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[24])
12149-------
13150-------
14144-------
15112-------
16111-------
17114-------
18117-------
19123-------
20125-------
21132-------
22137-------
23147-------
24157-------
25157159.5907149.913169.89320.31110.68890.9660.6889
26149153.6996142.6434165.61280.21970.29360.94470.2936
27113121.7326111.8079132.53820.056600.96120
28112118.84108.1458130.59180.1270.8350.90450
29117119.3781107.7242132.29270.35910.86860.79280
30122122.3365109.538136.63050.48160.76780.76780
31127128.2551114.0056144.28580.4390.77780.73972e-04
32130127.9897112.9933144.97630.40830.54550.63494e-04
33135139.4776122.3387159.01750.32670.82910.77340.0394
34139143.2246124.851164.30220.34720.77780.71860.1001
35149152.5201132.1697176.00390.38450.87040.67750.3542
36161159.657137.5705185.28940.45910.79240.58050.5805







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
250.0329-0.01620.00146.71180.55930.7479
260.0395-0.03060.002522.08651.84051.3567
270.0453-0.07170.00676.25836.35492.5209
280.0505-0.05760.004846.78623.89891.9746
290.0552-0.01990.00175.65510.47130.6865
300.0596-0.00282e-040.11330.00940.0971
310.0638-0.00988e-041.57540.13130.3623
320.06770.01570.00134.04130.33680.5803
330.0715-0.03210.002720.04881.67071.2926
340.0751-0.02950.002517.84761.48731.2196
350.0786-0.02310.001912.39111.03261.0162
360.08190.00847e-041.80360.15030.3877

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
25 & 0.0329 & -0.0162 & 0.0014 & 6.7118 & 0.5593 & 0.7479 \tabularnewline
26 & 0.0395 & -0.0306 & 0.0025 & 22.0865 & 1.8405 & 1.3567 \tabularnewline
27 & 0.0453 & -0.0717 & 0.006 & 76.2583 & 6.3549 & 2.5209 \tabularnewline
28 & 0.0505 & -0.0576 & 0.0048 & 46.7862 & 3.8989 & 1.9746 \tabularnewline
29 & 0.0552 & -0.0199 & 0.0017 & 5.6551 & 0.4713 & 0.6865 \tabularnewline
30 & 0.0596 & -0.0028 & 2e-04 & 0.1133 & 0.0094 & 0.0971 \tabularnewline
31 & 0.0638 & -0.0098 & 8e-04 & 1.5754 & 0.1313 & 0.3623 \tabularnewline
32 & 0.0677 & 0.0157 & 0.0013 & 4.0413 & 0.3368 & 0.5803 \tabularnewline
33 & 0.0715 & -0.0321 & 0.0027 & 20.0488 & 1.6707 & 1.2926 \tabularnewline
34 & 0.0751 & -0.0295 & 0.0025 & 17.8476 & 1.4873 & 1.2196 \tabularnewline
35 & 0.0786 & -0.0231 & 0.0019 & 12.3911 & 1.0326 & 1.0162 \tabularnewline
36 & 0.0819 & 0.0084 & 7e-04 & 1.8036 & 0.1503 & 0.3877 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2827&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]25[/C][C]0.0329[/C][C]-0.0162[/C][C]0.0014[/C][C]6.7118[/C][C]0.5593[/C][C]0.7479[/C][/ROW]
[ROW][C]26[/C][C]0.0395[/C][C]-0.0306[/C][C]0.0025[/C][C]22.0865[/C][C]1.8405[/C][C]1.3567[/C][/ROW]
[ROW][C]27[/C][C]0.0453[/C][C]-0.0717[/C][C]0.006[/C][C]76.2583[/C][C]6.3549[/C][C]2.5209[/C][/ROW]
[ROW][C]28[/C][C]0.0505[/C][C]-0.0576[/C][C]0.0048[/C][C]46.7862[/C][C]3.8989[/C][C]1.9746[/C][/ROW]
[ROW][C]29[/C][C]0.0552[/C][C]-0.0199[/C][C]0.0017[/C][C]5.6551[/C][C]0.4713[/C][C]0.6865[/C][/ROW]
[ROW][C]30[/C][C]0.0596[/C][C]-0.0028[/C][C]2e-04[/C][C]0.1133[/C][C]0.0094[/C][C]0.0971[/C][/ROW]
[ROW][C]31[/C][C]0.0638[/C][C]-0.0098[/C][C]8e-04[/C][C]1.5754[/C][C]0.1313[/C][C]0.3623[/C][/ROW]
[ROW][C]32[/C][C]0.0677[/C][C]0.0157[/C][C]0.0013[/C][C]4.0413[/C][C]0.3368[/C][C]0.5803[/C][/ROW]
[ROW][C]33[/C][C]0.0715[/C][C]-0.0321[/C][C]0.0027[/C][C]20.0488[/C][C]1.6707[/C][C]1.2926[/C][/ROW]
[ROW][C]34[/C][C]0.0751[/C][C]-0.0295[/C][C]0.0025[/C][C]17.8476[/C][C]1.4873[/C][C]1.2196[/C][/ROW]
[ROW][C]35[/C][C]0.0786[/C][C]-0.0231[/C][C]0.0019[/C][C]12.3911[/C][C]1.0326[/C][C]1.0162[/C][/ROW]
[ROW][C]36[/C][C]0.0819[/C][C]0.0084[/C][C]7e-04[/C][C]1.8036[/C][C]0.1503[/C][C]0.3877[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2827&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2827&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
250.0329-0.01620.00146.71180.55930.7479
260.0395-0.03060.002522.08651.84051.3567
270.0453-0.07170.00676.25836.35492.5209
280.0505-0.05760.004846.78623.89891.9746
290.0552-0.01990.00175.65510.47130.6865
300.0596-0.00282e-040.11330.00940.0971
310.0638-0.00988e-041.57540.13130.3623
320.06770.01570.00134.04130.33680.5803
330.0715-0.03210.002720.04881.67071.2926
340.0751-0.02950.002517.84761.48731.2196
350.0786-0.02310.001912.39111.03261.0162
360.08190.00847e-041.80360.15030.3877



Parameters (Session):
par1 = 12 ; par2 = 0.0 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 0.0 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; 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,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)
}
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')