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 05:37:10 -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/t1197030267jn2sfqqxxr3vsqd.htm/, Retrieved Sun, 28 Apr 2024 19:46:07 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2779, Retrieved Sun, 28 Apr 2024 19:46:07 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsWorkshop 9 question 1, niet-duurzame consumptiegoederen
Estimated Impact173
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Workshop 9 questi...] [2007-12-07 12:37:10] [181c187d2008ac66a37ecc12859b08c5] [Current]
Feedback Forum

Post a new message
Dataseries X:
112,7
118,4
108,1
105,4
114,6
106,9
115,9
109,8
101,8
114,2
110,8
108,4
127,5
128,6
116,6
127,4
105
108,3
125
111,6
106,5
130,3
115
116,1
134
126,5
125,8
136,4
114,9
110,9
125,5
116,8
116,8
125,5
104,2
115,1
132,8
123,3
124,8
122
117,4
117,9
137,4
114,6
124,7
129,6
109,4
120,9
134,9
136,3
133,2
127,2
122,7
120,5
137,8
119,1
124,3
134,3
121,7
125




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 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 & 4 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=2779&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]4 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=2779&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2779&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 time4 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[48])
36115.1-------
37132.8-------
38123.3-------
39124.8-------
40122-------
41117.4-------
42117.9-------
43137.4-------
44114.6-------
45124.7-------
46129.6-------
47109.4-------
48120.9-------
49134.9139.2523128.6013149.90320.21160.99960.88250.9996
50136.3131.6241120.746142.50210.19980.27750.93320.9733
51133.2127.8194116.7831138.85580.16960.0660.70410.8904
52127.2131.0852117.9894144.18090.28050.37580.9130.9363
53122.7115.7813102.3392129.22340.15650.0480.40670.2277
54120.5120.7126107.0074134.41770.48790.38810.65620.4893
55137.8139.3622124.7137154.01060.41720.99420.60350.9932
56119.1118.3916103.3892133.39390.46310.00560.68980.3716
57124.3121.0884105.7982136.37850.34030.60060.32170.5096
58134.3137.8783122.0392153.71730.3290.95350.84720.9822
59121.7120.5423104.3861136.69840.44420.04760.91180.4827
60125125.3056108.8784141.73290.48550.66650.70040.7004

\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 & 115.1 & - & - & - & - & - & - & - \tabularnewline
37 & 132.8 & - & - & - & - & - & - & - \tabularnewline
38 & 123.3 & - & - & - & - & - & - & - \tabularnewline
39 & 124.8 & - & - & - & - & - & - & - \tabularnewline
40 & 122 & - & - & - & - & - & - & - \tabularnewline
41 & 117.4 & - & - & - & - & - & - & - \tabularnewline
42 & 117.9 & - & - & - & - & - & - & - \tabularnewline
43 & 137.4 & - & - & - & - & - & - & - \tabularnewline
44 & 114.6 & - & - & - & - & - & - & - \tabularnewline
45 & 124.7 & - & - & - & - & - & - & - \tabularnewline
46 & 129.6 & - & - & - & - & - & - & - \tabularnewline
47 & 109.4 & - & - & - & - & - & - & - \tabularnewline
48 & 120.9 & - & - & - & - & - & - & - \tabularnewline
49 & 134.9 & 139.2523 & 128.6013 & 149.9032 & 0.2116 & 0.9996 & 0.8825 & 0.9996 \tabularnewline
50 & 136.3 & 131.6241 & 120.746 & 142.5021 & 0.1998 & 0.2775 & 0.9332 & 0.9733 \tabularnewline
51 & 133.2 & 127.8194 & 116.7831 & 138.8558 & 0.1696 & 0.066 & 0.7041 & 0.8904 \tabularnewline
52 & 127.2 & 131.0852 & 117.9894 & 144.1809 & 0.2805 & 0.3758 & 0.913 & 0.9363 \tabularnewline
53 & 122.7 & 115.7813 & 102.3392 & 129.2234 & 0.1565 & 0.048 & 0.4067 & 0.2277 \tabularnewline
54 & 120.5 & 120.7126 & 107.0074 & 134.4177 & 0.4879 & 0.3881 & 0.6562 & 0.4893 \tabularnewline
55 & 137.8 & 139.3622 & 124.7137 & 154.0106 & 0.4172 & 0.9942 & 0.6035 & 0.9932 \tabularnewline
56 & 119.1 & 118.3916 & 103.3892 & 133.3939 & 0.4631 & 0.0056 & 0.6898 & 0.3716 \tabularnewline
57 & 124.3 & 121.0884 & 105.7982 & 136.3785 & 0.3403 & 0.6006 & 0.3217 & 0.5096 \tabularnewline
58 & 134.3 & 137.8783 & 122.0392 & 153.7173 & 0.329 & 0.9535 & 0.8472 & 0.9822 \tabularnewline
59 & 121.7 & 120.5423 & 104.3861 & 136.6984 & 0.4442 & 0.0476 & 0.9118 & 0.4827 \tabularnewline
60 & 125 & 125.3056 & 108.8784 & 141.7329 & 0.4855 & 0.6665 & 0.7004 & 0.7004 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2779&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]115.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]132.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]123.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]124.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]122[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]117.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]117.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]137.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]114.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]124.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]129.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]109.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]120.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]134.9[/C][C]139.2523[/C][C]128.6013[/C][C]149.9032[/C][C]0.2116[/C][C]0.9996[/C][C]0.8825[/C][C]0.9996[/C][/ROW]
[ROW][C]50[/C][C]136.3[/C][C]131.6241[/C][C]120.746[/C][C]142.5021[/C][C]0.1998[/C][C]0.2775[/C][C]0.9332[/C][C]0.9733[/C][/ROW]
[ROW][C]51[/C][C]133.2[/C][C]127.8194[/C][C]116.7831[/C][C]138.8558[/C][C]0.1696[/C][C]0.066[/C][C]0.7041[/C][C]0.8904[/C][/ROW]
[ROW][C]52[/C][C]127.2[/C][C]131.0852[/C][C]117.9894[/C][C]144.1809[/C][C]0.2805[/C][C]0.3758[/C][C]0.913[/C][C]0.9363[/C][/ROW]
[ROW][C]53[/C][C]122.7[/C][C]115.7813[/C][C]102.3392[/C][C]129.2234[/C][C]0.1565[/C][C]0.048[/C][C]0.4067[/C][C]0.2277[/C][/ROW]
[ROW][C]54[/C][C]120.5[/C][C]120.7126[/C][C]107.0074[/C][C]134.4177[/C][C]0.4879[/C][C]0.3881[/C][C]0.6562[/C][C]0.4893[/C][/ROW]
[ROW][C]55[/C][C]137.8[/C][C]139.3622[/C][C]124.7137[/C][C]154.0106[/C][C]0.4172[/C][C]0.9942[/C][C]0.6035[/C][C]0.9932[/C][/ROW]
[ROW][C]56[/C][C]119.1[/C][C]118.3916[/C][C]103.3892[/C][C]133.3939[/C][C]0.4631[/C][C]0.0056[/C][C]0.6898[/C][C]0.3716[/C][/ROW]
[ROW][C]57[/C][C]124.3[/C][C]121.0884[/C][C]105.7982[/C][C]136.3785[/C][C]0.3403[/C][C]0.6006[/C][C]0.3217[/C][C]0.5096[/C][/ROW]
[ROW][C]58[/C][C]134.3[/C][C]137.8783[/C][C]122.0392[/C][C]153.7173[/C][C]0.329[/C][C]0.9535[/C][C]0.8472[/C][C]0.9822[/C][/ROW]
[ROW][C]59[/C][C]121.7[/C][C]120.5423[/C][C]104.3861[/C][C]136.6984[/C][C]0.4442[/C][C]0.0476[/C][C]0.9118[/C][C]0.4827[/C][/ROW]
[ROW][C]60[/C][C]125[/C][C]125.3056[/C][C]108.8784[/C][C]141.7329[/C][C]0.4855[/C][C]0.6665[/C][C]0.7004[/C][C]0.7004[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2779&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2779&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])
36115.1-------
37132.8-------
38123.3-------
39124.8-------
40122-------
41117.4-------
42117.9-------
43137.4-------
44114.6-------
45124.7-------
46129.6-------
47109.4-------
48120.9-------
49134.9139.2523128.6013149.90320.21160.99960.88250.9996
50136.3131.6241120.746142.50210.19980.27750.93320.9733
51133.2127.8194116.7831138.85580.16960.0660.70410.8904
52127.2131.0852117.9894144.18090.28050.37580.9130.9363
53122.7115.7813102.3392129.22340.15650.0480.40670.2277
54120.5120.7126107.0074134.41770.48790.38810.65620.4893
55137.8139.3622124.7137154.01060.41720.99420.60350.9932
56119.1118.3916103.3892133.39390.46310.00560.68980.3716
57124.3121.0884105.7982136.37850.34030.60060.32170.5096
58134.3137.8783122.0392153.71730.3290.95350.84720.9822
59121.7120.5423104.3861136.69840.44420.04760.91180.4827
60125125.3056108.8784141.73290.48550.66650.70040.7004







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.039-0.03130.002618.94221.57851.2564
500.04220.03550.00321.86431.8221.3498
510.04410.04210.003528.95062.41261.5532
520.051-0.02960.002515.09451.25791.1215
530.05920.05980.00547.86863.9891.9973
540.0579-0.00181e-040.04520.00380.0614
550.0536-0.01129e-042.44040.20340.451
560.06470.0065e-040.50190.04180.2045
570.06440.02650.002210.31450.85950.9271
580.0586-0.0260.002212.80411.0671.033
590.06840.00968e-041.34040.11170.3342
600.0669-0.00242e-040.09340.00780.0882

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.039 & -0.0313 & 0.0026 & 18.9422 & 1.5785 & 1.2564 \tabularnewline
50 & 0.0422 & 0.0355 & 0.003 & 21.8643 & 1.822 & 1.3498 \tabularnewline
51 & 0.0441 & 0.0421 & 0.0035 & 28.9506 & 2.4126 & 1.5532 \tabularnewline
52 & 0.051 & -0.0296 & 0.0025 & 15.0945 & 1.2579 & 1.1215 \tabularnewline
53 & 0.0592 & 0.0598 & 0.005 & 47.8686 & 3.989 & 1.9973 \tabularnewline
54 & 0.0579 & -0.0018 & 1e-04 & 0.0452 & 0.0038 & 0.0614 \tabularnewline
55 & 0.0536 & -0.0112 & 9e-04 & 2.4404 & 0.2034 & 0.451 \tabularnewline
56 & 0.0647 & 0.006 & 5e-04 & 0.5019 & 0.0418 & 0.2045 \tabularnewline
57 & 0.0644 & 0.0265 & 0.0022 & 10.3145 & 0.8595 & 0.9271 \tabularnewline
58 & 0.0586 & -0.026 & 0.0022 & 12.8041 & 1.067 & 1.033 \tabularnewline
59 & 0.0684 & 0.0096 & 8e-04 & 1.3404 & 0.1117 & 0.3342 \tabularnewline
60 & 0.0669 & -0.0024 & 2e-04 & 0.0934 & 0.0078 & 0.0882 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2779&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.039[/C][C]-0.0313[/C][C]0.0026[/C][C]18.9422[/C][C]1.5785[/C][C]1.2564[/C][/ROW]
[ROW][C]50[/C][C]0.0422[/C][C]0.0355[/C][C]0.003[/C][C]21.8643[/C][C]1.822[/C][C]1.3498[/C][/ROW]
[ROW][C]51[/C][C]0.0441[/C][C]0.0421[/C][C]0.0035[/C][C]28.9506[/C][C]2.4126[/C][C]1.5532[/C][/ROW]
[ROW][C]52[/C][C]0.051[/C][C]-0.0296[/C][C]0.0025[/C][C]15.0945[/C][C]1.2579[/C][C]1.1215[/C][/ROW]
[ROW][C]53[/C][C]0.0592[/C][C]0.0598[/C][C]0.005[/C][C]47.8686[/C][C]3.989[/C][C]1.9973[/C][/ROW]
[ROW][C]54[/C][C]0.0579[/C][C]-0.0018[/C][C]1e-04[/C][C]0.0452[/C][C]0.0038[/C][C]0.0614[/C][/ROW]
[ROW][C]55[/C][C]0.0536[/C][C]-0.0112[/C][C]9e-04[/C][C]2.4404[/C][C]0.2034[/C][C]0.451[/C][/ROW]
[ROW][C]56[/C][C]0.0647[/C][C]0.006[/C][C]5e-04[/C][C]0.5019[/C][C]0.0418[/C][C]0.2045[/C][/ROW]
[ROW][C]57[/C][C]0.0644[/C][C]0.0265[/C][C]0.0022[/C][C]10.3145[/C][C]0.8595[/C][C]0.9271[/C][/ROW]
[ROW][C]58[/C][C]0.0586[/C][C]-0.026[/C][C]0.0022[/C][C]12.8041[/C][C]1.067[/C][C]1.033[/C][/ROW]
[ROW][C]59[/C][C]0.0684[/C][C]0.0096[/C][C]8e-04[/C][C]1.3404[/C][C]0.1117[/C][C]0.3342[/C][/ROW]
[ROW][C]60[/C][C]0.0669[/C][C]-0.0024[/C][C]2e-04[/C][C]0.0934[/C][C]0.0078[/C][C]0.0882[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2779&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2779&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.039-0.03130.002618.94221.57851.2564
500.04220.03550.00321.86431.8221.3498
510.04410.04210.003528.95062.41261.5532
520.051-0.02960.002515.09451.25791.1215
530.05920.05980.00547.86863.9891.9973
540.0579-0.00181e-040.04520.00380.0614
550.0536-0.01129e-042.44040.20340.451
560.06470.0065e-040.50190.04180.2045
570.06440.02650.002210.31450.85950.9271
580.0586-0.0260.002212.80411.0671.033
590.06840.00968e-041.34040.11170.3342
600.0669-0.00242e-040.09340.00780.0882



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