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 computationSat, 29 Nov 2008 06:49:41 -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/Nov/29/t12279666802boeoup40u4mm1r.htm/, Retrieved Thu, 31 Oct 2024 23:21:12 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=26280, Retrieved Thu, 31 Oct 2024 23:21:12 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact231
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] [74be16979710d4c4e7c6647856088456]
-   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] [1b288879226ab9a3cab0c803857233cc] [Current]
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
288,3
333,6
346,3
357,5
490,7
468,2
471,2
517,1
609,2
682
614
554,2




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=26280&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])
48179.6-------
49169.1-------
50169.8-------
51195.5-------
52194.8-------
53204.5-------
54203.8-------
55204.8-------
56204.9-------
57240-------
58248.3-------
59258.4-------
60254.9-------
61288.3251.1358223.6647283.5730.01240.4110.41
62333.6252.5145204.8458317.28480.00710.13940.99380.4712
63346.3266.4327198.0488373.0520.0710.10850.90390.5839
64357.5266.4025184.3168410.41610.10750.13840.83510.5622
65490.7271.2419175.8147458.47270.01080.18330.75760.5679
66468.2271.0052166.2557497.71590.04410.02880.71940.5554
67471.2271.5276158.5269539.55520.07210.07520.68720.5484
68517.1271.6021151.6797581.3040.06010.10330.66350.5421
69609.2286.9763152.0346674.0060.05140.12190.5940.5645
70682290.3138147.6772735.29070.04220.08010.57340.562
71614294.2331143.9991803.34260.10920.06770.55490.5602
72554.2292.8955138.8375853.20760.18030.13070.55290.5529

\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 & 179.6 & - & - & - & - & - & - & - \tabularnewline
49 & 169.1 & - & - & - & - & - & - & - \tabularnewline
50 & 169.8 & - & - & - & - & - & - & - \tabularnewline
51 & 195.5 & - & - & - & - & - & - & - \tabularnewline
52 & 194.8 & - & - & - & - & - & - & - \tabularnewline
53 & 204.5 & - & - & - & - & - & - & - \tabularnewline
54 & 203.8 & - & - & - & - & - & - & - \tabularnewline
55 & 204.8 & - & - & - & - & - & - & - \tabularnewline
56 & 204.9 & - & - & - & - & - & - & - \tabularnewline
57 & 240 & - & - & - & - & - & - & - \tabularnewline
58 & 248.3 & - & - & - & - & - & - & - \tabularnewline
59 & 258.4 & - & - & - & - & - & - & - \tabularnewline
60 & 254.9 & - & - & - & - & - & - & - \tabularnewline
61 & 288.3 & 251.1358 & 223.6647 & 283.573 & 0.0124 & 0.41 & 1 & 0.41 \tabularnewline
62 & 333.6 & 252.5145 & 204.8458 & 317.2848 & 0.0071 & 0.1394 & 0.9938 & 0.4712 \tabularnewline
63 & 346.3 & 266.4327 & 198.0488 & 373.052 & 0.071 & 0.1085 & 0.9039 & 0.5839 \tabularnewline
64 & 357.5 & 266.4025 & 184.3168 & 410.4161 & 0.1075 & 0.1384 & 0.8351 & 0.5622 \tabularnewline
65 & 490.7 & 271.2419 & 175.8147 & 458.4727 & 0.0108 & 0.1833 & 0.7576 & 0.5679 \tabularnewline
66 & 468.2 & 271.0052 & 166.2557 & 497.7159 & 0.0441 & 0.0288 & 0.7194 & 0.5554 \tabularnewline
67 & 471.2 & 271.5276 & 158.5269 & 539.5552 & 0.0721 & 0.0752 & 0.6872 & 0.5484 \tabularnewline
68 & 517.1 & 271.6021 & 151.6797 & 581.304 & 0.0601 & 0.1033 & 0.6635 & 0.5421 \tabularnewline
69 & 609.2 & 286.9763 & 152.0346 & 674.006 & 0.0514 & 0.1219 & 0.594 & 0.5645 \tabularnewline
70 & 682 & 290.3138 & 147.6772 & 735.2907 & 0.0422 & 0.0801 & 0.5734 & 0.562 \tabularnewline
71 & 614 & 294.2331 & 143.9991 & 803.3426 & 0.1092 & 0.0677 & 0.5549 & 0.5602 \tabularnewline
72 & 554.2 & 292.8955 & 138.8375 & 853.2076 & 0.1803 & 0.1307 & 0.5529 & 0.5529 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=26280&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]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]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]169.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]195.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]194.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]204.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]203.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]204.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]204.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]240[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]248.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]258.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]254.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]288.3[/C][C]251.1358[/C][C]223.6647[/C][C]283.573[/C][C]0.0124[/C][C]0.41[/C][C]1[/C][C]0.41[/C][/ROW]
[ROW][C]62[/C][C]333.6[/C][C]252.5145[/C][C]204.8458[/C][C]317.2848[/C][C]0.0071[/C][C]0.1394[/C][C]0.9938[/C][C]0.4712[/C][/ROW]
[ROW][C]63[/C][C]346.3[/C][C]266.4327[/C][C]198.0488[/C][C]373.052[/C][C]0.071[/C][C]0.1085[/C][C]0.9039[/C][C]0.5839[/C][/ROW]
[ROW][C]64[/C][C]357.5[/C][C]266.4025[/C][C]184.3168[/C][C]410.4161[/C][C]0.1075[/C][C]0.1384[/C][C]0.8351[/C][C]0.5622[/C][/ROW]
[ROW][C]65[/C][C]490.7[/C][C]271.2419[/C][C]175.8147[/C][C]458.4727[/C][C]0.0108[/C][C]0.1833[/C][C]0.7576[/C][C]0.5679[/C][/ROW]
[ROW][C]66[/C][C]468.2[/C][C]271.0052[/C][C]166.2557[/C][C]497.7159[/C][C]0.0441[/C][C]0.0288[/C][C]0.7194[/C][C]0.5554[/C][/ROW]
[ROW][C]67[/C][C]471.2[/C][C]271.5276[/C][C]158.5269[/C][C]539.5552[/C][C]0.0721[/C][C]0.0752[/C][C]0.6872[/C][C]0.5484[/C][/ROW]
[ROW][C]68[/C][C]517.1[/C][C]271.6021[/C][C]151.6797[/C][C]581.304[/C][C]0.0601[/C][C]0.1033[/C][C]0.6635[/C][C]0.5421[/C][/ROW]
[ROW][C]69[/C][C]609.2[/C][C]286.9763[/C][C]152.0346[/C][C]674.006[/C][C]0.0514[/C][C]0.1219[/C][C]0.594[/C][C]0.5645[/C][/ROW]
[ROW][C]70[/C][C]682[/C][C]290.3138[/C][C]147.6772[/C][C]735.2907[/C][C]0.0422[/C][C]0.0801[/C][C]0.5734[/C][C]0.562[/C][/ROW]
[ROW][C]71[/C][C]614[/C][C]294.2331[/C][C]143.9991[/C][C]803.3426[/C][C]0.1092[/C][C]0.0677[/C][C]0.5549[/C][C]0.5602[/C][/ROW]
[ROW][C]72[/C][C]554.2[/C][C]292.8955[/C][C]138.8375[/C][C]853.2076[/C][C]0.1803[/C][C]0.1307[/C][C]0.5529[/C][C]0.5529[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=26280&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=26280&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])
48179.6-------
49169.1-------
50169.8-------
51195.5-------
52194.8-------
53204.5-------
54203.8-------
55204.8-------
56204.9-------
57240-------
58248.3-------
59258.4-------
60254.9-------
61288.3251.1358223.6647283.5730.01240.4110.41
62333.6252.5145204.8458317.28480.00710.13940.99380.4712
63346.3266.4327198.0488373.0520.0710.10850.90390.5839
64357.5266.4025184.3168410.41610.10750.13840.83510.5622
65490.7271.2419175.8147458.47270.01080.18330.75760.5679
66468.2271.0052166.2557497.71590.04410.02880.71940.5554
67471.2271.5276158.5269539.55520.07210.07520.68720.5484
68517.1271.6021151.6797581.3040.06010.10330.66350.5421
69609.2286.9763152.0346674.0060.05140.12190.5940.5645
70682290.3138147.6772735.29070.04220.08010.57340.562
71614294.2331143.9991803.34260.10920.06770.55490.5602
72554.2292.8955138.8375853.20760.18030.13070.55290.5529







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.06590.1480.01231381.1789115.098210.7284
620.13090.32110.02686574.8617547.905123.4074
630.20420.29980.0256378.7934531.566123.0557
640.27580.3420.02858298.7532691.562826.2976
650.35220.80910.067448161.86564013.488863.3521
660.42680.72760.060638885.79263240.482756.9252
670.50360.73540.061339869.0653322.422157.6405
680.58180.90390.075360269.23415022.436270.8691
690.68811.12280.0936103828.13398652.344593.018
700.7821.34920.1124153418.045912784.8372113.0701
710.88281.08680.0906102250.8938520.907892.3088
720.9760.89210.074368280.03045690.002575.4321

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0659 & 0.148 & 0.0123 & 1381.1789 & 115.0982 & 10.7284 \tabularnewline
62 & 0.1309 & 0.3211 & 0.0268 & 6574.8617 & 547.9051 & 23.4074 \tabularnewline
63 & 0.2042 & 0.2998 & 0.025 & 6378.7934 & 531.5661 & 23.0557 \tabularnewline
64 & 0.2758 & 0.342 & 0.0285 & 8298.7532 & 691.5628 & 26.2976 \tabularnewline
65 & 0.3522 & 0.8091 & 0.0674 & 48161.8656 & 4013.4888 & 63.3521 \tabularnewline
66 & 0.4268 & 0.7276 & 0.0606 & 38885.7926 & 3240.4827 & 56.9252 \tabularnewline
67 & 0.5036 & 0.7354 & 0.0613 & 39869.065 & 3322.4221 & 57.6405 \tabularnewline
68 & 0.5818 & 0.9039 & 0.0753 & 60269.2341 & 5022.4362 & 70.8691 \tabularnewline
69 & 0.6881 & 1.1228 & 0.0936 & 103828.1339 & 8652.3445 & 93.018 \tabularnewline
70 & 0.782 & 1.3492 & 0.1124 & 153418.0459 & 12784.8372 & 113.0701 \tabularnewline
71 & 0.8828 & 1.0868 & 0.0906 & 102250.893 & 8520.9078 & 92.3088 \tabularnewline
72 & 0.976 & 0.8921 & 0.0743 & 68280.0304 & 5690.0025 & 75.4321 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=26280&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.0659[/C][C]0.148[/C][C]0.0123[/C][C]1381.1789[/C][C]115.0982[/C][C]10.7284[/C][/ROW]
[ROW][C]62[/C][C]0.1309[/C][C]0.3211[/C][C]0.0268[/C][C]6574.8617[/C][C]547.9051[/C][C]23.4074[/C][/ROW]
[ROW][C]63[/C][C]0.2042[/C][C]0.2998[/C][C]0.025[/C][C]6378.7934[/C][C]531.5661[/C][C]23.0557[/C][/ROW]
[ROW][C]64[/C][C]0.2758[/C][C]0.342[/C][C]0.0285[/C][C]8298.7532[/C][C]691.5628[/C][C]26.2976[/C][/ROW]
[ROW][C]65[/C][C]0.3522[/C][C]0.8091[/C][C]0.0674[/C][C]48161.8656[/C][C]4013.4888[/C][C]63.3521[/C][/ROW]
[ROW][C]66[/C][C]0.4268[/C][C]0.7276[/C][C]0.0606[/C][C]38885.7926[/C][C]3240.4827[/C][C]56.9252[/C][/ROW]
[ROW][C]67[/C][C]0.5036[/C][C]0.7354[/C][C]0.0613[/C][C]39869.065[/C][C]3322.4221[/C][C]57.6405[/C][/ROW]
[ROW][C]68[/C][C]0.5818[/C][C]0.9039[/C][C]0.0753[/C][C]60269.2341[/C][C]5022.4362[/C][C]70.8691[/C][/ROW]
[ROW][C]69[/C][C]0.6881[/C][C]1.1228[/C][C]0.0936[/C][C]103828.1339[/C][C]8652.3445[/C][C]93.018[/C][/ROW]
[ROW][C]70[/C][C]0.782[/C][C]1.3492[/C][C]0.1124[/C][C]153418.0459[/C][C]12784.8372[/C][C]113.0701[/C][/ROW]
[ROW][C]71[/C][C]0.8828[/C][C]1.0868[/C][C]0.0906[/C][C]102250.893[/C][C]8520.9078[/C][C]92.3088[/C][/ROW]
[ROW][C]72[/C][C]0.976[/C][C]0.8921[/C][C]0.0743[/C][C]68280.0304[/C][C]5690.0025[/C][C]75.4321[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=26280&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=26280&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.06590.1480.01231381.1789115.098210.7284
620.13090.32110.02686574.8617547.905123.4074
630.20420.29980.0256378.7934531.566123.0557
640.27580.3420.02858298.7532691.562826.2976
650.35220.80910.067448161.86564013.488863.3521
660.42680.72760.060638885.79263240.482756.9252
670.50360.73540.061339869.0653322.422157.6405
680.58180.90390.075360269.23415022.436270.8691
690.68811.12280.0936103828.13398652.344593.018
700.7821.34920.1124153418.045912784.8372113.0701
710.88281.08680.0906102250.8938520.907892.3088
720.9760.89210.074368280.03045690.002575.4321



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