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, 16 Dec 2008 03:47: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/2008/Dec/16/t12294247306rk16k3g8ks3lz8.htm/, Retrieved Sun, 10 Nov 2024 17:57:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33905, Retrieved Sun, 10 Nov 2024 17:57:05 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact208
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [step 1] [2008-12-16 10:15:11] [d811f621c525a990f9b60f1ae1e2e8fd]
-   PD    [ARIMA Forecasting] [step 1] [2008-12-16 10:47:55] [f4914427e726625a358be9269a8b7d03] [Current]
F   P       [ARIMA Forecasting] [step 1] [2008-12-16 10:54:27] [d811f621c525a990f9b60f1ae1e2e8fd]
Feedback Forum

Post a new message
Dataseries X:
117.09
116.77
119.39
122.49
124.08
118.29
112.94
113.79
114.43
118.70
120.36
118.27
118.34
117.82
117.65
118.18
121.02
124.78
131.16
130.14
131.75
134.73
135.35
140.32
136.35
131.60
128.90
133.89
138.25
146.23
144.76
149.30
156.80
159.08
165.12
163.14
153.43
151.01
154.72
154.58
155.63
161.67
163.51
162.91
164.80
164.98
154.54
148.60
149.19
150.61




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=33905&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=33905&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33905&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[38])
26131.6-------
27128.9-------
28133.89-------
29138.25-------
30146.23-------
31144.76-------
32149.3-------
33156.8-------
34159.08-------
35165.12-------
36163.14-------
37153.43-------
38151.01-------
39154.720-259.329259.3290.12110.12690.1650.1269
40154.580-259.329259.3290.12130.12110.15580.1269
41155.630-259.329259.3290.11970.12130.1480.1269
42161.670-259.329259.3290.11090.11970.13450.1269
43163.510-259.329259.3290.10830.11090.1370.1269
44162.910-259.329259.3290.10910.10830.12960.1269
45164.80-259.329259.3290.10650.10910.1180.1269
46164.980-259.329259.3290.10620.10650.11460.1269
47154.540-259.329259.3290.12140.10620.1060.1269
48148.60-259.329259.3290.13070.12140.10880.1269
49149.190-259.329259.3290.12980.13070.12310.1269
50150.610-259.329259.3290.12750.12980.12690.1269

\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[38]) \tabularnewline
26 & 131.6 & - & - & - & - & - & - & - \tabularnewline
27 & 128.9 & - & - & - & - & - & - & - \tabularnewline
28 & 133.89 & - & - & - & - & - & - & - \tabularnewline
29 & 138.25 & - & - & - & - & - & - & - \tabularnewline
30 & 146.23 & - & - & - & - & - & - & - \tabularnewline
31 & 144.76 & - & - & - & - & - & - & - \tabularnewline
32 & 149.3 & - & - & - & - & - & - & - \tabularnewline
33 & 156.8 & - & - & - & - & - & - & - \tabularnewline
34 & 159.08 & - & - & - & - & - & - & - \tabularnewline
35 & 165.12 & - & - & - & - & - & - & - \tabularnewline
36 & 163.14 & - & - & - & - & - & - & - \tabularnewline
37 & 153.43 & - & - & - & - & - & - & - \tabularnewline
38 & 151.01 & - & - & - & - & - & - & - \tabularnewline
39 & 154.72 & 0 & -259.329 & 259.329 & 0.1211 & 0.1269 & 0.165 & 0.1269 \tabularnewline
40 & 154.58 & 0 & -259.329 & 259.329 & 0.1213 & 0.1211 & 0.1558 & 0.1269 \tabularnewline
41 & 155.63 & 0 & -259.329 & 259.329 & 0.1197 & 0.1213 & 0.148 & 0.1269 \tabularnewline
42 & 161.67 & 0 & -259.329 & 259.329 & 0.1109 & 0.1197 & 0.1345 & 0.1269 \tabularnewline
43 & 163.51 & 0 & -259.329 & 259.329 & 0.1083 & 0.1109 & 0.137 & 0.1269 \tabularnewline
44 & 162.91 & 0 & -259.329 & 259.329 & 0.1091 & 0.1083 & 0.1296 & 0.1269 \tabularnewline
45 & 164.8 & 0 & -259.329 & 259.329 & 0.1065 & 0.1091 & 0.118 & 0.1269 \tabularnewline
46 & 164.98 & 0 & -259.329 & 259.329 & 0.1062 & 0.1065 & 0.1146 & 0.1269 \tabularnewline
47 & 154.54 & 0 & -259.329 & 259.329 & 0.1214 & 0.1062 & 0.106 & 0.1269 \tabularnewline
48 & 148.6 & 0 & -259.329 & 259.329 & 0.1307 & 0.1214 & 0.1088 & 0.1269 \tabularnewline
49 & 149.19 & 0 & -259.329 & 259.329 & 0.1298 & 0.1307 & 0.1231 & 0.1269 \tabularnewline
50 & 150.61 & 0 & -259.329 & 259.329 & 0.1275 & 0.1298 & 0.1269 & 0.1269 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33905&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[38])[/C][/ROW]
[ROW][C]26[/C][C]131.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]27[/C][C]128.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]133.89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]138.25[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]146.23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]144.76[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]149.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]156.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]159.08[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]165.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]163.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]153.43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]151.01[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]154.72[/C][C]0[/C][C]-259.329[/C][C]259.329[/C][C]0.1211[/C][C]0.1269[/C][C]0.165[/C][C]0.1269[/C][/ROW]
[ROW][C]40[/C][C]154.58[/C][C]0[/C][C]-259.329[/C][C]259.329[/C][C]0.1213[/C][C]0.1211[/C][C]0.1558[/C][C]0.1269[/C][/ROW]
[ROW][C]41[/C][C]155.63[/C][C]0[/C][C]-259.329[/C][C]259.329[/C][C]0.1197[/C][C]0.1213[/C][C]0.148[/C][C]0.1269[/C][/ROW]
[ROW][C]42[/C][C]161.67[/C][C]0[/C][C]-259.329[/C][C]259.329[/C][C]0.1109[/C][C]0.1197[/C][C]0.1345[/C][C]0.1269[/C][/ROW]
[ROW][C]43[/C][C]163.51[/C][C]0[/C][C]-259.329[/C][C]259.329[/C][C]0.1083[/C][C]0.1109[/C][C]0.137[/C][C]0.1269[/C][/ROW]
[ROW][C]44[/C][C]162.91[/C][C]0[/C][C]-259.329[/C][C]259.329[/C][C]0.1091[/C][C]0.1083[/C][C]0.1296[/C][C]0.1269[/C][/ROW]
[ROW][C]45[/C][C]164.8[/C][C]0[/C][C]-259.329[/C][C]259.329[/C][C]0.1065[/C][C]0.1091[/C][C]0.118[/C][C]0.1269[/C][/ROW]
[ROW][C]46[/C][C]164.98[/C][C]0[/C][C]-259.329[/C][C]259.329[/C][C]0.1062[/C][C]0.1065[/C][C]0.1146[/C][C]0.1269[/C][/ROW]
[ROW][C]47[/C][C]154.54[/C][C]0[/C][C]-259.329[/C][C]259.329[/C][C]0.1214[/C][C]0.1062[/C][C]0.106[/C][C]0.1269[/C][/ROW]
[ROW][C]48[/C][C]148.6[/C][C]0[/C][C]-259.329[/C][C]259.329[/C][C]0.1307[/C][C]0.1214[/C][C]0.1088[/C][C]0.1269[/C][/ROW]
[ROW][C]49[/C][C]149.19[/C][C]0[/C][C]-259.329[/C][C]259.329[/C][C]0.1298[/C][C]0.1307[/C][C]0.1231[/C][C]0.1269[/C][/ROW]
[ROW][C]50[/C][C]150.61[/C][C]0[/C][C]-259.329[/C][C]259.329[/C][C]0.1275[/C][C]0.1298[/C][C]0.1269[/C][C]0.1269[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33905&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33905&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[38])
26131.6-------
27128.9-------
28133.89-------
29138.25-------
30146.23-------
31144.76-------
32149.3-------
33156.8-------
34159.08-------
35165.12-------
36163.14-------
37153.43-------
38151.01-------
39154.720-259.329259.3290.12110.12690.1650.1269
40154.580-259.329259.3290.12130.12110.15580.1269
41155.630-259.329259.3290.11970.12130.1480.1269
42161.670-259.329259.3290.11090.11970.13450.1269
43163.510-259.329259.3290.10830.11090.1370.1269
44162.910-259.329259.3290.10910.10830.12960.1269
45164.80-259.329259.3290.10650.10910.1180.1269
46164.980-259.329259.3290.10620.10650.11460.1269
47154.540-259.329259.3290.12140.10620.1060.1269
48148.60-259.329259.3290.13070.12140.10880.1269
49149.190-259.329259.3290.12980.13070.12310.1269
50150.610-259.329259.3290.12750.12980.12690.1269







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
39InfInfInf23938.27841994.856544.6638
40InfInfInf23894.97641991.24844.6234
41InfInfInf24220.69692018.391444.9265
42InfInfInf26137.18892178.099146.6701
43InfInfInf26735.52012227.9647.2013
44InfInfInf26539.66812211.63947.0281
45InfInfInf27159.042263.253347.5737
46InfInfInf27218.40042268.247.6256
47InfInfInf23882.61161990.217644.6119
48InfInfInf22081.961840.163342.8971
49InfInfInf22257.65611854.804743.0674
50InfInfInf22683.37211890.28143.4774

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
39 & Inf & Inf & Inf & 23938.2784 & 1994.8565 & 44.6638 \tabularnewline
40 & Inf & Inf & Inf & 23894.9764 & 1991.248 & 44.6234 \tabularnewline
41 & Inf & Inf & Inf & 24220.6969 & 2018.3914 & 44.9265 \tabularnewline
42 & Inf & Inf & Inf & 26137.1889 & 2178.0991 & 46.6701 \tabularnewline
43 & Inf & Inf & Inf & 26735.5201 & 2227.96 & 47.2013 \tabularnewline
44 & Inf & Inf & Inf & 26539.6681 & 2211.639 & 47.0281 \tabularnewline
45 & Inf & Inf & Inf & 27159.04 & 2263.2533 & 47.5737 \tabularnewline
46 & Inf & Inf & Inf & 27218.4004 & 2268.2 & 47.6256 \tabularnewline
47 & Inf & Inf & Inf & 23882.6116 & 1990.2176 & 44.6119 \tabularnewline
48 & Inf & Inf & Inf & 22081.96 & 1840.1633 & 42.8971 \tabularnewline
49 & Inf & Inf & Inf & 22257.6561 & 1854.8047 & 43.0674 \tabularnewline
50 & Inf & Inf & Inf & 22683.3721 & 1890.281 & 43.4774 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33905&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]39[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]23938.2784[/C][C]1994.8565[/C][C]44.6638[/C][/ROW]
[ROW][C]40[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]23894.9764[/C][C]1991.248[/C][C]44.6234[/C][/ROW]
[ROW][C]41[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]24220.6969[/C][C]2018.3914[/C][C]44.9265[/C][/ROW]
[ROW][C]42[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]26137.1889[/C][C]2178.0991[/C][C]46.6701[/C][/ROW]
[ROW][C]43[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]26735.5201[/C][C]2227.96[/C][C]47.2013[/C][/ROW]
[ROW][C]44[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]26539.6681[/C][C]2211.639[/C][C]47.0281[/C][/ROW]
[ROW][C]45[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]27159.04[/C][C]2263.2533[/C][C]47.5737[/C][/ROW]
[ROW][C]46[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]27218.4004[/C][C]2268.2[/C][C]47.6256[/C][/ROW]
[ROW][C]47[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]23882.6116[/C][C]1990.2176[/C][C]44.6119[/C][/ROW]
[ROW][C]48[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]22081.96[/C][C]1840.1633[/C][C]42.8971[/C][/ROW]
[ROW][C]49[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]22257.6561[/C][C]1854.8047[/C][C]43.0674[/C][/ROW]
[ROW][C]50[/C][C]Inf[/C][C]Inf[/C][C]Inf[/C][C]22683.3721[/C][C]1890.281[/C][C]43.4774[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33905&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33905&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
39InfInfInf23938.27841994.856544.6638
40InfInfInf23894.97641991.24844.6234
41InfInfInf24220.69692018.391444.9265
42InfInfInf26137.18892178.099146.6701
43InfInfInf26735.52012227.9647.2013
44InfInfInf26539.66812211.63947.0281
45InfInfInf27159.042263.253347.5737
46InfInfInf27218.40042268.247.6256
47InfInfInf23882.61161990.217644.6119
48InfInfInf22081.961840.163342.8971
49InfInfInf22257.65611854.804743.0674
50InfInfInf22683.37211890.28143.4774



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