Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 10 Dec 2007 10:47:44 -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/10/t1197308016h770krvoiobz6wy.htm/, Retrieved Tue, 07 May 2024 01:21:48 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3001, Retrieved Tue, 07 May 2024 01:21:48 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact215
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA forecasts 4] [2007-12-10 17:47:44] [6b5c00822e2ce0f7cf73539c28d95782] [Current]
Feedback Forum

Post a new message
Dataseries X:
107.97
108.13
108.54
109.86
109.75
109.99
112.01
111.96
111.41
112.11
111.67
111.95
112.31
113.26
113.5
114.43
115.02
115.1
117.11
117.52
116.1
116.39
116.01
116.74
116.68
117.45
117.8
119.37
118.9
119.05
120.46
120.99
119.86
120.18
119.81
120.15
119.8
120.27
120.71
121.87
121.87
121.92
123.72
124.38
123.21
123.17
122.95
123.46
123.24
123.86
124.28
124.78
125.19
125.46
127.6
127.8
126.63
127.06
126.77
127.05




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3001&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])
36120.15-------
37119.8-------
38120.27-------
39120.71-------
40121.87-------
41121.87-------
42121.92-------
43123.72-------
44124.38-------
45123.21-------
46123.17-------
47122.95-------
48123.46-------
49123.24123.4608122.8378124.08380.24360.50110.501
50123.86124.0484123.2839124.81280.31460.980910.9343
51124.28124.4084123.5249125.2920.38790.888110.9823
52124.78125.6535124.6651126.64190.04160.996811
53125.19125.656124.5728126.73920.19950.943511
54125.46125.786124.6158126.95630.29250.840911
55127.6127.596126.3447128.84740.49750.999611
56127.8127.9838126.6564129.31130.3930.714611
57126.63126.9164125.517128.31580.34420.107911
58127.06127.2338125.766128.70170.40820.7911
59126.77126.8815125.3483128.41480.44330.409811
60127.05127.3467125.7507128.94270.35780.760611

\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 & 120.15 & - & - & - & - & - & - & - \tabularnewline
37 & 119.8 & - & - & - & - & - & - & - \tabularnewline
38 & 120.27 & - & - & - & - & - & - & - \tabularnewline
39 & 120.71 & - & - & - & - & - & - & - \tabularnewline
40 & 121.87 & - & - & - & - & - & - & - \tabularnewline
41 & 121.87 & - & - & - & - & - & - & - \tabularnewline
42 & 121.92 & - & - & - & - & - & - & - \tabularnewline
43 & 123.72 & - & - & - & - & - & - & - \tabularnewline
44 & 124.38 & - & - & - & - & - & - & - \tabularnewline
45 & 123.21 & - & - & - & - & - & - & - \tabularnewline
46 & 123.17 & - & - & - & - & - & - & - \tabularnewline
47 & 122.95 & - & - & - & - & - & - & - \tabularnewline
48 & 123.46 & - & - & - & - & - & - & - \tabularnewline
49 & 123.24 & 123.4608 & 122.8378 & 124.0838 & 0.2436 & 0.501 & 1 & 0.501 \tabularnewline
50 & 123.86 & 124.0484 & 123.2839 & 124.8128 & 0.3146 & 0.9809 & 1 & 0.9343 \tabularnewline
51 & 124.28 & 124.4084 & 123.5249 & 125.292 & 0.3879 & 0.8881 & 1 & 0.9823 \tabularnewline
52 & 124.78 & 125.6535 & 124.6651 & 126.6419 & 0.0416 & 0.9968 & 1 & 1 \tabularnewline
53 & 125.19 & 125.656 & 124.5728 & 126.7392 & 0.1995 & 0.9435 & 1 & 1 \tabularnewline
54 & 125.46 & 125.786 & 124.6158 & 126.9563 & 0.2925 & 0.8409 & 1 & 1 \tabularnewline
55 & 127.6 & 127.596 & 126.3447 & 128.8474 & 0.4975 & 0.9996 & 1 & 1 \tabularnewline
56 & 127.8 & 127.9838 & 126.6564 & 129.3113 & 0.393 & 0.7146 & 1 & 1 \tabularnewline
57 & 126.63 & 126.9164 & 125.517 & 128.3158 & 0.3442 & 0.1079 & 1 & 1 \tabularnewline
58 & 127.06 & 127.2338 & 125.766 & 128.7017 & 0.4082 & 0.79 & 1 & 1 \tabularnewline
59 & 126.77 & 126.8815 & 125.3483 & 128.4148 & 0.4433 & 0.4098 & 1 & 1 \tabularnewline
60 & 127.05 & 127.3467 & 125.7507 & 128.9427 & 0.3578 & 0.7606 & 1 & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3001&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]120.15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]119.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]120.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]120.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]121.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]121.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]121.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]123.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]124.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]123.21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]123.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]122.95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]123.46[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]123.24[/C][C]123.4608[/C][C]122.8378[/C][C]124.0838[/C][C]0.2436[/C][C]0.501[/C][C]1[/C][C]0.501[/C][/ROW]
[ROW][C]50[/C][C]123.86[/C][C]124.0484[/C][C]123.2839[/C][C]124.8128[/C][C]0.3146[/C][C]0.9809[/C][C]1[/C][C]0.9343[/C][/ROW]
[ROW][C]51[/C][C]124.28[/C][C]124.4084[/C][C]123.5249[/C][C]125.292[/C][C]0.3879[/C][C]0.8881[/C][C]1[/C][C]0.9823[/C][/ROW]
[ROW][C]52[/C][C]124.78[/C][C]125.6535[/C][C]124.6651[/C][C]126.6419[/C][C]0.0416[/C][C]0.9968[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]125.19[/C][C]125.656[/C][C]124.5728[/C][C]126.7392[/C][C]0.1995[/C][C]0.9435[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]125.46[/C][C]125.786[/C][C]124.6158[/C][C]126.9563[/C][C]0.2925[/C][C]0.8409[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]127.6[/C][C]127.596[/C][C]126.3447[/C][C]128.8474[/C][C]0.4975[/C][C]0.9996[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]127.8[/C][C]127.9838[/C][C]126.6564[/C][C]129.3113[/C][C]0.393[/C][C]0.7146[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]126.63[/C][C]126.9164[/C][C]125.517[/C][C]128.3158[/C][C]0.3442[/C][C]0.1079[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]127.06[/C][C]127.2338[/C][C]125.766[/C][C]128.7017[/C][C]0.4082[/C][C]0.79[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]59[/C][C]126.77[/C][C]126.8815[/C][C]125.3483[/C][C]128.4148[/C][C]0.4433[/C][C]0.4098[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]60[/C][C]127.05[/C][C]127.3467[/C][C]125.7507[/C][C]128.9427[/C][C]0.3578[/C][C]0.7606[/C][C]1[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3001&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3001&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])
36120.15-------
37119.8-------
38120.27-------
39120.71-------
40121.87-------
41121.87-------
42121.92-------
43123.72-------
44124.38-------
45123.21-------
46123.17-------
47122.95-------
48123.46-------
49123.24123.4608122.8378124.08380.24360.50110.501
50123.86124.0484123.2839124.81280.31460.980910.9343
51124.28124.4084123.5249125.2920.38790.888110.9823
52124.78125.6535124.6651126.64190.04160.996811
53125.19125.656124.5728126.73920.19950.943511
54125.46125.786124.6158126.95630.29250.840911
55127.6127.596126.3447128.84740.49750.999611
56127.8127.9838126.6564129.31130.3930.714611
57126.63126.9164125.517128.31580.34420.107911
58127.06127.2338125.766128.70170.40820.7911
59126.77126.8815125.3483128.41480.44330.409811
60127.05127.3467125.7507128.94270.35780.760611







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0026-0.00181e-040.04880.00410.0637
500.0031-0.00151e-040.03550.0030.0544
510.0036-0.0011e-040.01650.00140.0371
520.004-0.0076e-040.7630.06360.2522
530.0044-0.00373e-040.21720.01810.1345
540.0047-0.00262e-040.10630.00890.0941
550.00500000.0011
560.0053-0.00141e-040.03380.00280.0531
570.0056-0.00232e-040.0820.00680.0827
580.0059-0.00141e-040.03020.00250.0502
590.0062-9e-041e-040.01240.0010.0322
600.0064-0.00232e-040.0880.00730.0857

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0026 & -0.0018 & 1e-04 & 0.0488 & 0.0041 & 0.0637 \tabularnewline
50 & 0.0031 & -0.0015 & 1e-04 & 0.0355 & 0.003 & 0.0544 \tabularnewline
51 & 0.0036 & -0.001 & 1e-04 & 0.0165 & 0.0014 & 0.0371 \tabularnewline
52 & 0.004 & -0.007 & 6e-04 & 0.763 & 0.0636 & 0.2522 \tabularnewline
53 & 0.0044 & -0.0037 & 3e-04 & 0.2172 & 0.0181 & 0.1345 \tabularnewline
54 & 0.0047 & -0.0026 & 2e-04 & 0.1063 & 0.0089 & 0.0941 \tabularnewline
55 & 0.005 & 0 & 0 & 0 & 0 & 0.0011 \tabularnewline
56 & 0.0053 & -0.0014 & 1e-04 & 0.0338 & 0.0028 & 0.0531 \tabularnewline
57 & 0.0056 & -0.0023 & 2e-04 & 0.082 & 0.0068 & 0.0827 \tabularnewline
58 & 0.0059 & -0.0014 & 1e-04 & 0.0302 & 0.0025 & 0.0502 \tabularnewline
59 & 0.0062 & -9e-04 & 1e-04 & 0.0124 & 0.001 & 0.0322 \tabularnewline
60 & 0.0064 & -0.0023 & 2e-04 & 0.088 & 0.0073 & 0.0857 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3001&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.0026[/C][C]-0.0018[/C][C]1e-04[/C][C]0.0488[/C][C]0.0041[/C][C]0.0637[/C][/ROW]
[ROW][C]50[/C][C]0.0031[/C][C]-0.0015[/C][C]1e-04[/C][C]0.0355[/C][C]0.003[/C][C]0.0544[/C][/ROW]
[ROW][C]51[/C][C]0.0036[/C][C]-0.001[/C][C]1e-04[/C][C]0.0165[/C][C]0.0014[/C][C]0.0371[/C][/ROW]
[ROW][C]52[/C][C]0.004[/C][C]-0.007[/C][C]6e-04[/C][C]0.763[/C][C]0.0636[/C][C]0.2522[/C][/ROW]
[ROW][C]53[/C][C]0.0044[/C][C]-0.0037[/C][C]3e-04[/C][C]0.2172[/C][C]0.0181[/C][C]0.1345[/C][/ROW]
[ROW][C]54[/C][C]0.0047[/C][C]-0.0026[/C][C]2e-04[/C][C]0.1063[/C][C]0.0089[/C][C]0.0941[/C][/ROW]
[ROW][C]55[/C][C]0.005[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0.0011[/C][/ROW]
[ROW][C]56[/C][C]0.0053[/C][C]-0.0014[/C][C]1e-04[/C][C]0.0338[/C][C]0.0028[/C][C]0.0531[/C][/ROW]
[ROW][C]57[/C][C]0.0056[/C][C]-0.0023[/C][C]2e-04[/C][C]0.082[/C][C]0.0068[/C][C]0.0827[/C][/ROW]
[ROW][C]58[/C][C]0.0059[/C][C]-0.0014[/C][C]1e-04[/C][C]0.0302[/C][C]0.0025[/C][C]0.0502[/C][/ROW]
[ROW][C]59[/C][C]0.0062[/C][C]-9e-04[/C][C]1e-04[/C][C]0.0124[/C][C]0.001[/C][C]0.0322[/C][/ROW]
[ROW][C]60[/C][C]0.0064[/C][C]-0.0023[/C][C]2e-04[/C][C]0.088[/C][C]0.0073[/C][C]0.0857[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3001&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3001&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.0026-0.00181e-040.04880.00410.0637
500.0031-0.00151e-040.03550.0030.0544
510.0036-0.0011e-040.01650.00140.0371
520.004-0.0076e-040.7630.06360.2522
530.0044-0.00373e-040.21720.01810.1345
540.0047-0.00262e-040.10630.00890.0941
550.00500000.0011
560.0053-0.00141e-040.03380.00280.0531
570.0056-0.00232e-040.0820.00680.0827
580.0059-0.00141e-040.03020.00250.0502
590.0062-9e-041e-040.01240.0010.0322
600.0064-0.00232e-040.0880.00730.0857



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