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 computationFri, 03 Dec 2010 14:11:30 +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/03/t12913854110opkg9uqk1jgvqh.htm/, Retrieved Tue, 07 May 2024 10:47:52 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=104805, Retrieved Tue, 07 May 2024 10:47:52 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact170
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Backward Selection] [Unemployment] [2010-11-29 17:10:28] [b98453cac15ba1066b407e146608df68]
- RMPD      [ARIMA Forecasting] [Paper - Werkloosh...] [2010-12-03 12:22:40] [4a7069087cf9e0eda253aeed7d8c30d6]
-   P           [ARIMA Forecasting] [Paper - Werkloosh...] [2010-12-03 14:11:30] [cfd788255f1b1b5389e58d7f218c70bf] [Current]
-   P             [ARIMA Forecasting] [Paper - Werkloosh...] [2010-12-09 18:58:49] [4a7069087cf9e0eda253aeed7d8c30d6]
Feedback Forum

Post a new message
Dataseries X:
376.974
377.632
378.205
370.861
369.167
371.551
382.842
381.903
384.502
392.058
384.359
388.884
386.586
387.495
385.705
378.67
377.367
376.911
389.827
387.82
387.267
380.575
372.402
376.74
377.795
376.126
370.804
367.98
367.866
366.121
379.421
378.519
372.423
355.072
344.693
342.892
344.178
337.606
327.103
323.953
316.532
306.307
327.225
329.573
313.761
307.836
300.074
304.198
306.122
300.414
292.133
290.616
280.244
285.179
305.486
305.957
293.886
289.441
288.776
299.149
306.532
309.914
313.468
314.901
309.16
316.15
336.544
339.196
326.738
320.838
318.62
331.533
335.378




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104805&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104805&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104805&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'George Udny Yule' @ 72.249.76.132







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[61])
49306.122-------
50300.414-------
51292.133-------
52290.616-------
53280.244-------
54285.179-------
55305.486-------
56305.957-------
57293.886-------
58289.441-------
59288.776-------
60299.149-------
61306.532-------
62309.914301.2886290.8607311.71650.05250.16220.56530.1622
63313.468293.0471277.6595308.43480.00460.01580.54630.0429
64314.901291.5335272.3884310.67860.00840.01240.53740.0623
65309.16281.1618258.881303.44260.00690.00150.53220.0128
66316.15286.0968261.0699311.12380.00930.03540.52870.0548
67336.544306.4038278.9036333.9040.01590.24360.52610.4964
68339.196306.8748277.1061336.64350.01670.02540.52410.509
69326.738294.8038262.9277326.680.02480.00320.52250.2354
70320.838290.3588256.5061324.21150.03880.01760.52120.1745
71318.62289.6938253.9738325.41380.05620.04370.52010.1778
72331.533300.0668262.5724337.56130.050.16610.51910.3677
73335.378307.4498268.2612346.63840.08120.11420.51830.5183

\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[61]) \tabularnewline
49 & 306.122 & - & - & - & - & - & - & - \tabularnewline
50 & 300.414 & - & - & - & - & - & - & - \tabularnewline
51 & 292.133 & - & - & - & - & - & - & - \tabularnewline
52 & 290.616 & - & - & - & - & - & - & - \tabularnewline
53 & 280.244 & - & - & - & - & - & - & - \tabularnewline
54 & 285.179 & - & - & - & - & - & - & - \tabularnewline
55 & 305.486 & - & - & - & - & - & - & - \tabularnewline
56 & 305.957 & - & - & - & - & - & - & - \tabularnewline
57 & 293.886 & - & - & - & - & - & - & - \tabularnewline
58 & 289.441 & - & - & - & - & - & - & - \tabularnewline
59 & 288.776 & - & - & - & - & - & - & - \tabularnewline
60 & 299.149 & - & - & - & - & - & - & - \tabularnewline
61 & 306.532 & - & - & - & - & - & - & - \tabularnewline
62 & 309.914 & 301.2886 & 290.8607 & 311.7165 & 0.0525 & 0.1622 & 0.5653 & 0.1622 \tabularnewline
63 & 313.468 & 293.0471 & 277.6595 & 308.4348 & 0.0046 & 0.0158 & 0.5463 & 0.0429 \tabularnewline
64 & 314.901 & 291.5335 & 272.3884 & 310.6786 & 0.0084 & 0.0124 & 0.5374 & 0.0623 \tabularnewline
65 & 309.16 & 281.1618 & 258.881 & 303.4426 & 0.0069 & 0.0015 & 0.5322 & 0.0128 \tabularnewline
66 & 316.15 & 286.0968 & 261.0699 & 311.1238 & 0.0093 & 0.0354 & 0.5287 & 0.0548 \tabularnewline
67 & 336.544 & 306.4038 & 278.9036 & 333.904 & 0.0159 & 0.2436 & 0.5261 & 0.4964 \tabularnewline
68 & 339.196 & 306.8748 & 277.1061 & 336.6435 & 0.0167 & 0.0254 & 0.5241 & 0.509 \tabularnewline
69 & 326.738 & 294.8038 & 262.9277 & 326.68 & 0.0248 & 0.0032 & 0.5225 & 0.2354 \tabularnewline
70 & 320.838 & 290.3588 & 256.5061 & 324.2115 & 0.0388 & 0.0176 & 0.5212 & 0.1745 \tabularnewline
71 & 318.62 & 289.6938 & 253.9738 & 325.4138 & 0.0562 & 0.0437 & 0.5201 & 0.1778 \tabularnewline
72 & 331.533 & 300.0668 & 262.5724 & 337.5613 & 0.05 & 0.1661 & 0.5191 & 0.3677 \tabularnewline
73 & 335.378 & 307.4498 & 268.2612 & 346.6384 & 0.0812 & 0.1142 & 0.5183 & 0.5183 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104805&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[61])[/C][/ROW]
[ROW][C]49[/C][C]306.122[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]300.414[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]292.133[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]290.616[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]280.244[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]285.179[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]305.486[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]305.957[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]293.886[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]289.441[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]288.776[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]299.149[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]306.532[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]309.914[/C][C]301.2886[/C][C]290.8607[/C][C]311.7165[/C][C]0.0525[/C][C]0.1622[/C][C]0.5653[/C][C]0.1622[/C][/ROW]
[ROW][C]63[/C][C]313.468[/C][C]293.0471[/C][C]277.6595[/C][C]308.4348[/C][C]0.0046[/C][C]0.0158[/C][C]0.5463[/C][C]0.0429[/C][/ROW]
[ROW][C]64[/C][C]314.901[/C][C]291.5335[/C][C]272.3884[/C][C]310.6786[/C][C]0.0084[/C][C]0.0124[/C][C]0.5374[/C][C]0.0623[/C][/ROW]
[ROW][C]65[/C][C]309.16[/C][C]281.1618[/C][C]258.881[/C][C]303.4426[/C][C]0.0069[/C][C]0.0015[/C][C]0.5322[/C][C]0.0128[/C][/ROW]
[ROW][C]66[/C][C]316.15[/C][C]286.0968[/C][C]261.0699[/C][C]311.1238[/C][C]0.0093[/C][C]0.0354[/C][C]0.5287[/C][C]0.0548[/C][/ROW]
[ROW][C]67[/C][C]336.544[/C][C]306.4038[/C][C]278.9036[/C][C]333.904[/C][C]0.0159[/C][C]0.2436[/C][C]0.5261[/C][C]0.4964[/C][/ROW]
[ROW][C]68[/C][C]339.196[/C][C]306.8748[/C][C]277.1061[/C][C]336.6435[/C][C]0.0167[/C][C]0.0254[/C][C]0.5241[/C][C]0.509[/C][/ROW]
[ROW][C]69[/C][C]326.738[/C][C]294.8038[/C][C]262.9277[/C][C]326.68[/C][C]0.0248[/C][C]0.0032[/C][C]0.5225[/C][C]0.2354[/C][/ROW]
[ROW][C]70[/C][C]320.838[/C][C]290.3588[/C][C]256.5061[/C][C]324.2115[/C][C]0.0388[/C][C]0.0176[/C][C]0.5212[/C][C]0.1745[/C][/ROW]
[ROW][C]71[/C][C]318.62[/C][C]289.6938[/C][C]253.9738[/C][C]325.4138[/C][C]0.0562[/C][C]0.0437[/C][C]0.5201[/C][C]0.1778[/C][/ROW]
[ROW][C]72[/C][C]331.533[/C][C]300.0668[/C][C]262.5724[/C][C]337.5613[/C][C]0.05[/C][C]0.1661[/C][C]0.5191[/C][C]0.3677[/C][/ROW]
[ROW][C]73[/C][C]335.378[/C][C]307.4498[/C][C]268.2612[/C][C]346.6384[/C][C]0.0812[/C][C]0.1142[/C][C]0.5183[/C][C]0.5183[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104805&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104805&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[61])
49306.122-------
50300.414-------
51292.133-------
52290.616-------
53280.244-------
54285.179-------
55305.486-------
56305.957-------
57293.886-------
58289.441-------
59288.776-------
60299.149-------
61306.532-------
62309.914301.2886290.8607311.71650.05250.16220.56530.1622
63313.468293.0471277.6595308.43480.00460.01580.54630.0429
64314.901291.5335272.3884310.67860.00840.01240.53740.0623
65309.16281.1618258.881303.44260.00690.00150.53220.0128
66316.15286.0968261.0699311.12380.00930.03540.52870.0548
67336.544306.4038278.9036333.9040.01590.24360.52610.4964
68339.196306.8748277.1061336.64350.01670.02540.52410.509
69326.738294.8038262.9277326.680.02480.00320.52250.2354
70320.838290.3588256.5061324.21150.03880.01760.52120.1745
71318.62289.6938253.9738325.41380.05620.04370.52010.1778
72331.533300.0668262.5724337.56130.050.16610.51910.3677
73335.378307.4498268.2612346.63840.08120.11420.51830.5183







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.01770.0286074.397400
630.02680.06970.0492417.0113245.704415.675
640.03350.08020.0595546.0395345.816118.5961
650.04040.09960.0695783.8993455.336921.3386
660.04460.1050.0766903.1935544.908223.3433
670.04580.09840.0802908.4302605.495224.6068
680.04950.10530.08381044.6584668.232825.8502
690.05520.10830.08691019.7916712.177626.6867
700.05950.1050.0889928.9801736.266827.1342
710.06290.09990.09836.7236746.312527.3187
720.06380.10490.0913990.1202768.476827.7214
730.0650.09080.0913779.983769.435727.7387

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0177 & 0.0286 & 0 & 74.3974 & 0 & 0 \tabularnewline
63 & 0.0268 & 0.0697 & 0.0492 & 417.0113 & 245.7044 & 15.675 \tabularnewline
64 & 0.0335 & 0.0802 & 0.0595 & 546.0395 & 345.8161 & 18.5961 \tabularnewline
65 & 0.0404 & 0.0996 & 0.0695 & 783.8993 & 455.3369 & 21.3386 \tabularnewline
66 & 0.0446 & 0.105 & 0.0766 & 903.1935 & 544.9082 & 23.3433 \tabularnewline
67 & 0.0458 & 0.0984 & 0.0802 & 908.4302 & 605.4952 & 24.6068 \tabularnewline
68 & 0.0495 & 0.1053 & 0.0838 & 1044.6584 & 668.2328 & 25.8502 \tabularnewline
69 & 0.0552 & 0.1083 & 0.0869 & 1019.7916 & 712.1776 & 26.6867 \tabularnewline
70 & 0.0595 & 0.105 & 0.0889 & 928.9801 & 736.2668 & 27.1342 \tabularnewline
71 & 0.0629 & 0.0999 & 0.09 & 836.7236 & 746.3125 & 27.3187 \tabularnewline
72 & 0.0638 & 0.1049 & 0.0913 & 990.1202 & 768.4768 & 27.7214 \tabularnewline
73 & 0.065 & 0.0908 & 0.0913 & 779.983 & 769.4357 & 27.7387 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104805&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]62[/C][C]0.0177[/C][C]0.0286[/C][C]0[/C][C]74.3974[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]63[/C][C]0.0268[/C][C]0.0697[/C][C]0.0492[/C][C]417.0113[/C][C]245.7044[/C][C]15.675[/C][/ROW]
[ROW][C]64[/C][C]0.0335[/C][C]0.0802[/C][C]0.0595[/C][C]546.0395[/C][C]345.8161[/C][C]18.5961[/C][/ROW]
[ROW][C]65[/C][C]0.0404[/C][C]0.0996[/C][C]0.0695[/C][C]783.8993[/C][C]455.3369[/C][C]21.3386[/C][/ROW]
[ROW][C]66[/C][C]0.0446[/C][C]0.105[/C][C]0.0766[/C][C]903.1935[/C][C]544.9082[/C][C]23.3433[/C][/ROW]
[ROW][C]67[/C][C]0.0458[/C][C]0.0984[/C][C]0.0802[/C][C]908.4302[/C][C]605.4952[/C][C]24.6068[/C][/ROW]
[ROW][C]68[/C][C]0.0495[/C][C]0.1053[/C][C]0.0838[/C][C]1044.6584[/C][C]668.2328[/C][C]25.8502[/C][/ROW]
[ROW][C]69[/C][C]0.0552[/C][C]0.1083[/C][C]0.0869[/C][C]1019.7916[/C][C]712.1776[/C][C]26.6867[/C][/ROW]
[ROW][C]70[/C][C]0.0595[/C][C]0.105[/C][C]0.0889[/C][C]928.9801[/C][C]736.2668[/C][C]27.1342[/C][/ROW]
[ROW][C]71[/C][C]0.0629[/C][C]0.0999[/C][C]0.09[/C][C]836.7236[/C][C]746.3125[/C][C]27.3187[/C][/ROW]
[ROW][C]72[/C][C]0.0638[/C][C]0.1049[/C][C]0.0913[/C][C]990.1202[/C][C]768.4768[/C][C]27.7214[/C][/ROW]
[ROW][C]73[/C][C]0.065[/C][C]0.0908[/C][C]0.0913[/C][C]779.983[/C][C]769.4357[/C][C]27.7387[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104805&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104805&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
620.01770.0286074.397400
630.02680.06970.0492417.0113245.704415.675
640.03350.08020.0595546.0395345.816118.5961
650.04040.09960.0695783.8993455.336921.3386
660.04460.1050.0766903.1935544.908223.3433
670.04580.09840.0802908.4302605.495224.6068
680.04950.10530.08381044.6584668.232825.8502
690.05520.10830.08691019.7916712.177626.6867
700.05950.1050.0889928.9801736.266827.1342
710.06290.09990.09836.7236746.312527.3187
720.06380.10490.0913990.1202768.476827.7214
730.0650.09080.0913779.983769.435727.7387



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