Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSun, 21 Dec 2008 05:19:23 -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/21/t1229861995wsw4cyzw1f4kzmq.htm/, Retrieved Sun, 26 May 2024 03:09:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35528, Retrieved Sun, 26 May 2024 03:09:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact171
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [forecast dollarkoers] [2007-12-19 11:18:40] [707a919fab5d6f3020ea3c395672cd86]
-   PD    [ARIMA Forecasting] [] [2008-12-21 12:19:23] [76e580e81b2082744334eb1f6d9ccc3e] [Current]
-   PD      [ARIMA Forecasting] [] [2008-12-24 10:37:34] [74be16979710d4c4e7c6647856088456]
Feedback Forum

Post a new message
Dataseries X:
93,9
97,5
98,1
89,6
98,4
102
99,2
101,8
108,3
106,7
108,2
94,2
95,1
98,1
93,2
94
97,2
95
90,5
91,6
90,5
79,9
74,9
74,3
75,9
77,7
86,9
90,7
91
89,5
92,5
94,1
98,5
96,8
91,2
97,1
104,9
110,9
104,8
94,1
95,8
99,3
101,1
104
99
105,4
107,1
110,7
117,1
118,7
126,5
127,5
134,6
131,8
135,9
142,7
141,7
153,4
145
137,7
148,3
152,2
169,4
168,6
161,1
174,1
179
190,6
190
181,6
174,8
180,5
196,8
193,8
197
216,3
221,4
217,9
229,7
227,4
204,2
196,6
198,8
207,5
190,7




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35528&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[73])
61148.3-------
62152.2-------
63169.4-------
64168.6-------
65161.1-------
66174.1-------
67179-------
68190.6-------
69190-------
70181.6-------
71174.8-------
72180.5-------
73196.8-------
74193.8197.7891184.6427211.11270.27870.557810.5578
75197197.1272176.8807217.79880.49520.62380.99570.5124
76216.3197.57173.075222.68920.07190.51770.98810.524
77221.4197.2737168.679226.72440.05420.10270.9920.5126
78217.9197.472165.6179230.39160.11190.07710.9180.516
79229.7197.3393162.366233.60310.04010.13320.83920.5116
80227.4197.4281159.7161236.64520.06710.05340.63350.5125
81204.2197.3687157.0486239.41580.37510.08080.63440.5106
82196.6197.4084154.6919242.06920.48580.38280.75610.5107
83198.8197.3818152.3801244.54860.47650.5130.8260.5096
84207.5197.3996150.2486246.93440.34470.47790.74820.5095
85190.7197.3877148.179249.20040.40010.3510.50890.5089

\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[73]) \tabularnewline
61 & 148.3 & - & - & - & - & - & - & - \tabularnewline
62 & 152.2 & - & - & - & - & - & - & - \tabularnewline
63 & 169.4 & - & - & - & - & - & - & - \tabularnewline
64 & 168.6 & - & - & - & - & - & - & - \tabularnewline
65 & 161.1 & - & - & - & - & - & - & - \tabularnewline
66 & 174.1 & - & - & - & - & - & - & - \tabularnewline
67 & 179 & - & - & - & - & - & - & - \tabularnewline
68 & 190.6 & - & - & - & - & - & - & - \tabularnewline
69 & 190 & - & - & - & - & - & - & - \tabularnewline
70 & 181.6 & - & - & - & - & - & - & - \tabularnewline
71 & 174.8 & - & - & - & - & - & - & - \tabularnewline
72 & 180.5 & - & - & - & - & - & - & - \tabularnewline
73 & 196.8 & - & - & - & - & - & - & - \tabularnewline
74 & 193.8 & 197.7891 & 184.6427 & 211.1127 & 0.2787 & 0.5578 & 1 & 0.5578 \tabularnewline
75 & 197 & 197.1272 & 176.8807 & 217.7988 & 0.4952 & 0.6238 & 0.9957 & 0.5124 \tabularnewline
76 & 216.3 & 197.57 & 173.075 & 222.6892 & 0.0719 & 0.5177 & 0.9881 & 0.524 \tabularnewline
77 & 221.4 & 197.2737 & 168.679 & 226.7244 & 0.0542 & 0.1027 & 0.992 & 0.5126 \tabularnewline
78 & 217.9 & 197.472 & 165.6179 & 230.3916 & 0.1119 & 0.0771 & 0.918 & 0.516 \tabularnewline
79 & 229.7 & 197.3393 & 162.366 & 233.6031 & 0.0401 & 0.1332 & 0.8392 & 0.5116 \tabularnewline
80 & 227.4 & 197.4281 & 159.7161 & 236.6452 & 0.0671 & 0.0534 & 0.6335 & 0.5125 \tabularnewline
81 & 204.2 & 197.3687 & 157.0486 & 239.4158 & 0.3751 & 0.0808 & 0.6344 & 0.5106 \tabularnewline
82 & 196.6 & 197.4084 & 154.6919 & 242.0692 & 0.4858 & 0.3828 & 0.7561 & 0.5107 \tabularnewline
83 & 198.8 & 197.3818 & 152.3801 & 244.5486 & 0.4765 & 0.513 & 0.826 & 0.5096 \tabularnewline
84 & 207.5 & 197.3996 & 150.2486 & 246.9344 & 0.3447 & 0.4779 & 0.7482 & 0.5095 \tabularnewline
85 & 190.7 & 197.3877 & 148.179 & 249.2004 & 0.4001 & 0.351 & 0.5089 & 0.5089 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35528&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[73])[/C][/ROW]
[ROW][C]61[/C][C]148.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]152.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]169.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]168.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]161.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]174.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]179[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]190.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]190[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]181.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]174.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]180.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]196.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]193.8[/C][C]197.7891[/C][C]184.6427[/C][C]211.1127[/C][C]0.2787[/C][C]0.5578[/C][C]1[/C][C]0.5578[/C][/ROW]
[ROW][C]75[/C][C]197[/C][C]197.1272[/C][C]176.8807[/C][C]217.7988[/C][C]0.4952[/C][C]0.6238[/C][C]0.9957[/C][C]0.5124[/C][/ROW]
[ROW][C]76[/C][C]216.3[/C][C]197.57[/C][C]173.075[/C][C]222.6892[/C][C]0.0719[/C][C]0.5177[/C][C]0.9881[/C][C]0.524[/C][/ROW]
[ROW][C]77[/C][C]221.4[/C][C]197.2737[/C][C]168.679[/C][C]226.7244[/C][C]0.0542[/C][C]0.1027[/C][C]0.992[/C][C]0.5126[/C][/ROW]
[ROW][C]78[/C][C]217.9[/C][C]197.472[/C][C]165.6179[/C][C]230.3916[/C][C]0.1119[/C][C]0.0771[/C][C]0.918[/C][C]0.516[/C][/ROW]
[ROW][C]79[/C][C]229.7[/C][C]197.3393[/C][C]162.366[/C][C]233.6031[/C][C]0.0401[/C][C]0.1332[/C][C]0.8392[/C][C]0.5116[/C][/ROW]
[ROW][C]80[/C][C]227.4[/C][C]197.4281[/C][C]159.7161[/C][C]236.6452[/C][C]0.0671[/C][C]0.0534[/C][C]0.6335[/C][C]0.5125[/C][/ROW]
[ROW][C]81[/C][C]204.2[/C][C]197.3687[/C][C]157.0486[/C][C]239.4158[/C][C]0.3751[/C][C]0.0808[/C][C]0.6344[/C][C]0.5106[/C][/ROW]
[ROW][C]82[/C][C]196.6[/C][C]197.4084[/C][C]154.6919[/C][C]242.0692[/C][C]0.4858[/C][C]0.3828[/C][C]0.7561[/C][C]0.5107[/C][/ROW]
[ROW][C]83[/C][C]198.8[/C][C]197.3818[/C][C]152.3801[/C][C]244.5486[/C][C]0.4765[/C][C]0.513[/C][C]0.826[/C][C]0.5096[/C][/ROW]
[ROW][C]84[/C][C]207.5[/C][C]197.3996[/C][C]150.2486[/C][C]246.9344[/C][C]0.3447[/C][C]0.4779[/C][C]0.7482[/C][C]0.5095[/C][/ROW]
[ROW][C]85[/C][C]190.7[/C][C]197.3877[/C][C]148.179[/C][C]249.2004[/C][C]0.4001[/C][C]0.351[/C][C]0.5089[/C][C]0.5089[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35528&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35528&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[73])
61148.3-------
62152.2-------
63169.4-------
64168.6-------
65161.1-------
66174.1-------
67179-------
68190.6-------
69190-------
70181.6-------
71174.8-------
72180.5-------
73196.8-------
74193.8197.7891184.6427211.11270.27870.557810.5578
75197197.1272176.8807217.79880.49520.62380.99570.5124
76216.3197.57173.075222.68920.07190.51770.98810.524
77221.4197.2737168.679226.72440.05420.10270.9920.5126
78217.9197.472165.6179230.39160.11190.07710.9180.516
79229.7197.3393162.366233.60310.04010.13320.83920.5116
80227.4197.4281159.7161236.64520.06710.05340.63350.5125
81204.2197.3687157.0486239.41580.37510.08080.63440.5106
82196.6197.4084154.6919242.06920.48580.38280.75610.5107
83198.8197.3818152.3801244.54860.47650.5130.8260.5096
84207.5197.3996150.2486246.93440.34470.47790.74820.5095
85190.7197.3877148.179249.20040.40010.3510.50890.5089







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
740.0344-0.02020.001715.91311.32611.1516
750.0535-6e-041e-040.01620.00130.0367
760.06490.09480.0079350.811429.23435.4069
770.07620.12230.0102582.078448.50656.9647
780.08510.10340.0086417.304334.77545.8971
790.09380.1640.01371047.214787.26799.3417
800.10130.15180.0127898.316574.85978.6522
810.10870.03460.002946.6673.88891.972
820.1154-0.00413e-040.65350.05450.2334
830.12190.00726e-042.01120.16760.4094
840.1280.05120.0043102.01778.50152.9157
850.1339-0.03390.002844.72553.72711.9306

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
74 & 0.0344 & -0.0202 & 0.0017 & 15.9131 & 1.3261 & 1.1516 \tabularnewline
75 & 0.0535 & -6e-04 & 1e-04 & 0.0162 & 0.0013 & 0.0367 \tabularnewline
76 & 0.0649 & 0.0948 & 0.0079 & 350.8114 & 29.2343 & 5.4069 \tabularnewline
77 & 0.0762 & 0.1223 & 0.0102 & 582.0784 & 48.5065 & 6.9647 \tabularnewline
78 & 0.0851 & 0.1034 & 0.0086 & 417.3043 & 34.7754 & 5.8971 \tabularnewline
79 & 0.0938 & 0.164 & 0.0137 & 1047.2147 & 87.2679 & 9.3417 \tabularnewline
80 & 0.1013 & 0.1518 & 0.0127 & 898.3165 & 74.8597 & 8.6522 \tabularnewline
81 & 0.1087 & 0.0346 & 0.0029 & 46.667 & 3.8889 & 1.972 \tabularnewline
82 & 0.1154 & -0.0041 & 3e-04 & 0.6535 & 0.0545 & 0.2334 \tabularnewline
83 & 0.1219 & 0.0072 & 6e-04 & 2.0112 & 0.1676 & 0.4094 \tabularnewline
84 & 0.128 & 0.0512 & 0.0043 & 102.0177 & 8.5015 & 2.9157 \tabularnewline
85 & 0.1339 & -0.0339 & 0.0028 & 44.7255 & 3.7271 & 1.9306 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35528&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]74[/C][C]0.0344[/C][C]-0.0202[/C][C]0.0017[/C][C]15.9131[/C][C]1.3261[/C][C]1.1516[/C][/ROW]
[ROW][C]75[/C][C]0.0535[/C][C]-6e-04[/C][C]1e-04[/C][C]0.0162[/C][C]0.0013[/C][C]0.0367[/C][/ROW]
[ROW][C]76[/C][C]0.0649[/C][C]0.0948[/C][C]0.0079[/C][C]350.8114[/C][C]29.2343[/C][C]5.4069[/C][/ROW]
[ROW][C]77[/C][C]0.0762[/C][C]0.1223[/C][C]0.0102[/C][C]582.0784[/C][C]48.5065[/C][C]6.9647[/C][/ROW]
[ROW][C]78[/C][C]0.0851[/C][C]0.1034[/C][C]0.0086[/C][C]417.3043[/C][C]34.7754[/C][C]5.8971[/C][/ROW]
[ROW][C]79[/C][C]0.0938[/C][C]0.164[/C][C]0.0137[/C][C]1047.2147[/C][C]87.2679[/C][C]9.3417[/C][/ROW]
[ROW][C]80[/C][C]0.1013[/C][C]0.1518[/C][C]0.0127[/C][C]898.3165[/C][C]74.8597[/C][C]8.6522[/C][/ROW]
[ROW][C]81[/C][C]0.1087[/C][C]0.0346[/C][C]0.0029[/C][C]46.667[/C][C]3.8889[/C][C]1.972[/C][/ROW]
[ROW][C]82[/C][C]0.1154[/C][C]-0.0041[/C][C]3e-04[/C][C]0.6535[/C][C]0.0545[/C][C]0.2334[/C][/ROW]
[ROW][C]83[/C][C]0.1219[/C][C]0.0072[/C][C]6e-04[/C][C]2.0112[/C][C]0.1676[/C][C]0.4094[/C][/ROW]
[ROW][C]84[/C][C]0.128[/C][C]0.0512[/C][C]0.0043[/C][C]102.0177[/C][C]8.5015[/C][C]2.9157[/C][/ROW]
[ROW][C]85[/C][C]0.1339[/C][C]-0.0339[/C][C]0.0028[/C][C]44.7255[/C][C]3.7271[/C][C]1.9306[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35528&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35528&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
740.0344-0.02020.001715.91311.32611.1516
750.0535-6e-041e-040.01620.00130.0367
760.06490.09480.0079350.811429.23435.4069
770.07620.12230.0102582.078448.50656.9647
780.08510.10340.0086417.304334.77545.8971
790.09380.1640.01371047.214787.26799.3417
800.10130.15180.0127898.316574.85978.6522
810.10870.03460.002946.6673.88891.972
820.1154-0.00413e-040.65350.05450.2334
830.12190.00726e-042.01120.16760.4094
840.1280.05120.0043102.01778.50152.9157
850.1339-0.03390.002844.72553.72711.9306



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