Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 24 Dec 2008 03:37:34 -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/24/t12301150884grbrzuja5di4v5.htm/, Retrieved Fri, 17 May 2024 03:42:01 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36449, Retrieved Fri, 17 May 2024 03:42:01 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact205
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] [339926f84f7378398edd9a77d1fc8e74]
-   PD      [ARIMA Forecasting] [] [2008-12-24 10:37:34] [d41d8cd98f00b204e9800998ecf8427e] [Current]
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 time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 2 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36449&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36449&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36449&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 time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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.9267178.8071219.09070.35120.541610.5416
75197197.2145168.7169230.52550.4950.57960.94910.5097
76216.3197.6639163.511238.95050.18820.51260.91620.5164
77221.4197.38158.1492246.34250.16810.22440.92680.5093
78217.9197.5593154.2407253.04380.23620.19980.79640.5107
79229.7197.446150.4116259.18840.15290.25810.72090.5082
80227.4197.5175147.2098265.01740.19280.1750.57960.5083
81204.2197.4724144.1552270.50950.42840.2110.57950.5072
82196.6197.5009141.4302275.80110.4910.43340.65470.507
83198.8197.4829138.8507280.87350.48770.50830.7030.5064
84207.5197.4943136.4733285.79930.41210.48840.6470.5061
85190.7197.4871134.2217290.57260.44320.41650.50580.5058

\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.9267 & 178.8071 & 219.0907 & 0.3512 & 0.5416 & 1 & 0.5416 \tabularnewline
75 & 197 & 197.2145 & 168.7169 & 230.5255 & 0.495 & 0.5796 & 0.9491 & 0.5097 \tabularnewline
76 & 216.3 & 197.6639 & 163.511 & 238.9505 & 0.1882 & 0.5126 & 0.9162 & 0.5164 \tabularnewline
77 & 221.4 & 197.38 & 158.1492 & 246.3425 & 0.1681 & 0.2244 & 0.9268 & 0.5093 \tabularnewline
78 & 217.9 & 197.5593 & 154.2407 & 253.0438 & 0.2362 & 0.1998 & 0.7964 & 0.5107 \tabularnewline
79 & 229.7 & 197.446 & 150.4116 & 259.1884 & 0.1529 & 0.2581 & 0.7209 & 0.5082 \tabularnewline
80 & 227.4 & 197.5175 & 147.2098 & 265.0174 & 0.1928 & 0.175 & 0.5796 & 0.5083 \tabularnewline
81 & 204.2 & 197.4724 & 144.1552 & 270.5095 & 0.4284 & 0.211 & 0.5795 & 0.5072 \tabularnewline
82 & 196.6 & 197.5009 & 141.4302 & 275.8011 & 0.491 & 0.4334 & 0.6547 & 0.507 \tabularnewline
83 & 198.8 & 197.4829 & 138.8507 & 280.8735 & 0.4877 & 0.5083 & 0.703 & 0.5064 \tabularnewline
84 & 207.5 & 197.4943 & 136.4733 & 285.7993 & 0.4121 & 0.4884 & 0.647 & 0.5061 \tabularnewline
85 & 190.7 & 197.4871 & 134.2217 & 290.5726 & 0.4432 & 0.4165 & 0.5058 & 0.5058 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36449&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.9267[/C][C]178.8071[/C][C]219.0907[/C][C]0.3512[/C][C]0.5416[/C][C]1[/C][C]0.5416[/C][/ROW]
[ROW][C]75[/C][C]197[/C][C]197.2145[/C][C]168.7169[/C][C]230.5255[/C][C]0.495[/C][C]0.5796[/C][C]0.9491[/C][C]0.5097[/C][/ROW]
[ROW][C]76[/C][C]216.3[/C][C]197.6639[/C][C]163.511[/C][C]238.9505[/C][C]0.1882[/C][C]0.5126[/C][C]0.9162[/C][C]0.5164[/C][/ROW]
[ROW][C]77[/C][C]221.4[/C][C]197.38[/C][C]158.1492[/C][C]246.3425[/C][C]0.1681[/C][C]0.2244[/C][C]0.9268[/C][C]0.5093[/C][/ROW]
[ROW][C]78[/C][C]217.9[/C][C]197.5593[/C][C]154.2407[/C][C]253.0438[/C][C]0.2362[/C][C]0.1998[/C][C]0.7964[/C][C]0.5107[/C][/ROW]
[ROW][C]79[/C][C]229.7[/C][C]197.446[/C][C]150.4116[/C][C]259.1884[/C][C]0.1529[/C][C]0.2581[/C][C]0.7209[/C][C]0.5082[/C][/ROW]
[ROW][C]80[/C][C]227.4[/C][C]197.5175[/C][C]147.2098[/C][C]265.0174[/C][C]0.1928[/C][C]0.175[/C][C]0.5796[/C][C]0.5083[/C][/ROW]
[ROW][C]81[/C][C]204.2[/C][C]197.4724[/C][C]144.1552[/C][C]270.5095[/C][C]0.4284[/C][C]0.211[/C][C]0.5795[/C][C]0.5072[/C][/ROW]
[ROW][C]82[/C][C]196.6[/C][C]197.5009[/C][C]141.4302[/C][C]275.8011[/C][C]0.491[/C][C]0.4334[/C][C]0.6547[/C][C]0.507[/C][/ROW]
[ROW][C]83[/C][C]198.8[/C][C]197.4829[/C][C]138.8507[/C][C]280.8735[/C][C]0.4877[/C][C]0.5083[/C][C]0.703[/C][C]0.5064[/C][/ROW]
[ROW][C]84[/C][C]207.5[/C][C]197.4943[/C][C]136.4733[/C][C]285.7993[/C][C]0.4121[/C][C]0.4884[/C][C]0.647[/C][C]0.5061[/C][/ROW]
[ROW][C]85[/C][C]190.7[/C][C]197.4871[/C][C]134.2217[/C][C]290.5726[/C][C]0.4432[/C][C]0.4165[/C][C]0.5058[/C][C]0.5058[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36449&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36449&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.9267178.8071219.09070.35120.541610.5416
75197197.2145168.7169230.52550.4950.57960.94910.5097
76216.3197.6639163.511238.95050.18820.51260.91620.5164
77221.4197.38158.1492246.34250.16810.22440.92680.5093
78217.9197.5593154.2407253.04380.23620.19980.79640.5107
79229.7197.446150.4116259.18840.15290.25810.72090.5082
80227.4197.5175147.2098265.01740.19280.1750.57960.5083
81204.2197.4724144.1552270.50950.42840.2110.57950.5072
82196.6197.5009141.4302275.80110.4910.43340.65470.507
83198.8197.4829138.8507280.87350.48770.50830.7030.5064
84207.5197.4943136.4733285.79930.41210.48840.6470.5061
85190.7197.4871134.2217290.57260.44320.41650.50580.5058







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
740.0546-0.02080.001717.02981.41921.1913
750.0862-0.00111e-040.0460.00380.0619
760.10660.09430.0079347.302828.94195.3798
770.12660.12170.0101576.960548.086.934
780.14330.1030.0086413.74634.47885.8719
790.15950.16340.01361040.31886.69329.3109
800.17440.15130.0126892.962574.41358.6263
810.18870.03410.002845.26093.77171.9421
820.2023-0.00464e-040.81160.06760.2601
830.21540.00676e-041.73480.14460.3802
840.22810.05070.0042100.1158.34292.8884
850.2405-0.03440.002946.06443.83871.9593

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
74 & 0.0546 & -0.0208 & 0.0017 & 17.0298 & 1.4192 & 1.1913 \tabularnewline
75 & 0.0862 & -0.0011 & 1e-04 & 0.046 & 0.0038 & 0.0619 \tabularnewline
76 & 0.1066 & 0.0943 & 0.0079 & 347.3028 & 28.9419 & 5.3798 \tabularnewline
77 & 0.1266 & 0.1217 & 0.0101 & 576.9605 & 48.08 & 6.934 \tabularnewline
78 & 0.1433 & 0.103 & 0.0086 & 413.746 & 34.4788 & 5.8719 \tabularnewline
79 & 0.1595 & 0.1634 & 0.0136 & 1040.318 & 86.6932 & 9.3109 \tabularnewline
80 & 0.1744 & 0.1513 & 0.0126 & 892.9625 & 74.4135 & 8.6263 \tabularnewline
81 & 0.1887 & 0.0341 & 0.0028 & 45.2609 & 3.7717 & 1.9421 \tabularnewline
82 & 0.2023 & -0.0046 & 4e-04 & 0.8116 & 0.0676 & 0.2601 \tabularnewline
83 & 0.2154 & 0.0067 & 6e-04 & 1.7348 & 0.1446 & 0.3802 \tabularnewline
84 & 0.2281 & 0.0507 & 0.0042 & 100.115 & 8.3429 & 2.8884 \tabularnewline
85 & 0.2405 & -0.0344 & 0.0029 & 46.0644 & 3.8387 & 1.9593 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36449&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.0546[/C][C]-0.0208[/C][C]0.0017[/C][C]17.0298[/C][C]1.4192[/C][C]1.1913[/C][/ROW]
[ROW][C]75[/C][C]0.0862[/C][C]-0.0011[/C][C]1e-04[/C][C]0.046[/C][C]0.0038[/C][C]0.0619[/C][/ROW]
[ROW][C]76[/C][C]0.1066[/C][C]0.0943[/C][C]0.0079[/C][C]347.3028[/C][C]28.9419[/C][C]5.3798[/C][/ROW]
[ROW][C]77[/C][C]0.1266[/C][C]0.1217[/C][C]0.0101[/C][C]576.9605[/C][C]48.08[/C][C]6.934[/C][/ROW]
[ROW][C]78[/C][C]0.1433[/C][C]0.103[/C][C]0.0086[/C][C]413.746[/C][C]34.4788[/C][C]5.8719[/C][/ROW]
[ROW][C]79[/C][C]0.1595[/C][C]0.1634[/C][C]0.0136[/C][C]1040.318[/C][C]86.6932[/C][C]9.3109[/C][/ROW]
[ROW][C]80[/C][C]0.1744[/C][C]0.1513[/C][C]0.0126[/C][C]892.9625[/C][C]74.4135[/C][C]8.6263[/C][/ROW]
[ROW][C]81[/C][C]0.1887[/C][C]0.0341[/C][C]0.0028[/C][C]45.2609[/C][C]3.7717[/C][C]1.9421[/C][/ROW]
[ROW][C]82[/C][C]0.2023[/C][C]-0.0046[/C][C]4e-04[/C][C]0.8116[/C][C]0.0676[/C][C]0.2601[/C][/ROW]
[ROW][C]83[/C][C]0.2154[/C][C]0.0067[/C][C]6e-04[/C][C]1.7348[/C][C]0.1446[/C][C]0.3802[/C][/ROW]
[ROW][C]84[/C][C]0.2281[/C][C]0.0507[/C][C]0.0042[/C][C]100.115[/C][C]8.3429[/C][C]2.8884[/C][/ROW]
[ROW][C]85[/C][C]0.2405[/C][C]-0.0344[/C][C]0.0029[/C][C]46.0644[/C][C]3.8387[/C][C]1.9593[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36449&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36449&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.0546-0.02080.001717.02981.41921.1913
750.0862-0.00111e-040.0460.00380.0619
760.10660.09430.0079347.302828.94195.3798
770.12660.12170.0101576.960548.086.934
780.14330.1030.0086413.74634.47885.8719
790.15950.16340.01361040.31886.69329.3109
800.17440.15130.0126892.962574.41358.6263
810.18870.03410.002845.26093.77171.9421
820.2023-0.00464e-040.81160.06760.2601
830.21540.00676e-041.73480.14460.3802
840.22810.05070.0042100.1158.34292.8884
850.2405-0.03440.002946.06443.83871.9593



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