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 03:52: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/07/t11970245708u17yjgwomr0hat.htm/, Retrieved Mon, 29 Apr 2024 00:34:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2741, Retrieved Mon, 29 Apr 2024 00:34:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsworkshop 9 Q1
Estimated Impact216
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [extrapolation for...] [2007-12-07 10:52:56] [ae3f0dfb5dab6ea17524363c550229d5] [Current]
Feedback Forum

Post a new message
Dataseries X:
97,3
101
113,2
101
105,7
113,9
86,4
96,5
103,3
114,9
105,8
94,2
98,4
99,4
108,8
112,6
104,4
112,2
81,1
97,1
112,6
113,8
107,8
103,2
103,3
101,2
107,7
110,4
101,9
115,9
89,9
88,6
117,2
123,9
100
103,6
94,1
98,7
119,5
112,7
104,4
124,7
89,1
97
121,6
118,8
114
111,5
97,2
102,5
113,4
109,8
104,9
126,1
80
96,8
117,2
112,3
117,3
111,1
102,2
104,3
122,9
107,6
121,3
131,5
89
104,4
128,9
135,9
133,3
121,3
120,5
120,4
137,9
126,1
133,2
146,6
103,4
117,2




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2741&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[68])
5696.8-------
57117.2-------
58112.3-------
59117.3-------
60111.1-------
61102.2-------
62104.3-------
63122.9-------
64107.6-------
65121.3-------
66131.5-------
6789-------
68104.4-------
69128.9120.7736109.1517133.63280.10770.99370.7070.9937
70135.9120.3681108.7853133.18420.00880.0960.89140.9927
71133.3115.6363104.5088127.94860.00256e-040.39560.9632
72121.3111.5032100.7734123.37540.05292e-040.52650.8795
73120.5103.200393.2668114.19180.0016e-040.57080.4153
74120.4106.198295.9761117.50890.00690.00660.62890.6223
75137.9121.6149109.9089134.56760.00690.57290.42290.9954
76126.1113.3799102.4665125.45550.019500.82590.9275
77133.2114.9944103.9257127.24210.00180.03780.15650.955
78146.6130.1693117.6399144.03320.01010.33420.42540.9999
79103.489.53680.917799.07210.002200.54390.0011
80117.2102.765492.8738113.71060.00490.45480.38490.3849

\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[68]) \tabularnewline
56 & 96.8 & - & - & - & - & - & - & - \tabularnewline
57 & 117.2 & - & - & - & - & - & - & - \tabularnewline
58 & 112.3 & - & - & - & - & - & - & - \tabularnewline
59 & 117.3 & - & - & - & - & - & - & - \tabularnewline
60 & 111.1 & - & - & - & - & - & - & - \tabularnewline
61 & 102.2 & - & - & - & - & - & - & - \tabularnewline
62 & 104.3 & - & - & - & - & - & - & - \tabularnewline
63 & 122.9 & - & - & - & - & - & - & - \tabularnewline
64 & 107.6 & - & - & - & - & - & - & - \tabularnewline
65 & 121.3 & - & - & - & - & - & - & - \tabularnewline
66 & 131.5 & - & - & - & - & - & - & - \tabularnewline
67 & 89 & - & - & - & - & - & - & - \tabularnewline
68 & 104.4 & - & - & - & - & - & - & - \tabularnewline
69 & 128.9 & 120.7736 & 109.1517 & 133.6328 & 0.1077 & 0.9937 & 0.707 & 0.9937 \tabularnewline
70 & 135.9 & 120.3681 & 108.7853 & 133.1842 & 0.0088 & 0.096 & 0.8914 & 0.9927 \tabularnewline
71 & 133.3 & 115.6363 & 104.5088 & 127.9486 & 0.0025 & 6e-04 & 0.3956 & 0.9632 \tabularnewline
72 & 121.3 & 111.5032 & 100.7734 & 123.3754 & 0.0529 & 2e-04 & 0.5265 & 0.8795 \tabularnewline
73 & 120.5 & 103.2003 & 93.2668 & 114.1918 & 0.001 & 6e-04 & 0.5708 & 0.4153 \tabularnewline
74 & 120.4 & 106.1982 & 95.9761 & 117.5089 & 0.0069 & 0.0066 & 0.6289 & 0.6223 \tabularnewline
75 & 137.9 & 121.6149 & 109.9089 & 134.5676 & 0.0069 & 0.5729 & 0.4229 & 0.9954 \tabularnewline
76 & 126.1 & 113.3799 & 102.4665 & 125.4555 & 0.0195 & 0 & 0.8259 & 0.9275 \tabularnewline
77 & 133.2 & 114.9944 & 103.9257 & 127.2421 & 0.0018 & 0.0378 & 0.1565 & 0.955 \tabularnewline
78 & 146.6 & 130.1693 & 117.6399 & 144.0332 & 0.0101 & 0.3342 & 0.4254 & 0.9999 \tabularnewline
79 & 103.4 & 89.536 & 80.9177 & 99.0721 & 0.0022 & 0 & 0.5439 & 0.0011 \tabularnewline
80 & 117.2 & 102.7654 & 92.8738 & 113.7106 & 0.0049 & 0.4548 & 0.3849 & 0.3849 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2741&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[68])[/C][/ROW]
[ROW][C]56[/C][C]96.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]112.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]117.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]111.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]102.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]104.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]122.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]107.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]121.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]131.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]104.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]128.9[/C][C]120.7736[/C][C]109.1517[/C][C]133.6328[/C][C]0.1077[/C][C]0.9937[/C][C]0.707[/C][C]0.9937[/C][/ROW]
[ROW][C]70[/C][C]135.9[/C][C]120.3681[/C][C]108.7853[/C][C]133.1842[/C][C]0.0088[/C][C]0.096[/C][C]0.8914[/C][C]0.9927[/C][/ROW]
[ROW][C]71[/C][C]133.3[/C][C]115.6363[/C][C]104.5088[/C][C]127.9486[/C][C]0.0025[/C][C]6e-04[/C][C]0.3956[/C][C]0.9632[/C][/ROW]
[ROW][C]72[/C][C]121.3[/C][C]111.5032[/C][C]100.7734[/C][C]123.3754[/C][C]0.0529[/C][C]2e-04[/C][C]0.5265[/C][C]0.8795[/C][/ROW]
[ROW][C]73[/C][C]120.5[/C][C]103.2003[/C][C]93.2668[/C][C]114.1918[/C][C]0.001[/C][C]6e-04[/C][C]0.5708[/C][C]0.4153[/C][/ROW]
[ROW][C]74[/C][C]120.4[/C][C]106.1982[/C][C]95.9761[/C][C]117.5089[/C][C]0.0069[/C][C]0.0066[/C][C]0.6289[/C][C]0.6223[/C][/ROW]
[ROW][C]75[/C][C]137.9[/C][C]121.6149[/C][C]109.9089[/C][C]134.5676[/C][C]0.0069[/C][C]0.5729[/C][C]0.4229[/C][C]0.9954[/C][/ROW]
[ROW][C]76[/C][C]126.1[/C][C]113.3799[/C][C]102.4665[/C][C]125.4555[/C][C]0.0195[/C][C]0[/C][C]0.8259[/C][C]0.9275[/C][/ROW]
[ROW][C]77[/C][C]133.2[/C][C]114.9944[/C][C]103.9257[/C][C]127.2421[/C][C]0.0018[/C][C]0.0378[/C][C]0.1565[/C][C]0.955[/C][/ROW]
[ROW][C]78[/C][C]146.6[/C][C]130.1693[/C][C]117.6399[/C][C]144.0332[/C][C]0.0101[/C][C]0.3342[/C][C]0.4254[/C][C]0.9999[/C][/ROW]
[ROW][C]79[/C][C]103.4[/C][C]89.536[/C][C]80.9177[/C][C]99.0721[/C][C]0.0022[/C][C]0[/C][C]0.5439[/C][C]0.0011[/C][/ROW]
[ROW][C]80[/C][C]117.2[/C][C]102.7654[/C][C]92.8738[/C][C]113.7106[/C][C]0.0049[/C][C]0.4548[/C][C]0.3849[/C][C]0.3849[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2741&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2741&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[68])
5696.8-------
57117.2-------
58112.3-------
59117.3-------
60111.1-------
61102.2-------
62104.3-------
63122.9-------
64107.6-------
65121.3-------
66131.5-------
6789-------
68104.4-------
69128.9120.7736109.1517133.63280.10770.99370.7070.9937
70135.9120.3681108.7853133.18420.00880.0960.89140.9927
71133.3115.6363104.5088127.94860.00256e-040.39560.9632
72121.3111.5032100.7734123.37540.05292e-040.52650.8795
73120.5103.200393.2668114.19180.0016e-040.57080.4153
74120.4106.198295.9761117.50890.00690.00660.62890.6223
75137.9121.6149109.9089134.56760.00690.57290.42290.9954
76126.1113.3799102.4665125.45550.019500.82590.9275
77133.2114.9944103.9257127.24210.00180.03780.15650.955
78146.6130.1693117.6399144.03320.01010.33420.42540.9999
79103.489.53680.917799.07210.002200.54390.0011
80117.2102.765492.8738113.71060.00490.45480.38490.3849







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.05430.06730.005666.03915.50332.3459
700.05430.1290.0108241.238620.10324.4837
710.05430.15280.0127312.004926.00045.0991
720.05430.08790.007395.97777.99812.8281
730.05430.16760.014299.277924.93984.994
740.05430.13370.0111201.69216.80774.0997
750.05430.13390.0112265.205222.10044.7011
760.05430.11220.0093161.801713.48353.672
770.05430.15830.0132331.442427.62025.2555
780.05430.12620.0105269.966922.49724.7431
790.05430.15480.0129192.211116.01764.0022
800.05430.14050.0117208.356917.36314.1669

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.0543 & 0.0673 & 0.0056 & 66.0391 & 5.5033 & 2.3459 \tabularnewline
70 & 0.0543 & 0.129 & 0.0108 & 241.2386 & 20.1032 & 4.4837 \tabularnewline
71 & 0.0543 & 0.1528 & 0.0127 & 312.0049 & 26.0004 & 5.0991 \tabularnewline
72 & 0.0543 & 0.0879 & 0.0073 & 95.9777 & 7.9981 & 2.8281 \tabularnewline
73 & 0.0543 & 0.1676 & 0.014 & 299.2779 & 24.9398 & 4.994 \tabularnewline
74 & 0.0543 & 0.1337 & 0.0111 & 201.692 & 16.8077 & 4.0997 \tabularnewline
75 & 0.0543 & 0.1339 & 0.0112 & 265.2052 & 22.1004 & 4.7011 \tabularnewline
76 & 0.0543 & 0.1122 & 0.0093 & 161.8017 & 13.4835 & 3.672 \tabularnewline
77 & 0.0543 & 0.1583 & 0.0132 & 331.4424 & 27.6202 & 5.2555 \tabularnewline
78 & 0.0543 & 0.1262 & 0.0105 & 269.9669 & 22.4972 & 4.7431 \tabularnewline
79 & 0.0543 & 0.1548 & 0.0129 & 192.2111 & 16.0176 & 4.0022 \tabularnewline
80 & 0.0543 & 0.1405 & 0.0117 & 208.3569 & 17.3631 & 4.1669 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2741&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]69[/C][C]0.0543[/C][C]0.0673[/C][C]0.0056[/C][C]66.0391[/C][C]5.5033[/C][C]2.3459[/C][/ROW]
[ROW][C]70[/C][C]0.0543[/C][C]0.129[/C][C]0.0108[/C][C]241.2386[/C][C]20.1032[/C][C]4.4837[/C][/ROW]
[ROW][C]71[/C][C]0.0543[/C][C]0.1528[/C][C]0.0127[/C][C]312.0049[/C][C]26.0004[/C][C]5.0991[/C][/ROW]
[ROW][C]72[/C][C]0.0543[/C][C]0.0879[/C][C]0.0073[/C][C]95.9777[/C][C]7.9981[/C][C]2.8281[/C][/ROW]
[ROW][C]73[/C][C]0.0543[/C][C]0.1676[/C][C]0.014[/C][C]299.2779[/C][C]24.9398[/C][C]4.994[/C][/ROW]
[ROW][C]74[/C][C]0.0543[/C][C]0.1337[/C][C]0.0111[/C][C]201.692[/C][C]16.8077[/C][C]4.0997[/C][/ROW]
[ROW][C]75[/C][C]0.0543[/C][C]0.1339[/C][C]0.0112[/C][C]265.2052[/C][C]22.1004[/C][C]4.7011[/C][/ROW]
[ROW][C]76[/C][C]0.0543[/C][C]0.1122[/C][C]0.0093[/C][C]161.8017[/C][C]13.4835[/C][C]3.672[/C][/ROW]
[ROW][C]77[/C][C]0.0543[/C][C]0.1583[/C][C]0.0132[/C][C]331.4424[/C][C]27.6202[/C][C]5.2555[/C][/ROW]
[ROW][C]78[/C][C]0.0543[/C][C]0.1262[/C][C]0.0105[/C][C]269.9669[/C][C]22.4972[/C][C]4.7431[/C][/ROW]
[ROW][C]79[/C][C]0.0543[/C][C]0.1548[/C][C]0.0129[/C][C]192.2111[/C][C]16.0176[/C][C]4.0022[/C][/ROW]
[ROW][C]80[/C][C]0.0543[/C][C]0.1405[/C][C]0.0117[/C][C]208.3569[/C][C]17.3631[/C][C]4.1669[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2741&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2741&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
690.05430.06730.005666.03915.50332.3459
700.05430.1290.0108241.238620.10324.4837
710.05430.15280.0127312.004926.00045.0991
720.05430.08790.007395.97777.99812.8281
730.05430.16760.014299.277924.93984.994
740.05430.13370.0111201.69216.80774.0997
750.05430.13390.0112265.205222.10044.7011
760.05430.11220.0093161.801713.48353.672
770.05430.15830.0132331.442427.62025.2555
780.05430.12620.0105269.966922.49724.7431
790.05430.15480.0129192.211116.01764.0022
800.05430.14050.0117208.356917.36314.1669



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