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, 26 Dec 2010 15:12:43 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/26/t1293376329ejye3b5hmyovvml.htm/, Retrieved Mon, 06 May 2024 23:06:00 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115651, Retrieved Mon, 06 May 2024 23:06:00 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact41
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [arima soc juist] [2010-12-26 15:12:43] [346ac46ef4f6bb745e48fc42fac6253b] [Current]
Feedback Forum

Post a new message
Dataseries X:
104.71
105.35
106.31
106.26
106.97
107.04
106.98
107.05
107.33
107.3
107.28
107.58
109.03
110.43
111.01
111.01
110.76
111.13
111.07
111.09
110.96
110.64
110.62
110.59
111.33
113.94
114.61
114.64
114.62
114.71
114.72
114.66
114.76
114.68
114.75
114.74
116.36
117.53
118.82
119.83
119.97
121.29
120.94
121.02
120.98
121.02
120.89
120.76
123.28
123.98
125.91
125.84
125.98
127.24
127.23
127.82
127.59
127.74
127.44
127.35




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115651&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[48])
36114.74-------
37116.36-------
38117.53-------
39118.82-------
40119.83-------
41119.97-------
42121.29-------
43120.94-------
44121.02-------
45120.98-------
46121.02-------
47120.89-------
48120.76-------
49123.28122.0834121.2213122.94560.00330.998710.9987
50123.98123.5112122.4105124.61190.20190.659711
51125.91124.3911122.9894125.79270.01680.717311
52125.84124.6325123.0155126.24940.07160.060711
53125.98124.78122.9524126.60760.09910.127811
54127.24125.2403123.2323127.24830.02550.23510.99991
55127.23125.1277122.9494127.30590.02930.02870.99991
56127.82125.1519122.8181127.48570.01250.04050.99970.9999
57127.59125.2099122.7289127.6910.030.01960.99960.9998
58127.74125.1011122.4822127.71990.02410.03120.99890.9994
59127.44125.0925122.3417127.84320.04720.02960.99860.999
60127.35125.0796122.2053127.95390.06080.05370.99840.9984

\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 & 114.74 & - & - & - & - & - & - & - \tabularnewline
37 & 116.36 & - & - & - & - & - & - & - \tabularnewline
38 & 117.53 & - & - & - & - & - & - & - \tabularnewline
39 & 118.82 & - & - & - & - & - & - & - \tabularnewline
40 & 119.83 & - & - & - & - & - & - & - \tabularnewline
41 & 119.97 & - & - & - & - & - & - & - \tabularnewline
42 & 121.29 & - & - & - & - & - & - & - \tabularnewline
43 & 120.94 & - & - & - & - & - & - & - \tabularnewline
44 & 121.02 & - & - & - & - & - & - & - \tabularnewline
45 & 120.98 & - & - & - & - & - & - & - \tabularnewline
46 & 121.02 & - & - & - & - & - & - & - \tabularnewline
47 & 120.89 & - & - & - & - & - & - & - \tabularnewline
48 & 120.76 & - & - & - & - & - & - & - \tabularnewline
49 & 123.28 & 122.0834 & 121.2213 & 122.9456 & 0.0033 & 0.9987 & 1 & 0.9987 \tabularnewline
50 & 123.98 & 123.5112 & 122.4105 & 124.6119 & 0.2019 & 0.6597 & 1 & 1 \tabularnewline
51 & 125.91 & 124.3911 & 122.9894 & 125.7927 & 0.0168 & 0.7173 & 1 & 1 \tabularnewline
52 & 125.84 & 124.6325 & 123.0155 & 126.2494 & 0.0716 & 0.0607 & 1 & 1 \tabularnewline
53 & 125.98 & 124.78 & 122.9524 & 126.6076 & 0.0991 & 0.1278 & 1 & 1 \tabularnewline
54 & 127.24 & 125.2403 & 123.2323 & 127.2483 & 0.0255 & 0.2351 & 0.9999 & 1 \tabularnewline
55 & 127.23 & 125.1277 & 122.9494 & 127.3059 & 0.0293 & 0.0287 & 0.9999 & 1 \tabularnewline
56 & 127.82 & 125.1519 & 122.8181 & 127.4857 & 0.0125 & 0.0405 & 0.9997 & 0.9999 \tabularnewline
57 & 127.59 & 125.2099 & 122.7289 & 127.691 & 0.03 & 0.0196 & 0.9996 & 0.9998 \tabularnewline
58 & 127.74 & 125.1011 & 122.4822 & 127.7199 & 0.0241 & 0.0312 & 0.9989 & 0.9994 \tabularnewline
59 & 127.44 & 125.0925 & 122.3417 & 127.8432 & 0.0472 & 0.0296 & 0.9986 & 0.999 \tabularnewline
60 & 127.35 & 125.0796 & 122.2053 & 127.9539 & 0.0608 & 0.0537 & 0.9984 & 0.9984 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115651&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]114.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]116.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]117.53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]118.82[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]119.83[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]119.97[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]121.29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]120.94[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]121.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]120.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]121.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]120.89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]120.76[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]123.28[/C][C]122.0834[/C][C]121.2213[/C][C]122.9456[/C][C]0.0033[/C][C]0.9987[/C][C]1[/C][C]0.9987[/C][/ROW]
[ROW][C]50[/C][C]123.98[/C][C]123.5112[/C][C]122.4105[/C][C]124.6119[/C][C]0.2019[/C][C]0.6597[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]51[/C][C]125.91[/C][C]124.3911[/C][C]122.9894[/C][C]125.7927[/C][C]0.0168[/C][C]0.7173[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]125.84[/C][C]124.6325[/C][C]123.0155[/C][C]126.2494[/C][C]0.0716[/C][C]0.0607[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]125.98[/C][C]124.78[/C][C]122.9524[/C][C]126.6076[/C][C]0.0991[/C][C]0.1278[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]127.24[/C][C]125.2403[/C][C]123.2323[/C][C]127.2483[/C][C]0.0255[/C][C]0.2351[/C][C]0.9999[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]127.23[/C][C]125.1277[/C][C]122.9494[/C][C]127.3059[/C][C]0.0293[/C][C]0.0287[/C][C]0.9999[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]127.82[/C][C]125.1519[/C][C]122.8181[/C][C]127.4857[/C][C]0.0125[/C][C]0.0405[/C][C]0.9997[/C][C]0.9999[/C][/ROW]
[ROW][C]57[/C][C]127.59[/C][C]125.2099[/C][C]122.7289[/C][C]127.691[/C][C]0.03[/C][C]0.0196[/C][C]0.9996[/C][C]0.9998[/C][/ROW]
[ROW][C]58[/C][C]127.74[/C][C]125.1011[/C][C]122.4822[/C][C]127.7199[/C][C]0.0241[/C][C]0.0312[/C][C]0.9989[/C][C]0.9994[/C][/ROW]
[ROW][C]59[/C][C]127.44[/C][C]125.0925[/C][C]122.3417[/C][C]127.8432[/C][C]0.0472[/C][C]0.0296[/C][C]0.9986[/C][C]0.999[/C][/ROW]
[ROW][C]60[/C][C]127.35[/C][C]125.0796[/C][C]122.2053[/C][C]127.9539[/C][C]0.0608[/C][C]0.0537[/C][C]0.9984[/C][C]0.9984[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115651&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115651&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])
36114.74-------
37116.36-------
38117.53-------
39118.82-------
40119.83-------
41119.97-------
42121.29-------
43120.94-------
44121.02-------
45120.98-------
46121.02-------
47120.89-------
48120.76-------
49123.28122.0834121.2213122.94560.00330.998710.9987
50123.98123.5112122.4105124.61190.20190.659711
51125.91124.3911122.9894125.79270.01680.717311
52125.84124.6325123.0155126.24940.07160.060711
53125.98124.78122.9524126.60760.09910.127811
54127.24125.2403123.2323127.24830.02550.23510.99991
55127.23125.1277122.9494127.30590.02930.02870.99991
56127.82125.1519122.8181127.48570.01250.04050.99970.9999
57127.59125.2099122.7289127.6910.030.01960.99960.9998
58127.74125.1011122.4822127.71990.02410.03120.99890.9994
59127.44125.0925122.3417127.84320.04720.02960.99860.999
60127.35125.0796122.2053127.95390.06080.05370.99840.9984







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.00360.009801.431800
500.00450.00380.00680.21980.82580.9087
510.00570.01220.00862.30721.31961.1487
520.00660.00970.00891.45821.35421.1637
530.00750.00960.0091.441.37141.1711
540.00820.0160.01023.99871.80931.3451
550.00890.01680.01114.41982.18221.4772
560.00950.02130.01247.11892.79931.6731
570.01010.0190.01315.66473.11771.7657
580.01070.02110.01396.9643.50231.8714
590.01120.01880.01445.51093.68491.9196
600.01170.01820.01475.15463.80741.9513

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0036 & 0.0098 & 0 & 1.4318 & 0 & 0 \tabularnewline
50 & 0.0045 & 0.0038 & 0.0068 & 0.2198 & 0.8258 & 0.9087 \tabularnewline
51 & 0.0057 & 0.0122 & 0.0086 & 2.3072 & 1.3196 & 1.1487 \tabularnewline
52 & 0.0066 & 0.0097 & 0.0089 & 1.4582 & 1.3542 & 1.1637 \tabularnewline
53 & 0.0075 & 0.0096 & 0.009 & 1.44 & 1.3714 & 1.1711 \tabularnewline
54 & 0.0082 & 0.016 & 0.0102 & 3.9987 & 1.8093 & 1.3451 \tabularnewline
55 & 0.0089 & 0.0168 & 0.0111 & 4.4198 & 2.1822 & 1.4772 \tabularnewline
56 & 0.0095 & 0.0213 & 0.0124 & 7.1189 & 2.7993 & 1.6731 \tabularnewline
57 & 0.0101 & 0.019 & 0.0131 & 5.6647 & 3.1177 & 1.7657 \tabularnewline
58 & 0.0107 & 0.0211 & 0.0139 & 6.964 & 3.5023 & 1.8714 \tabularnewline
59 & 0.0112 & 0.0188 & 0.0144 & 5.5109 & 3.6849 & 1.9196 \tabularnewline
60 & 0.0117 & 0.0182 & 0.0147 & 5.1546 & 3.8074 & 1.9513 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115651&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.0036[/C][C]0.0098[/C][C]0[/C][C]1.4318[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0045[/C][C]0.0038[/C][C]0.0068[/C][C]0.2198[/C][C]0.8258[/C][C]0.9087[/C][/ROW]
[ROW][C]51[/C][C]0.0057[/C][C]0.0122[/C][C]0.0086[/C][C]2.3072[/C][C]1.3196[/C][C]1.1487[/C][/ROW]
[ROW][C]52[/C][C]0.0066[/C][C]0.0097[/C][C]0.0089[/C][C]1.4582[/C][C]1.3542[/C][C]1.1637[/C][/ROW]
[ROW][C]53[/C][C]0.0075[/C][C]0.0096[/C][C]0.009[/C][C]1.44[/C][C]1.3714[/C][C]1.1711[/C][/ROW]
[ROW][C]54[/C][C]0.0082[/C][C]0.016[/C][C]0.0102[/C][C]3.9987[/C][C]1.8093[/C][C]1.3451[/C][/ROW]
[ROW][C]55[/C][C]0.0089[/C][C]0.0168[/C][C]0.0111[/C][C]4.4198[/C][C]2.1822[/C][C]1.4772[/C][/ROW]
[ROW][C]56[/C][C]0.0095[/C][C]0.0213[/C][C]0.0124[/C][C]7.1189[/C][C]2.7993[/C][C]1.6731[/C][/ROW]
[ROW][C]57[/C][C]0.0101[/C][C]0.019[/C][C]0.0131[/C][C]5.6647[/C][C]3.1177[/C][C]1.7657[/C][/ROW]
[ROW][C]58[/C][C]0.0107[/C][C]0.0211[/C][C]0.0139[/C][C]6.964[/C][C]3.5023[/C][C]1.8714[/C][/ROW]
[ROW][C]59[/C][C]0.0112[/C][C]0.0188[/C][C]0.0144[/C][C]5.5109[/C][C]3.6849[/C][C]1.9196[/C][/ROW]
[ROW][C]60[/C][C]0.0117[/C][C]0.0182[/C][C]0.0147[/C][C]5.1546[/C][C]3.8074[/C][C]1.9513[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115651&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115651&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.00360.009801.431800
500.00450.00380.00680.21980.82580.9087
510.00570.01220.00862.30721.31961.1487
520.00660.00970.00891.45821.35421.1637
530.00750.00960.0091.441.37141.1711
540.00820.0160.01023.99871.80931.3451
550.00890.01680.01114.41982.18221.4772
560.00950.02130.01247.11892.79931.6731
570.01010.0190.01315.66473.11771.7657
580.01070.02110.01396.9643.50231.8714
590.01120.01880.01445.51093.68491.9196
600.01170.01820.01475.15463.80741.9513



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