Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 11 Dec 2007 08:38:56 -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/11/t1197387034hjajwyut8gb2ilt.htm/, Retrieved Sun, 28 Apr 2024 20:06:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3124, Retrieved Sun, 28 Apr 2024 20:06:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact233
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Foorcasting] [2007-12-11 15:38:56] [9ec4fcc2bfe8b6d942eac6074e595603] [Current]
Feedback Forum

Post a new message
Dataseries X:
21
14
10
14
12
10
12
9
14
23
17
16
7
9
9
14
12
23
12
15
6
6
1
3
-1
-4
-6
-9
-13
-13
-10
-12
-9
-15
-14
-18
-13
-2
-1
5
8
6
7
15
23
43
60
36
28
23
23
22
22
24
32
27
27
27
29
38




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3124&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]2 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=3124&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3124&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 time2 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[48])
36-18-------
37-13-------
38-2-------
39-1-------
405-------
418-------
426-------
437-------
4415-------
4523-------
4643-------
4760-------
4836-------
492836.266518.49754.03590.18090.511710.5117
502342.506417.417867.5950.06380.87150.99970.6944
512342.683611.973373.39390.10450.89550.99730.6652
522246.640211.188782.09170.08660.90440.98930.7218
532247.15397.524586.78340.10670.89330.97360.7094
542448.32254.915391.72960.1360.88270.9720.711
553247.18020.298894.06150.26280.83380.95350.6799
562752.08361.9682102.19890.16330.78390.92650.7353
572755.4552.3021108.60790.1470.8530.88430.7634
582765.91689.8908121.94290.08670.91330.78860.8524
592974.988316.2294133.74710.06250.94530.69140.9033
603860.5803-0.7897121.95040.23540.84340.78380.7838

\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[48]) \tabularnewline
36 & -18 & - & - & - & - & - & - & - \tabularnewline
37 & -13 & - & - & - & - & - & - & - \tabularnewline
38 & -2 & - & - & - & - & - & - & - \tabularnewline
39 & -1 & - & - & - & - & - & - & - \tabularnewline
40 & 5 & - & - & - & - & - & - & - \tabularnewline
41 & 8 & - & - & - & - & - & - & - \tabularnewline
42 & 6 & - & - & - & - & - & - & - \tabularnewline
43 & 7 & - & - & - & - & - & - & - \tabularnewline
44 & 15 & - & - & - & - & - & - & - \tabularnewline
45 & 23 & - & - & - & - & - & - & - \tabularnewline
46 & 43 & - & - & - & - & - & - & - \tabularnewline
47 & 60 & - & - & - & - & - & - & - \tabularnewline
48 & 36 & - & - & - & - & - & - & - \tabularnewline
49 & 28 & 36.2665 & 18.497 & 54.0359 & 0.1809 & 0.5117 & 1 & 0.5117 \tabularnewline
50 & 23 & 42.5064 & 17.4178 & 67.595 & 0.0638 & 0.8715 & 0.9997 & 0.6944 \tabularnewline
51 & 23 & 42.6836 & 11.9733 & 73.3939 & 0.1045 & 0.8955 & 0.9973 & 0.6652 \tabularnewline
52 & 22 & 46.6402 & 11.1887 & 82.0917 & 0.0866 & 0.9044 & 0.9893 & 0.7218 \tabularnewline
53 & 22 & 47.1539 & 7.5245 & 86.7834 & 0.1067 & 0.8933 & 0.9736 & 0.7094 \tabularnewline
54 & 24 & 48.3225 & 4.9153 & 91.7296 & 0.136 & 0.8827 & 0.972 & 0.711 \tabularnewline
55 & 32 & 47.1802 & 0.2988 & 94.0615 & 0.2628 & 0.8338 & 0.9535 & 0.6799 \tabularnewline
56 & 27 & 52.0836 & 1.9682 & 102.1989 & 0.1633 & 0.7839 & 0.9265 & 0.7353 \tabularnewline
57 & 27 & 55.455 & 2.3021 & 108.6079 & 0.147 & 0.853 & 0.8843 & 0.7634 \tabularnewline
58 & 27 & 65.9168 & 9.8908 & 121.9429 & 0.0867 & 0.9133 & 0.7886 & 0.8524 \tabularnewline
59 & 29 & 74.9883 & 16.2294 & 133.7471 & 0.0625 & 0.9453 & 0.6914 & 0.9033 \tabularnewline
60 & 38 & 60.5803 & -0.7897 & 121.9504 & 0.2354 & 0.8434 & 0.7838 & 0.7838 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3124&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[48])[/C][/ROW]
[ROW][C]36[/C][C]-18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]-13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]-2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]-1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]60[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]28[/C][C]36.2665[/C][C]18.497[/C][C]54.0359[/C][C]0.1809[/C][C]0.5117[/C][C]1[/C][C]0.5117[/C][/ROW]
[ROW][C]50[/C][C]23[/C][C]42.5064[/C][C]17.4178[/C][C]67.595[/C][C]0.0638[/C][C]0.8715[/C][C]0.9997[/C][C]0.6944[/C][/ROW]
[ROW][C]51[/C][C]23[/C][C]42.6836[/C][C]11.9733[/C][C]73.3939[/C][C]0.1045[/C][C]0.8955[/C][C]0.9973[/C][C]0.6652[/C][/ROW]
[ROW][C]52[/C][C]22[/C][C]46.6402[/C][C]11.1887[/C][C]82.0917[/C][C]0.0866[/C][C]0.9044[/C][C]0.9893[/C][C]0.7218[/C][/ROW]
[ROW][C]53[/C][C]22[/C][C]47.1539[/C][C]7.5245[/C][C]86.7834[/C][C]0.1067[/C][C]0.8933[/C][C]0.9736[/C][C]0.7094[/C][/ROW]
[ROW][C]54[/C][C]24[/C][C]48.3225[/C][C]4.9153[/C][C]91.7296[/C][C]0.136[/C][C]0.8827[/C][C]0.972[/C][C]0.711[/C][/ROW]
[ROW][C]55[/C][C]32[/C][C]47.1802[/C][C]0.2988[/C][C]94.0615[/C][C]0.2628[/C][C]0.8338[/C][C]0.9535[/C][C]0.6799[/C][/ROW]
[ROW][C]56[/C][C]27[/C][C]52.0836[/C][C]1.9682[/C][C]102.1989[/C][C]0.1633[/C][C]0.7839[/C][C]0.9265[/C][C]0.7353[/C][/ROW]
[ROW][C]57[/C][C]27[/C][C]55.455[/C][C]2.3021[/C][C]108.6079[/C][C]0.147[/C][C]0.853[/C][C]0.8843[/C][C]0.7634[/C][/ROW]
[ROW][C]58[/C][C]27[/C][C]65.9168[/C][C]9.8908[/C][C]121.9429[/C][C]0.0867[/C][C]0.9133[/C][C]0.7886[/C][C]0.8524[/C][/ROW]
[ROW][C]59[/C][C]29[/C][C]74.9883[/C][C]16.2294[/C][C]133.7471[/C][C]0.0625[/C][C]0.9453[/C][C]0.6914[/C][C]0.9033[/C][/ROW]
[ROW][C]60[/C][C]38[/C][C]60.5803[/C][C]-0.7897[/C][C]121.9504[/C][C]0.2354[/C][C]0.8434[/C][C]0.7838[/C][C]0.7838[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3124&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3124&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[48])
36-18-------
37-13-------
38-2-------
39-1-------
405-------
418-------
426-------
437-------
4415-------
4523-------
4643-------
4760-------
4836-------
492836.266518.49754.03590.18090.511710.5117
502342.506417.417867.5950.06380.87150.99970.6944
512342.683611.973373.39390.10450.89550.99730.6652
522246.640211.188782.09170.08660.90440.98930.7218
532247.15397.524586.78340.10670.89330.97360.7094
542448.32254.915391.72960.1360.88270.9720.711
553247.18020.298894.06150.26280.83380.95350.6799
562752.08361.9682102.19890.16330.78390.92650.7353
572755.4552.3021108.60790.1470.8530.88430.7634
582765.91689.8908121.94290.08670.91330.78860.8524
592974.988316.2294133.74710.06250.94530.69140.9033
603860.5803-0.7897121.95040.23540.84340.78380.7838







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.25-0.22790.01968.33455.69452.3863
500.3011-0.45890.0382380.498931.70825.631
510.3671-0.46120.0384387.444932.28715.6822
520.3878-0.52830.044607.139850.5957.113
530.4288-0.53340.0445632.721152.72687.2613
540.4583-0.50330.0419591.581949.29857.0213
550.507-0.32170.0268230.43719.20314.3821
560.4909-0.48160.0401629.185252.43217.241
570.489-0.51310.0428809.68767.47398.2143
580.4336-0.59040.04921514.521126.210111.2343
590.3998-0.61330.05112114.9195176.243313.2757
600.5169-0.37270.0311509.872142.48936.5184

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.25 & -0.2279 & 0.019 & 68.3345 & 5.6945 & 2.3863 \tabularnewline
50 & 0.3011 & -0.4589 & 0.0382 & 380.4989 & 31.7082 & 5.631 \tabularnewline
51 & 0.3671 & -0.4612 & 0.0384 & 387.4449 & 32.2871 & 5.6822 \tabularnewline
52 & 0.3878 & -0.5283 & 0.044 & 607.1398 & 50.595 & 7.113 \tabularnewline
53 & 0.4288 & -0.5334 & 0.0445 & 632.7211 & 52.7268 & 7.2613 \tabularnewline
54 & 0.4583 & -0.5033 & 0.0419 & 591.5819 & 49.2985 & 7.0213 \tabularnewline
55 & 0.507 & -0.3217 & 0.0268 & 230.437 & 19.2031 & 4.3821 \tabularnewline
56 & 0.4909 & -0.4816 & 0.0401 & 629.1852 & 52.4321 & 7.241 \tabularnewline
57 & 0.489 & -0.5131 & 0.0428 & 809.687 & 67.4739 & 8.2143 \tabularnewline
58 & 0.4336 & -0.5904 & 0.0492 & 1514.521 & 126.2101 & 11.2343 \tabularnewline
59 & 0.3998 & -0.6133 & 0.0511 & 2114.9195 & 176.2433 & 13.2757 \tabularnewline
60 & 0.5169 & -0.3727 & 0.0311 & 509.8721 & 42.4893 & 6.5184 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3124&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]49[/C][C]0.25[/C][C]-0.2279[/C][C]0.019[/C][C]68.3345[/C][C]5.6945[/C][C]2.3863[/C][/ROW]
[ROW][C]50[/C][C]0.3011[/C][C]-0.4589[/C][C]0.0382[/C][C]380.4989[/C][C]31.7082[/C][C]5.631[/C][/ROW]
[ROW][C]51[/C][C]0.3671[/C][C]-0.4612[/C][C]0.0384[/C][C]387.4449[/C][C]32.2871[/C][C]5.6822[/C][/ROW]
[ROW][C]52[/C][C]0.3878[/C][C]-0.5283[/C][C]0.044[/C][C]607.1398[/C][C]50.595[/C][C]7.113[/C][/ROW]
[ROW][C]53[/C][C]0.4288[/C][C]-0.5334[/C][C]0.0445[/C][C]632.7211[/C][C]52.7268[/C][C]7.2613[/C][/ROW]
[ROW][C]54[/C][C]0.4583[/C][C]-0.5033[/C][C]0.0419[/C][C]591.5819[/C][C]49.2985[/C][C]7.0213[/C][/ROW]
[ROW][C]55[/C][C]0.507[/C][C]-0.3217[/C][C]0.0268[/C][C]230.437[/C][C]19.2031[/C][C]4.3821[/C][/ROW]
[ROW][C]56[/C][C]0.4909[/C][C]-0.4816[/C][C]0.0401[/C][C]629.1852[/C][C]52.4321[/C][C]7.241[/C][/ROW]
[ROW][C]57[/C][C]0.489[/C][C]-0.5131[/C][C]0.0428[/C][C]809.687[/C][C]67.4739[/C][C]8.2143[/C][/ROW]
[ROW][C]58[/C][C]0.4336[/C][C]-0.5904[/C][C]0.0492[/C][C]1514.521[/C][C]126.2101[/C][C]11.2343[/C][/ROW]
[ROW][C]59[/C][C]0.3998[/C][C]-0.6133[/C][C]0.0511[/C][C]2114.9195[/C][C]176.2433[/C][C]13.2757[/C][/ROW]
[ROW][C]60[/C][C]0.5169[/C][C]-0.3727[/C][C]0.0311[/C][C]509.8721[/C][C]42.4893[/C][C]6.5184[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3124&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3124&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
490.25-0.22790.01968.33455.69452.3863
500.3011-0.45890.0382380.498931.70825.631
510.3671-0.46120.0384387.444932.28715.6822
520.3878-0.52830.044607.139850.5957.113
530.4288-0.53340.0445632.721152.72687.2613
540.4583-0.50330.0419591.581949.29857.0213
550.507-0.32170.0268230.43719.20314.3821
560.4909-0.48160.0401629.185252.43217.241
570.489-0.51310.0428809.68767.47398.2143
580.4336-0.59040.04921514.521126.210111.2343
590.3998-0.61330.05112114.9195176.243313.2757
600.5169-0.37270.0311509.872142.48936.5184



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