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 12:22:40 +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/t1291379295kexy6341dge7uvq.htm/, Retrieved Tue, 07 May 2024 05:45:30 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=104683, Retrieved Tue, 07 May 2024 05:45:30 +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] [cfd788255f1b1b5389e58d7f218c70bf] [Current]
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=104683&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=104683&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104683&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.914303.1343291.6269314.22060.11530.2740.68470.274
63313.468297.0394279.2289313.84090.02770.06660.71650.1341
64314.901297.439274.2727318.9270.05560.07190.73310.2034
65309.16289.0609259.8696315.56340.06860.0280.74280.0982
66316.15295.383261.8594325.47180.08810.18470.74690.2338
67336.544316.3196280.7306348.29080.10750.50410.74670.7258
68339.196317.9239278.0864353.29750.11930.15110.74640.736
69326.738307.3923261.3713347.36880.17140.05950.74610.5168
70320.838304.1142252.858347.89910.2270.15560.74440.4569
71318.62304.3507248.521351.41990.27620.24620.74170.4638
72331.533314.9641257.0406363.77860.25290.44160.73730.6325
73335.378322.6457262.2071373.42720.31160.36580.7330.733

\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 & 303.1343 & 291.6269 & 314.2206 & 0.1153 & 0.274 & 0.6847 & 0.274 \tabularnewline
63 & 313.468 & 297.0394 & 279.2289 & 313.8409 & 0.0277 & 0.0666 & 0.7165 & 0.1341 \tabularnewline
64 & 314.901 & 297.439 & 274.2727 & 318.927 & 0.0556 & 0.0719 & 0.7331 & 0.2034 \tabularnewline
65 & 309.16 & 289.0609 & 259.8696 & 315.5634 & 0.0686 & 0.028 & 0.7428 & 0.0982 \tabularnewline
66 & 316.15 & 295.383 & 261.8594 & 325.4718 & 0.0881 & 0.1847 & 0.7469 & 0.2338 \tabularnewline
67 & 336.544 & 316.3196 & 280.7306 & 348.2908 & 0.1075 & 0.5041 & 0.7467 & 0.7258 \tabularnewline
68 & 339.196 & 317.9239 & 278.0864 & 353.2975 & 0.1193 & 0.1511 & 0.7464 & 0.736 \tabularnewline
69 & 326.738 & 307.3923 & 261.3713 & 347.3688 & 0.1714 & 0.0595 & 0.7461 & 0.5168 \tabularnewline
70 & 320.838 & 304.1142 & 252.858 & 347.8991 & 0.227 & 0.1556 & 0.7444 & 0.4569 \tabularnewline
71 & 318.62 & 304.3507 & 248.521 & 351.4199 & 0.2762 & 0.2462 & 0.7417 & 0.4638 \tabularnewline
72 & 331.533 & 314.9641 & 257.0406 & 363.7786 & 0.2529 & 0.4416 & 0.7373 & 0.6325 \tabularnewline
73 & 335.378 & 322.6457 & 262.2071 & 373.4272 & 0.3116 & 0.3658 & 0.733 & 0.733 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104683&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]303.1343[/C][C]291.6269[/C][C]314.2206[/C][C]0.1153[/C][C]0.274[/C][C]0.6847[/C][C]0.274[/C][/ROW]
[ROW][C]63[/C][C]313.468[/C][C]297.0394[/C][C]279.2289[/C][C]313.8409[/C][C]0.0277[/C][C]0.0666[/C][C]0.7165[/C][C]0.1341[/C][/ROW]
[ROW][C]64[/C][C]314.901[/C][C]297.439[/C][C]274.2727[/C][C]318.927[/C][C]0.0556[/C][C]0.0719[/C][C]0.7331[/C][C]0.2034[/C][/ROW]
[ROW][C]65[/C][C]309.16[/C][C]289.0609[/C][C]259.8696[/C][C]315.5634[/C][C]0.0686[/C][C]0.028[/C][C]0.7428[/C][C]0.0982[/C][/ROW]
[ROW][C]66[/C][C]316.15[/C][C]295.383[/C][C]261.8594[/C][C]325.4718[/C][C]0.0881[/C][C]0.1847[/C][C]0.7469[/C][C]0.2338[/C][/ROW]
[ROW][C]67[/C][C]336.544[/C][C]316.3196[/C][C]280.7306[/C][C]348.2908[/C][C]0.1075[/C][C]0.5041[/C][C]0.7467[/C][C]0.7258[/C][/ROW]
[ROW][C]68[/C][C]339.196[/C][C]317.9239[/C][C]278.0864[/C][C]353.2975[/C][C]0.1193[/C][C]0.1511[/C][C]0.7464[/C][C]0.736[/C][/ROW]
[ROW][C]69[/C][C]326.738[/C][C]307.3923[/C][C]261.3713[/C][C]347.3688[/C][C]0.1714[/C][C]0.0595[/C][C]0.7461[/C][C]0.5168[/C][/ROW]
[ROW][C]70[/C][C]320.838[/C][C]304.1142[/C][C]252.858[/C][C]347.8991[/C][C]0.227[/C][C]0.1556[/C][C]0.7444[/C][C]0.4569[/C][/ROW]
[ROW][C]71[/C][C]318.62[/C][C]304.3507[/C][C]248.521[/C][C]351.4199[/C][C]0.2762[/C][C]0.2462[/C][C]0.7417[/C][C]0.4638[/C][/ROW]
[ROW][C]72[/C][C]331.533[/C][C]314.9641[/C][C]257.0406[/C][C]363.7786[/C][C]0.2529[/C][C]0.4416[/C][C]0.7373[/C][C]0.6325[/C][/ROW]
[ROW][C]73[/C][C]335.378[/C][C]322.6457[/C][C]262.2071[/C][C]373.4272[/C][C]0.3116[/C][C]0.3658[/C][C]0.733[/C][C]0.733[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104683&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104683&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.914303.1343291.6269314.22060.11530.2740.68470.274
63313.468297.0394279.2289313.84090.02770.06660.71650.1341
64314.901297.439274.2727318.9270.05560.07190.73310.2034
65309.16289.0609259.8696315.56340.06860.0280.74280.0982
66316.15295.383261.8594325.47180.08810.18470.74690.2338
67336.544316.3196280.7306348.29080.10750.50410.74670.7258
68339.196317.9239278.0864353.29750.11930.15110.74640.736
69326.738307.3923261.3713347.36880.17140.05950.74610.5168
70320.838304.1142252.858347.89910.2270.15560.74440.4569
71318.62304.3507248.521351.41990.27620.24620.74170.4638
72331.533314.9641257.0406363.77860.25290.44160.73730.6325
73335.378322.6457262.2071373.42720.31160.36580.7330.733







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.01870.0224045.963900
630.02890.05530.0388269.8974157.930612.567
640.03690.05870.0455304.9209206.927414.385
650.04680.06950.0515403.9719256.188516.0059
660.0520.07030.0552431.2672291.204317.0647
670.05160.06390.0567409.0264310.841317.6307
680.05680.06690.0582452.5037331.078818.1956
690.06640.06290.0587374.2569336.47618.3433
700.07350.0550.0583279.6842330.165818.1705
710.07890.04690.0572203.6143317.510717.8188
720.07910.05260.0568274.5296313.603317.7088
730.08030.03950.0553162.1123300.979117.3487

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0187 & 0.0224 & 0 & 45.9639 & 0 & 0 \tabularnewline
63 & 0.0289 & 0.0553 & 0.0388 & 269.8974 & 157.9306 & 12.567 \tabularnewline
64 & 0.0369 & 0.0587 & 0.0455 & 304.9209 & 206.9274 & 14.385 \tabularnewline
65 & 0.0468 & 0.0695 & 0.0515 & 403.9719 & 256.1885 & 16.0059 \tabularnewline
66 & 0.052 & 0.0703 & 0.0552 & 431.2672 & 291.2043 & 17.0647 \tabularnewline
67 & 0.0516 & 0.0639 & 0.0567 & 409.0264 & 310.8413 & 17.6307 \tabularnewline
68 & 0.0568 & 0.0669 & 0.0582 & 452.5037 & 331.0788 & 18.1956 \tabularnewline
69 & 0.0664 & 0.0629 & 0.0587 & 374.2569 & 336.476 & 18.3433 \tabularnewline
70 & 0.0735 & 0.055 & 0.0583 & 279.6842 & 330.1658 & 18.1705 \tabularnewline
71 & 0.0789 & 0.0469 & 0.0572 & 203.6143 & 317.5107 & 17.8188 \tabularnewline
72 & 0.0791 & 0.0526 & 0.0568 & 274.5296 & 313.6033 & 17.7088 \tabularnewline
73 & 0.0803 & 0.0395 & 0.0553 & 162.1123 & 300.9791 & 17.3487 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104683&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.0187[/C][C]0.0224[/C][C]0[/C][C]45.9639[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]63[/C][C]0.0289[/C][C]0.0553[/C][C]0.0388[/C][C]269.8974[/C][C]157.9306[/C][C]12.567[/C][/ROW]
[ROW][C]64[/C][C]0.0369[/C][C]0.0587[/C][C]0.0455[/C][C]304.9209[/C][C]206.9274[/C][C]14.385[/C][/ROW]
[ROW][C]65[/C][C]0.0468[/C][C]0.0695[/C][C]0.0515[/C][C]403.9719[/C][C]256.1885[/C][C]16.0059[/C][/ROW]
[ROW][C]66[/C][C]0.052[/C][C]0.0703[/C][C]0.0552[/C][C]431.2672[/C][C]291.2043[/C][C]17.0647[/C][/ROW]
[ROW][C]67[/C][C]0.0516[/C][C]0.0639[/C][C]0.0567[/C][C]409.0264[/C][C]310.8413[/C][C]17.6307[/C][/ROW]
[ROW][C]68[/C][C]0.0568[/C][C]0.0669[/C][C]0.0582[/C][C]452.5037[/C][C]331.0788[/C][C]18.1956[/C][/ROW]
[ROW][C]69[/C][C]0.0664[/C][C]0.0629[/C][C]0.0587[/C][C]374.2569[/C][C]336.476[/C][C]18.3433[/C][/ROW]
[ROW][C]70[/C][C]0.0735[/C][C]0.055[/C][C]0.0583[/C][C]279.6842[/C][C]330.1658[/C][C]18.1705[/C][/ROW]
[ROW][C]71[/C][C]0.0789[/C][C]0.0469[/C][C]0.0572[/C][C]203.6143[/C][C]317.5107[/C][C]17.8188[/C][/ROW]
[ROW][C]72[/C][C]0.0791[/C][C]0.0526[/C][C]0.0568[/C][C]274.5296[/C][C]313.6033[/C][C]17.7088[/C][/ROW]
[ROW][C]73[/C][C]0.0803[/C][C]0.0395[/C][C]0.0553[/C][C]162.1123[/C][C]300.9791[/C][C]17.3487[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104683&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104683&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.01870.0224045.963900
630.02890.05530.0388269.8974157.930612.567
640.03690.05870.0455304.9209206.927414.385
650.04680.06950.0515403.9719256.188516.0059
660.0520.07030.0552431.2672291.204317.0647
670.05160.06390.0567409.0264310.841317.6307
680.05680.06690.0582452.5037331.078818.1956
690.06640.06290.0587374.2569336.47618.3433
700.07350.0550.0583279.6842330.165818.1705
710.07890.04690.0572203.6143317.510717.8188
720.07910.05260.0568274.5296313.603317.7088
730.08030.03950.0553162.1123300.979117.3487



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