Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 14 Dec 2010 10:41:25 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/14/t1292323277kwrvrqxhcy6tdyu.htm/, Retrieved Thu, 02 May 2024 19:44:25 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=109373, Retrieved Thu, 02 May 2024 19:44:25 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact146
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [(Partial) Autocorrelation Function] [Faillissementen V...] [2010-12-14 08:51:21] [13c73ac943380855a1c72833078e44d2]
-   P   [(Partial) Autocorrelation Function] [Faillissementen V...] [2010-12-14 09:09:28] [13c73ac943380855a1c72833078e44d2]
- RMP     [Spectral Analysis] [Faillissementen V...] [2010-12-14 09:27:52] [13c73ac943380855a1c72833078e44d2]
- RMPD      [(Partial) Autocorrelation Function] [Faillissementen W...] [2010-12-14 10:11:32] [049b50ae610f671f7417ed8e2d1295c1]
- RM          [Spectral Analysis] [Faillissementen W...] [2010-12-14 10:17:19] [049b50ae610f671f7417ed8e2d1295c1]
- RM              [ARIMA Forecasting] [Faillissementen W...] [2010-12-14 10:41:25] [9003764b6a75599accb6eea9154ba195] [Current]
Feedback Forum

Post a new message
Dataseries X:
182
213
227
209
219
221
114
97
205
215
224
189
182
201
198
173
238
258
122
101
259
243
188
173
224
215
196
159
187
208
131
93
210
228
176
195
188
188
190
188
176
225
93
79
235
247
195
197
211
156
209
180
185
303
129
85
249
231
212
240
234
217
287
221
208
241
156
96
320
242
227
200




Summary of computational 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 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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109373&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109373&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109373&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'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[60])
48197-------
49211-------
50156-------
51209-------
52180-------
53185-------
54303-------
55129-------
5685-------
57249-------
58231-------
59212-------
60240-------
61234210.3266162.4972258.15590.1660.1120.4890.112
62217174.7254125.4128224.0380.04650.00920.77160.0047
63287203.9385154.3422253.53475e-040.30290.42070.0771
64221179.5846129.9334229.23590.05100.49350.0085
65208188.7205139.0585238.38250.22340.10130.55840.0215
66241263.5809213.9168313.24490.18640.98590.05990.824
67156118.997969.3335168.66240.072100.34650
689686.23836.5734135.90250.350.0030.51950
69320238.9826189.3181288.64727e-0410.34630.484
70242234.7072185.0427284.37180.38674e-040.55820.4173
71227201.9175152.2531251.58180.16110.05680.34530.0664
72200215.8578166.1943265.52120.26570.33010.17030.1703

\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[60]) \tabularnewline
48 & 197 & - & - & - & - & - & - & - \tabularnewline
49 & 211 & - & - & - & - & - & - & - \tabularnewline
50 & 156 & - & - & - & - & - & - & - \tabularnewline
51 & 209 & - & - & - & - & - & - & - \tabularnewline
52 & 180 & - & - & - & - & - & - & - \tabularnewline
53 & 185 & - & - & - & - & - & - & - \tabularnewline
54 & 303 & - & - & - & - & - & - & - \tabularnewline
55 & 129 & - & - & - & - & - & - & - \tabularnewline
56 & 85 & - & - & - & - & - & - & - \tabularnewline
57 & 249 & - & - & - & - & - & - & - \tabularnewline
58 & 231 & - & - & - & - & - & - & - \tabularnewline
59 & 212 & - & - & - & - & - & - & - \tabularnewline
60 & 240 & - & - & - & - & - & - & - \tabularnewline
61 & 234 & 210.3266 & 162.4972 & 258.1559 & 0.166 & 0.112 & 0.489 & 0.112 \tabularnewline
62 & 217 & 174.7254 & 125.4128 & 224.038 & 0.0465 & 0.0092 & 0.7716 & 0.0047 \tabularnewline
63 & 287 & 203.9385 & 154.3422 & 253.5347 & 5e-04 & 0.3029 & 0.4207 & 0.0771 \tabularnewline
64 & 221 & 179.5846 & 129.9334 & 229.2359 & 0.051 & 0 & 0.4935 & 0.0085 \tabularnewline
65 & 208 & 188.7205 & 139.0585 & 238.3825 & 0.2234 & 0.1013 & 0.5584 & 0.0215 \tabularnewline
66 & 241 & 263.5809 & 213.9168 & 313.2449 & 0.1864 & 0.9859 & 0.0599 & 0.824 \tabularnewline
67 & 156 & 118.9979 & 69.3335 & 168.6624 & 0.0721 & 0 & 0.3465 & 0 \tabularnewline
68 & 96 & 86.238 & 36.5734 & 135.9025 & 0.35 & 0.003 & 0.5195 & 0 \tabularnewline
69 & 320 & 238.9826 & 189.3181 & 288.6472 & 7e-04 & 1 & 0.3463 & 0.484 \tabularnewline
70 & 242 & 234.7072 & 185.0427 & 284.3718 & 0.3867 & 4e-04 & 0.5582 & 0.4173 \tabularnewline
71 & 227 & 201.9175 & 152.2531 & 251.5818 & 0.1611 & 0.0568 & 0.3453 & 0.0664 \tabularnewline
72 & 200 & 215.8578 & 166.1943 & 265.5212 & 0.2657 & 0.3301 & 0.1703 & 0.1703 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109373&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[60])[/C][/ROW]
[ROW][C]48[/C][C]197[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]211[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]156[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]209[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]180[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]185[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]303[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]129[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]249[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]231[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]212[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]240[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]234[/C][C]210.3266[/C][C]162.4972[/C][C]258.1559[/C][C]0.166[/C][C]0.112[/C][C]0.489[/C][C]0.112[/C][/ROW]
[ROW][C]62[/C][C]217[/C][C]174.7254[/C][C]125.4128[/C][C]224.038[/C][C]0.0465[/C][C]0.0092[/C][C]0.7716[/C][C]0.0047[/C][/ROW]
[ROW][C]63[/C][C]287[/C][C]203.9385[/C][C]154.3422[/C][C]253.5347[/C][C]5e-04[/C][C]0.3029[/C][C]0.4207[/C][C]0.0771[/C][/ROW]
[ROW][C]64[/C][C]221[/C][C]179.5846[/C][C]129.9334[/C][C]229.2359[/C][C]0.051[/C][C]0[/C][C]0.4935[/C][C]0.0085[/C][/ROW]
[ROW][C]65[/C][C]208[/C][C]188.7205[/C][C]139.0585[/C][C]238.3825[/C][C]0.2234[/C][C]0.1013[/C][C]0.5584[/C][C]0.0215[/C][/ROW]
[ROW][C]66[/C][C]241[/C][C]263.5809[/C][C]213.9168[/C][C]313.2449[/C][C]0.1864[/C][C]0.9859[/C][C]0.0599[/C][C]0.824[/C][/ROW]
[ROW][C]67[/C][C]156[/C][C]118.9979[/C][C]69.3335[/C][C]168.6624[/C][C]0.0721[/C][C]0[/C][C]0.3465[/C][C]0[/C][/ROW]
[ROW][C]68[/C][C]96[/C][C]86.238[/C][C]36.5734[/C][C]135.9025[/C][C]0.35[/C][C]0.003[/C][C]0.5195[/C][C]0[/C][/ROW]
[ROW][C]69[/C][C]320[/C][C]238.9826[/C][C]189.3181[/C][C]288.6472[/C][C]7e-04[/C][C]1[/C][C]0.3463[/C][C]0.484[/C][/ROW]
[ROW][C]70[/C][C]242[/C][C]234.7072[/C][C]185.0427[/C][C]284.3718[/C][C]0.3867[/C][C]4e-04[/C][C]0.5582[/C][C]0.4173[/C][/ROW]
[ROW][C]71[/C][C]227[/C][C]201.9175[/C][C]152.2531[/C][C]251.5818[/C][C]0.1611[/C][C]0.0568[/C][C]0.3453[/C][C]0.0664[/C][/ROW]
[ROW][C]72[/C][C]200[/C][C]215.8578[/C][C]166.1943[/C][C]265.5212[/C][C]0.2657[/C][C]0.3301[/C][C]0.1703[/C][C]0.1703[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109373&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109373&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[60])
48197-------
49211-------
50156-------
51209-------
52180-------
53185-------
54303-------
55129-------
5685-------
57249-------
58231-------
59212-------
60240-------
61234210.3266162.4972258.15590.1660.1120.4890.112
62217174.7254125.4128224.0380.04650.00920.77160.0047
63287203.9385154.3422253.53475e-040.30290.42070.0771
64221179.5846129.9334229.23590.05100.49350.0085
65208188.7205139.0585238.38250.22340.10130.55840.0215
66241263.5809213.9168313.24490.18640.98590.05990.824
67156118.997969.3335168.66240.072100.34650
689686.23836.5734135.90250.350.0030.51950
69320238.9826189.3181288.64727e-0410.34630.484
70242234.7072185.0427284.37180.38674e-040.55820.4173
71227201.9175152.2531251.58180.16110.05680.34530.0664
72200215.8578166.1943265.52120.26570.33010.17030.1703







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.1160.11260560.432200
620.1440.24190.17731787.1421173.787134.2606
630.12410.40730.25396899.21623082.263555.5181
640.14110.23060.24811715.23212740.505652.3498
650.13430.10220.2189371.69822266.744147.6103
660.0961-0.08570.1967509.8951973.935944.429
670.21290.31090.2131369.15371887.538543.4458
680.29380.11320.200595.2971663.508340.7861
690.1060.3390.21596563.81792207.987146.9892
700.1080.03110.197453.18441992.506944.6375
710.12550.12420.1908629.13421868.563943.2269
720.1174-0.07350.181251.46841733.805941.639

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.116 & 0.1126 & 0 & 560.4322 & 0 & 0 \tabularnewline
62 & 0.144 & 0.2419 & 0.1773 & 1787.142 & 1173.7871 & 34.2606 \tabularnewline
63 & 0.1241 & 0.4073 & 0.2539 & 6899.2162 & 3082.2635 & 55.5181 \tabularnewline
64 & 0.1411 & 0.2306 & 0.2481 & 1715.2321 & 2740.5056 & 52.3498 \tabularnewline
65 & 0.1343 & 0.1022 & 0.2189 & 371.6982 & 2266.7441 & 47.6103 \tabularnewline
66 & 0.0961 & -0.0857 & 0.1967 & 509.895 & 1973.9359 & 44.429 \tabularnewline
67 & 0.2129 & 0.3109 & 0.213 & 1369.1537 & 1887.5385 & 43.4458 \tabularnewline
68 & 0.2938 & 0.1132 & 0.2005 & 95.297 & 1663.5083 & 40.7861 \tabularnewline
69 & 0.106 & 0.339 & 0.2159 & 6563.8179 & 2207.9871 & 46.9892 \tabularnewline
70 & 0.108 & 0.0311 & 0.1974 & 53.1844 & 1992.5069 & 44.6375 \tabularnewline
71 & 0.1255 & 0.1242 & 0.1908 & 629.1342 & 1868.5639 & 43.2269 \tabularnewline
72 & 0.1174 & -0.0735 & 0.181 & 251.4684 & 1733.8059 & 41.639 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109373&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]61[/C][C]0.116[/C][C]0.1126[/C][C]0[/C][C]560.4322[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.144[/C][C]0.2419[/C][C]0.1773[/C][C]1787.142[/C][C]1173.7871[/C][C]34.2606[/C][/ROW]
[ROW][C]63[/C][C]0.1241[/C][C]0.4073[/C][C]0.2539[/C][C]6899.2162[/C][C]3082.2635[/C][C]55.5181[/C][/ROW]
[ROW][C]64[/C][C]0.1411[/C][C]0.2306[/C][C]0.2481[/C][C]1715.2321[/C][C]2740.5056[/C][C]52.3498[/C][/ROW]
[ROW][C]65[/C][C]0.1343[/C][C]0.1022[/C][C]0.2189[/C][C]371.6982[/C][C]2266.7441[/C][C]47.6103[/C][/ROW]
[ROW][C]66[/C][C]0.0961[/C][C]-0.0857[/C][C]0.1967[/C][C]509.895[/C][C]1973.9359[/C][C]44.429[/C][/ROW]
[ROW][C]67[/C][C]0.2129[/C][C]0.3109[/C][C]0.213[/C][C]1369.1537[/C][C]1887.5385[/C][C]43.4458[/C][/ROW]
[ROW][C]68[/C][C]0.2938[/C][C]0.1132[/C][C]0.2005[/C][C]95.297[/C][C]1663.5083[/C][C]40.7861[/C][/ROW]
[ROW][C]69[/C][C]0.106[/C][C]0.339[/C][C]0.2159[/C][C]6563.8179[/C][C]2207.9871[/C][C]46.9892[/C][/ROW]
[ROW][C]70[/C][C]0.108[/C][C]0.0311[/C][C]0.1974[/C][C]53.1844[/C][C]1992.5069[/C][C]44.6375[/C][/ROW]
[ROW][C]71[/C][C]0.1255[/C][C]0.1242[/C][C]0.1908[/C][C]629.1342[/C][C]1868.5639[/C][C]43.2269[/C][/ROW]
[ROW][C]72[/C][C]0.1174[/C][C]-0.0735[/C][C]0.181[/C][C]251.4684[/C][C]1733.8059[/C][C]41.639[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109373&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109373&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
610.1160.11260560.432200
620.1440.24190.17731787.1421173.787134.2606
630.12410.40730.25396899.21623082.263555.5181
640.14110.23060.24811715.23212740.505652.3498
650.13430.10220.2189371.69822266.744147.6103
660.0961-0.08570.1967509.8951973.935944.429
670.21290.31090.2131369.15371887.538543.4458
680.29380.11320.200595.2971663.508340.7861
690.1060.3390.21596563.81792207.987146.9892
700.1080.03110.197453.18441992.506944.6375
710.12550.12420.1908629.13421868.563943.2269
720.1174-0.07350.181251.46841733.805941.639



Parameters (Session):
par1 = 12 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')