Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 26 Dec 2007 08:58: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/26/t1198683699lylxpvah96k13nc.htm/, Retrieved Mon, 29 Apr 2024 20:15:24 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4892, Retrieved Mon, 29 Apr 2024 20:15:24 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact329
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [ARIMA Forecasting...] [2007-12-13 16:13:11] [ede03b06b9ae6a59763c2cc70a5f12fe]
- R PD    [ARIMA Forecasting] [ARIMA Forecast 60] [2007-12-26 15:58:10] [d41d8cd98f00b204e9800998ecf8427e] [Current]
-   PD      [ARIMA Forecasting] [Voorspelling H0 ] [2008-11-29 13:36:48] [8545382734d98368249ce527c6558129]
-    D        [ARIMA Forecasting] [ARIMA H1 ] [2008-11-29 13:44:08] [8545382734d98368249ce527c6558129]
-    D          [ARIMA Forecasting] [Voorspelling stee...] [2008-11-29 13:49:41] [8545382734d98368249ce527c6558129]
Feedback Forum

Post a new message
Dataseries X:
95.4
101.2
101.5
101.9
101.7
100.1
97.4
96.5
99.2
102.2
105.3
111.1
114.9
124.5
142.2
159.7
165.2
198.6
207.8
219.6
239.6
235.3
218.5
213.8
205.5
198.4
198.5
190.2
180.7
193.6
192.8
195.5
197.2
196.9
178.9
172.4
156.4
143.7
153.6
168.8
185.8
199.9
205.4
197.5
199.6
200.5
193.7
179.6
169.1
169.8
195.5
194.8
204.5
203.8
204.8
204.9
240
248.3
258.4
254.9




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4892&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[48])
36172.4-------
37156.4-------
38143.7-------
39153.6-------
40168.8-------
41185.8-------
42199.9-------
43205.4-------
44197.5-------
45199.6-------
46200.5-------
47193.7-------
48179.6-------
49169.1172.3087156.1771191.28180.37010.22570.94990.2257
50169.8167.4499140.9193202.98210.44840.46370.90490.2514
51195.5164.1557129.0157217.56310.1250.41790.65080.2854
52194.8161.8957119.5604234.56930.18740.18240.42610.3165
53204.5160.3326111.9101253.74620.1770.23480.29650.343
54203.8159.2453105.6056274.98350.22530.22170.24560.3652
55204.8158.4861100.3187298.26860.2580.26260.25530.3836
56204.9157.954495.8142323.66150.28940.28980.320.399
57240157.581491.921351.28280.20210.3160.33540.4118
58248.3157.319488.5129381.30780.2130.23470.35280.4227
59258.4157.135185.4959413.96620.21980.24330.39010.4319
60254.9157.005482.7984449.54360.25590.24850.43980.4398

\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 & 172.4 & - & - & - & - & - & - & - \tabularnewline
37 & 156.4 & - & - & - & - & - & - & - \tabularnewline
38 & 143.7 & - & - & - & - & - & - & - \tabularnewline
39 & 153.6 & - & - & - & - & - & - & - \tabularnewline
40 & 168.8 & - & - & - & - & - & - & - \tabularnewline
41 & 185.8 & - & - & - & - & - & - & - \tabularnewline
42 & 199.9 & - & - & - & - & - & - & - \tabularnewline
43 & 205.4 & - & - & - & - & - & - & - \tabularnewline
44 & 197.5 & - & - & - & - & - & - & - \tabularnewline
45 & 199.6 & - & - & - & - & - & - & - \tabularnewline
46 & 200.5 & - & - & - & - & - & - & - \tabularnewline
47 & 193.7 & - & - & - & - & - & - & - \tabularnewline
48 & 179.6 & - & - & - & - & - & - & - \tabularnewline
49 & 169.1 & 172.3087 & 156.1771 & 191.2818 & 0.3701 & 0.2257 & 0.9499 & 0.2257 \tabularnewline
50 & 169.8 & 167.4499 & 140.9193 & 202.9821 & 0.4484 & 0.4637 & 0.9049 & 0.2514 \tabularnewline
51 & 195.5 & 164.1557 & 129.0157 & 217.5631 & 0.125 & 0.4179 & 0.6508 & 0.2854 \tabularnewline
52 & 194.8 & 161.8957 & 119.5604 & 234.5693 & 0.1874 & 0.1824 & 0.4261 & 0.3165 \tabularnewline
53 & 204.5 & 160.3326 & 111.9101 & 253.7462 & 0.177 & 0.2348 & 0.2965 & 0.343 \tabularnewline
54 & 203.8 & 159.2453 & 105.6056 & 274.9835 & 0.2253 & 0.2217 & 0.2456 & 0.3652 \tabularnewline
55 & 204.8 & 158.4861 & 100.3187 & 298.2686 & 0.258 & 0.2626 & 0.2553 & 0.3836 \tabularnewline
56 & 204.9 & 157.9544 & 95.8142 & 323.6615 & 0.2894 & 0.2898 & 0.32 & 0.399 \tabularnewline
57 & 240 & 157.5814 & 91.921 & 351.2828 & 0.2021 & 0.316 & 0.3354 & 0.4118 \tabularnewline
58 & 248.3 & 157.3194 & 88.5129 & 381.3078 & 0.213 & 0.2347 & 0.3528 & 0.4227 \tabularnewline
59 & 258.4 & 157.1351 & 85.4959 & 413.9662 & 0.2198 & 0.2433 & 0.3901 & 0.4319 \tabularnewline
60 & 254.9 & 157.0054 & 82.7984 & 449.5436 & 0.2559 & 0.2485 & 0.4398 & 0.4398 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4892&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]172.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]156.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]143.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]153.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]168.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]185.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]199.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]205.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]197.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]199.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]200.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]193.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]179.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]169.1[/C][C]172.3087[/C][C]156.1771[/C][C]191.2818[/C][C]0.3701[/C][C]0.2257[/C][C]0.9499[/C][C]0.2257[/C][/ROW]
[ROW][C]50[/C][C]169.8[/C][C]167.4499[/C][C]140.9193[/C][C]202.9821[/C][C]0.4484[/C][C]0.4637[/C][C]0.9049[/C][C]0.2514[/C][/ROW]
[ROW][C]51[/C][C]195.5[/C][C]164.1557[/C][C]129.0157[/C][C]217.5631[/C][C]0.125[/C][C]0.4179[/C][C]0.6508[/C][C]0.2854[/C][/ROW]
[ROW][C]52[/C][C]194.8[/C][C]161.8957[/C][C]119.5604[/C][C]234.5693[/C][C]0.1874[/C][C]0.1824[/C][C]0.4261[/C][C]0.3165[/C][/ROW]
[ROW][C]53[/C][C]204.5[/C][C]160.3326[/C][C]111.9101[/C][C]253.7462[/C][C]0.177[/C][C]0.2348[/C][C]0.2965[/C][C]0.343[/C][/ROW]
[ROW][C]54[/C][C]203.8[/C][C]159.2453[/C][C]105.6056[/C][C]274.9835[/C][C]0.2253[/C][C]0.2217[/C][C]0.2456[/C][C]0.3652[/C][/ROW]
[ROW][C]55[/C][C]204.8[/C][C]158.4861[/C][C]100.3187[/C][C]298.2686[/C][C]0.258[/C][C]0.2626[/C][C]0.2553[/C][C]0.3836[/C][/ROW]
[ROW][C]56[/C][C]204.9[/C][C]157.9544[/C][C]95.8142[/C][C]323.6615[/C][C]0.2894[/C][C]0.2898[/C][C]0.32[/C][C]0.399[/C][/ROW]
[ROW][C]57[/C][C]240[/C][C]157.5814[/C][C]91.921[/C][C]351.2828[/C][C]0.2021[/C][C]0.316[/C][C]0.3354[/C][C]0.4118[/C][/ROW]
[ROW][C]58[/C][C]248.3[/C][C]157.3194[/C][C]88.5129[/C][C]381.3078[/C][C]0.213[/C][C]0.2347[/C][C]0.3528[/C][C]0.4227[/C][/ROW]
[ROW][C]59[/C][C]258.4[/C][C]157.1351[/C][C]85.4959[/C][C]413.9662[/C][C]0.2198[/C][C]0.2433[/C][C]0.3901[/C][C]0.4319[/C][/ROW]
[ROW][C]60[/C][C]254.9[/C][C]157.0054[/C][C]82.7984[/C][C]449.5436[/C][C]0.2559[/C][C]0.2485[/C][C]0.4398[/C][C]0.4398[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4892&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4892&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])
36172.4-------
37156.4-------
38143.7-------
39153.6-------
40168.8-------
41185.8-------
42199.9-------
43205.4-------
44197.5-------
45199.6-------
46200.5-------
47193.7-------
48179.6-------
49169.1172.3087156.1771191.28180.37010.22570.94990.2257
50169.8167.4499140.9193202.98210.44840.46370.90490.2514
51195.5164.1557129.0157217.56310.1250.41790.65080.2854
52194.8161.8957119.5604234.56930.18740.18240.42610.3165
53204.5160.3326111.9101253.74620.1770.23480.29650.343
54203.8159.2453105.6056274.98350.22530.22170.24560.3652
55204.8158.4861100.3187298.26860.2580.26260.25530.3836
56204.9157.954495.8142323.66150.28940.28980.320.399
57240157.581491.921351.28280.20210.3160.33540.4118
58248.3157.319488.5129381.30780.2130.23470.35280.4227
59258.4157.135185.4959413.96620.21980.24330.39010.4319
60254.9157.005482.7984449.54360.25590.24850.43980.4398







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0562-0.01860.001610.29590.8580.9263
500.10830.0140.00125.52290.46020.6784
510.1660.19090.0159982.46781.87229.0483
520.2290.20320.01691082.694890.22469.4987
530.29730.27550.0231950.7636162.563612.75
540.37080.27980.02331985.1216165.426812.8618
550.450.29220.02442144.9815178.748513.3697
560.53520.29720.02482203.8888183.657413.552
570.62720.5230.04366792.8247566.068723.7922
580.72640.57830.04828277.4775689.789826.2638
590.83390.64440.053710254.5842854.548729.2327
600.95060.62350.0529583.3516798.612628.2597

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0562 & -0.0186 & 0.0016 & 10.2959 & 0.858 & 0.9263 \tabularnewline
50 & 0.1083 & 0.014 & 0.0012 & 5.5229 & 0.4602 & 0.6784 \tabularnewline
51 & 0.166 & 0.1909 & 0.0159 & 982.467 & 81.8722 & 9.0483 \tabularnewline
52 & 0.229 & 0.2032 & 0.0169 & 1082.6948 & 90.2246 & 9.4987 \tabularnewline
53 & 0.2973 & 0.2755 & 0.023 & 1950.7636 & 162.5636 & 12.75 \tabularnewline
54 & 0.3708 & 0.2798 & 0.0233 & 1985.1216 & 165.4268 & 12.8618 \tabularnewline
55 & 0.45 & 0.2922 & 0.0244 & 2144.9815 & 178.7485 & 13.3697 \tabularnewline
56 & 0.5352 & 0.2972 & 0.0248 & 2203.8888 & 183.6574 & 13.552 \tabularnewline
57 & 0.6272 & 0.523 & 0.0436 & 6792.8247 & 566.0687 & 23.7922 \tabularnewline
58 & 0.7264 & 0.5783 & 0.0482 & 8277.4775 & 689.7898 & 26.2638 \tabularnewline
59 & 0.8339 & 0.6444 & 0.0537 & 10254.5842 & 854.5487 & 29.2327 \tabularnewline
60 & 0.9506 & 0.6235 & 0.052 & 9583.3516 & 798.6126 & 28.2597 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4892&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.0562[/C][C]-0.0186[/C][C]0.0016[/C][C]10.2959[/C][C]0.858[/C][C]0.9263[/C][/ROW]
[ROW][C]50[/C][C]0.1083[/C][C]0.014[/C][C]0.0012[/C][C]5.5229[/C][C]0.4602[/C][C]0.6784[/C][/ROW]
[ROW][C]51[/C][C]0.166[/C][C]0.1909[/C][C]0.0159[/C][C]982.467[/C][C]81.8722[/C][C]9.0483[/C][/ROW]
[ROW][C]52[/C][C]0.229[/C][C]0.2032[/C][C]0.0169[/C][C]1082.6948[/C][C]90.2246[/C][C]9.4987[/C][/ROW]
[ROW][C]53[/C][C]0.2973[/C][C]0.2755[/C][C]0.023[/C][C]1950.7636[/C][C]162.5636[/C][C]12.75[/C][/ROW]
[ROW][C]54[/C][C]0.3708[/C][C]0.2798[/C][C]0.0233[/C][C]1985.1216[/C][C]165.4268[/C][C]12.8618[/C][/ROW]
[ROW][C]55[/C][C]0.45[/C][C]0.2922[/C][C]0.0244[/C][C]2144.9815[/C][C]178.7485[/C][C]13.3697[/C][/ROW]
[ROW][C]56[/C][C]0.5352[/C][C]0.2972[/C][C]0.0248[/C][C]2203.8888[/C][C]183.6574[/C][C]13.552[/C][/ROW]
[ROW][C]57[/C][C]0.6272[/C][C]0.523[/C][C]0.0436[/C][C]6792.8247[/C][C]566.0687[/C][C]23.7922[/C][/ROW]
[ROW][C]58[/C][C]0.7264[/C][C]0.5783[/C][C]0.0482[/C][C]8277.4775[/C][C]689.7898[/C][C]26.2638[/C][/ROW]
[ROW][C]59[/C][C]0.8339[/C][C]0.6444[/C][C]0.0537[/C][C]10254.5842[/C][C]854.5487[/C][C]29.2327[/C][/ROW]
[ROW][C]60[/C][C]0.9506[/C][C]0.6235[/C][C]0.052[/C][C]9583.3516[/C][C]798.6126[/C][C]28.2597[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4892&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4892&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.0562-0.01860.001610.29590.8580.9263
500.10830.0140.00125.52290.46020.6784
510.1660.19090.0159982.46781.87229.0483
520.2290.20320.01691082.694890.22469.4987
530.29730.27550.0231950.7636162.563612.75
540.37080.27980.02331985.1216165.426812.8618
550.450.29220.02442144.9815178.748513.3697
560.53520.29720.02482203.8888183.657413.552
570.62720.5230.04366792.8247566.068723.7922
580.72640.57830.04828277.4775689.789826.2638
590.83390.64440.053710254.5842854.548729.2327
600.95060.62350.0529583.3516798.612628.2597



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