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 computationSun, 19 Dec 2010 20:20:33 +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/19/t1292789922crrir4mhl4czuro.htm/, Retrieved Sat, 04 May 2024 22:09:07 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=112735, Retrieved Sat, 04 May 2024 22:09:07 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact140
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 Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-    D      [ARIMA Forecasting] [WS 9 Forecasting ...] [2010-12-03 22:01:04] [8081b8996d5947580de3eb171e82db4f]
-   PD        [ARIMA Forecasting] [Workshop 9, Forecast] [2010-12-05 20:21:31] [3635fb7041b1998c5a1332cf9de22bce]
-   P           [ARIMA Forecasting] [ARIMA Extrapolati...] [2010-12-06 22:58:10] [3635fb7041b1998c5a1332cf9de22bce]
-   P             [ARIMA Forecasting] [Verbetering WS9] [2010-12-14 19:20:19] [3635fb7041b1998c5a1332cf9de22bce]
-   PD              [ARIMA Forecasting] [Paper Forecast] [2010-12-19 18:06:55] [3635fb7041b1998c5a1332cf9de22bce]
-                       [ARIMA Forecasting] [Paper Forecast] [2010-12-19 20:20:33] [99c051a77087383325372ff23bc64341] [Current]
Feedback Forum

Post a new message
Dataseries X:
631 923
654 294
671 833
586 840
600 969
625 568
558 110
630 577
628 654
603 184
656 255
600 730
670 326
678 423
641 502
625 311
628 177
589 767
582 471
636 248
599 885
621 694
637 406
595 994
696 308
674 201
648 861
649 605
672 392
598 396
613 177
638 104
615 632
634 465
638 686
604 243
706 669
677 185
644 328
664 825
605 707
600 136
612 166
599 659
634 210
618 234
613 576
627 200
668 973
651 479
619 661
644 260
579 936
601 752
595 376
588 902
634 341
594 305
606 200
610 926
633 685
639 696
659 451
593 248
606 677
599 434
569 578
629 873
613 438
604 172
658 328
612 633
707 372
739 770
777 535
685 030
730 234
714 154
630 872
719 492
677 023
679 272
718 317
645 672




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 6 seconds \tabularnewline
R Server & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112735&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]6 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112735&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112735&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 time6 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk







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[72])
60610926-------
61633685-------
62639696-------
63659451-------
64593248-------
65606677-------
66599434-------
67569578-------
68629873-------
69613438-------
70604172-------
71658328-------
72612633-------
73707372671154.4557640371.2524706289.79460.02170.99950.98170.9995
74739770693939.6458660221.2797732751.15470.01030.24880.99691
75777535665246.2267633569.2379701598.0127000.62270.9977
76685030629837.8017596551.3209668666.67990.002700.96760.8074
77730234648923.9348612909.3159691289.13681e-040.04740.97470.9534
78714154607181.0005574747.6185645082.4932000.65570.389
79630872597999.2453564767.1893637100.31210.049700.92290.2316
80719492647457.0884606709.5368696550.7550.0020.74610.75870.9178
81677023624005.4466584454.43671727.10960.014700.66790.6798
82679272635120.7095592741.8484686818.38110.04710.05610.87970.8031
83718317658464.1824611855.3295716093.7780.02090.23960.50180.9405
84645672620055.5069577943.0978671630.89310.16521e-040.61110.6111

\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[72]) \tabularnewline
60 & 610926 & - & - & - & - & - & - & - \tabularnewline
61 & 633685 & - & - & - & - & - & - & - \tabularnewline
62 & 639696 & - & - & - & - & - & - & - \tabularnewline
63 & 659451 & - & - & - & - & - & - & - \tabularnewline
64 & 593248 & - & - & - & - & - & - & - \tabularnewline
65 & 606677 & - & - & - & - & - & - & - \tabularnewline
66 & 599434 & - & - & - & - & - & - & - \tabularnewline
67 & 569578 & - & - & - & - & - & - & - \tabularnewline
68 & 629873 & - & - & - & - & - & - & - \tabularnewline
69 & 613438 & - & - & - & - & - & - & - \tabularnewline
70 & 604172 & - & - & - & - & - & - & - \tabularnewline
71 & 658328 & - & - & - & - & - & - & - \tabularnewline
72 & 612633 & - & - & - & - & - & - & - \tabularnewline
73 & 707372 & 671154.4557 & 640371.2524 & 706289.7946 & 0.0217 & 0.9995 & 0.9817 & 0.9995 \tabularnewline
74 & 739770 & 693939.6458 & 660221.2797 & 732751.1547 & 0.0103 & 0.2488 & 0.9969 & 1 \tabularnewline
75 & 777535 & 665246.2267 & 633569.2379 & 701598.0127 & 0 & 0 & 0.6227 & 0.9977 \tabularnewline
76 & 685030 & 629837.8017 & 596551.3209 & 668666.6799 & 0.0027 & 0 & 0.9676 & 0.8074 \tabularnewline
77 & 730234 & 648923.9348 & 612909.3159 & 691289.1368 & 1e-04 & 0.0474 & 0.9747 & 0.9534 \tabularnewline
78 & 714154 & 607181.0005 & 574747.6185 & 645082.4932 & 0 & 0 & 0.6557 & 0.389 \tabularnewline
79 & 630872 & 597999.2453 & 564767.1893 & 637100.3121 & 0.0497 & 0 & 0.9229 & 0.2316 \tabularnewline
80 & 719492 & 647457.0884 & 606709.5368 & 696550.755 & 0.002 & 0.7461 & 0.7587 & 0.9178 \tabularnewline
81 & 677023 & 624005.4466 & 584454.43 & 671727.1096 & 0.0147 & 0 & 0.6679 & 0.6798 \tabularnewline
82 & 679272 & 635120.7095 & 592741.8484 & 686818.3811 & 0.0471 & 0.0561 & 0.8797 & 0.8031 \tabularnewline
83 & 718317 & 658464.1824 & 611855.3295 & 716093.778 & 0.0209 & 0.2396 & 0.5018 & 0.9405 \tabularnewline
84 & 645672 & 620055.5069 & 577943.0978 & 671630.8931 & 0.1652 & 1e-04 & 0.6111 & 0.6111 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112735&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[72])[/C][/ROW]
[ROW][C]60[/C][C]610926[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]633685[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]639696[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]659451[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]593248[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]606677[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]599434[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]569578[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]629873[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]613438[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]604172[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]658328[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]612633[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]707372[/C][C]671154.4557[/C][C]640371.2524[/C][C]706289.7946[/C][C]0.0217[/C][C]0.9995[/C][C]0.9817[/C][C]0.9995[/C][/ROW]
[ROW][C]74[/C][C]739770[/C][C]693939.6458[/C][C]660221.2797[/C][C]732751.1547[/C][C]0.0103[/C][C]0.2488[/C][C]0.9969[/C][C]1[/C][/ROW]
[ROW][C]75[/C][C]777535[/C][C]665246.2267[/C][C]633569.2379[/C][C]701598.0127[/C][C]0[/C][C]0[/C][C]0.6227[/C][C]0.9977[/C][/ROW]
[ROW][C]76[/C][C]685030[/C][C]629837.8017[/C][C]596551.3209[/C][C]668666.6799[/C][C]0.0027[/C][C]0[/C][C]0.9676[/C][C]0.8074[/C][/ROW]
[ROW][C]77[/C][C]730234[/C][C]648923.9348[/C][C]612909.3159[/C][C]691289.1368[/C][C]1e-04[/C][C]0.0474[/C][C]0.9747[/C][C]0.9534[/C][/ROW]
[ROW][C]78[/C][C]714154[/C][C]607181.0005[/C][C]574747.6185[/C][C]645082.4932[/C][C]0[/C][C]0[/C][C]0.6557[/C][C]0.389[/C][/ROW]
[ROW][C]79[/C][C]630872[/C][C]597999.2453[/C][C]564767.1893[/C][C]637100.3121[/C][C]0.0497[/C][C]0[/C][C]0.9229[/C][C]0.2316[/C][/ROW]
[ROW][C]80[/C][C]719492[/C][C]647457.0884[/C][C]606709.5368[/C][C]696550.755[/C][C]0.002[/C][C]0.7461[/C][C]0.7587[/C][C]0.9178[/C][/ROW]
[ROW][C]81[/C][C]677023[/C][C]624005.4466[/C][C]584454.43[/C][C]671727.1096[/C][C]0.0147[/C][C]0[/C][C]0.6679[/C][C]0.6798[/C][/ROW]
[ROW][C]82[/C][C]679272[/C][C]635120.7095[/C][C]592741.8484[/C][C]686818.3811[/C][C]0.0471[/C][C]0.0561[/C][C]0.8797[/C][C]0.8031[/C][/ROW]
[ROW][C]83[/C][C]718317[/C][C]658464.1824[/C][C]611855.3295[/C][C]716093.778[/C][C]0.0209[/C][C]0.2396[/C][C]0.5018[/C][C]0.9405[/C][/ROW]
[ROW][C]84[/C][C]645672[/C][C]620055.5069[/C][C]577943.0978[/C][C]671630.8931[/C][C]0.1652[/C][C]1e-04[/C][C]0.6111[/C][C]0.6111[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112735&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112735&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[72])
60610926-------
61633685-------
62639696-------
63659451-------
64593248-------
65606677-------
66599434-------
67569578-------
68629873-------
69613438-------
70604172-------
71658328-------
72612633-------
73707372671154.4557640371.2524706289.79460.02170.99950.98170.9995
74739770693939.6458660221.2797732751.15470.01030.24880.99691
75777535665246.2267633569.2379701598.0127000.62270.9977
76685030629837.8017596551.3209668666.67990.002700.96760.8074
77730234648923.9348612909.3159691289.13681e-040.04740.97470.9534
78714154607181.0005574747.6185645082.4932000.65570.389
79630872597999.2453564767.1893637100.31210.049700.92290.2316
80719492647457.0884606709.5368696550.7550.0020.74610.75870.9178
81677023624005.4466584454.43671727.10960.014700.66790.6798
82679272635120.7095592741.8484686818.38110.04710.05610.87970.8031
83718317658464.1824611855.3295716093.7780.02090.23960.50180.9405
84645672620055.5069577943.0978671630.89310.16521e-040.61110.6111







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.02670.05401311710515.952100
740.02850.0660.062100421366.08561706065941.018941304.5511
750.02790.16880.096312608768603.8285340300161.955273077.3574
760.03150.08760.09413046178751.96434766769809.457569041.7976
770.03330.12530.10036611326694.95055135681186.556171663.6671
780.03180.17620.11311443222618.24536186938091.837778657.0918
790.03340.0550.10471080618003.52245457463793.506973874.6492
800.03870.11130.10555189028493.12295423909380.958973647.1953
810.0390.0850.10322810860967.76335133570668.381671648.9405
820.04150.06950.09991949336455.0064815147247.044169391.262
830.04470.09090.0993582359775.5464703075658.72668578.9739
840.04240.04130.0942656204718.73324365836413.726666074.4763

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.0267 & 0.054 & 0 & 1311710515.9521 & 0 & 0 \tabularnewline
74 & 0.0285 & 0.066 & 0.06 & 2100421366.0856 & 1706065941.0189 & 41304.5511 \tabularnewline
75 & 0.0279 & 0.1688 & 0.0963 & 12608768603.828 & 5340300161.9552 & 73077.3574 \tabularnewline
76 & 0.0315 & 0.0876 & 0.0941 & 3046178751.9643 & 4766769809.4575 & 69041.7976 \tabularnewline
77 & 0.0333 & 0.1253 & 0.1003 & 6611326694.9505 & 5135681186.5561 & 71663.6671 \tabularnewline
78 & 0.0318 & 0.1762 & 0.113 & 11443222618.2453 & 6186938091.8377 & 78657.0918 \tabularnewline
79 & 0.0334 & 0.055 & 0.1047 & 1080618003.5224 & 5457463793.5069 & 73874.6492 \tabularnewline
80 & 0.0387 & 0.1113 & 0.1055 & 5189028493.1229 & 5423909380.9589 & 73647.1953 \tabularnewline
81 & 0.039 & 0.085 & 0.1032 & 2810860967.7633 & 5133570668.3816 & 71648.9405 \tabularnewline
82 & 0.0415 & 0.0695 & 0.0999 & 1949336455.006 & 4815147247.0441 & 69391.262 \tabularnewline
83 & 0.0447 & 0.0909 & 0.099 & 3582359775.546 & 4703075658.726 & 68578.9739 \tabularnewline
84 & 0.0424 & 0.0413 & 0.0942 & 656204718.7332 & 4365836413.7266 & 66074.4763 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112735&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]73[/C][C]0.0267[/C][C]0.054[/C][C]0[/C][C]1311710515.9521[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]0.0285[/C][C]0.066[/C][C]0.06[/C][C]2100421366.0856[/C][C]1706065941.0189[/C][C]41304.5511[/C][/ROW]
[ROW][C]75[/C][C]0.0279[/C][C]0.1688[/C][C]0.0963[/C][C]12608768603.828[/C][C]5340300161.9552[/C][C]73077.3574[/C][/ROW]
[ROW][C]76[/C][C]0.0315[/C][C]0.0876[/C][C]0.0941[/C][C]3046178751.9643[/C][C]4766769809.4575[/C][C]69041.7976[/C][/ROW]
[ROW][C]77[/C][C]0.0333[/C][C]0.1253[/C][C]0.1003[/C][C]6611326694.9505[/C][C]5135681186.5561[/C][C]71663.6671[/C][/ROW]
[ROW][C]78[/C][C]0.0318[/C][C]0.1762[/C][C]0.113[/C][C]11443222618.2453[/C][C]6186938091.8377[/C][C]78657.0918[/C][/ROW]
[ROW][C]79[/C][C]0.0334[/C][C]0.055[/C][C]0.1047[/C][C]1080618003.5224[/C][C]5457463793.5069[/C][C]73874.6492[/C][/ROW]
[ROW][C]80[/C][C]0.0387[/C][C]0.1113[/C][C]0.1055[/C][C]5189028493.1229[/C][C]5423909380.9589[/C][C]73647.1953[/C][/ROW]
[ROW][C]81[/C][C]0.039[/C][C]0.085[/C][C]0.1032[/C][C]2810860967.7633[/C][C]5133570668.3816[/C][C]71648.9405[/C][/ROW]
[ROW][C]82[/C][C]0.0415[/C][C]0.0695[/C][C]0.0999[/C][C]1949336455.006[/C][C]4815147247.0441[/C][C]69391.262[/C][/ROW]
[ROW][C]83[/C][C]0.0447[/C][C]0.0909[/C][C]0.099[/C][C]3582359775.546[/C][C]4703075658.726[/C][C]68578.9739[/C][/ROW]
[ROW][C]84[/C][C]0.0424[/C][C]0.0413[/C][C]0.0942[/C][C]656204718.7332[/C][C]4365836413.7266[/C][C]66074.4763[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112735&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112735&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
730.02670.05401311710515.952100
740.02850.0660.062100421366.08561706065941.018941304.5511
750.02790.16880.096312608768603.8285340300161.955273077.3574
760.03150.08760.09413046178751.96434766769809.457569041.7976
770.03330.12530.10036611326694.95055135681186.556171663.6671
780.03180.17620.11311443222618.24536186938091.837778657.0918
790.03340.0550.10471080618003.52245457463793.506973874.6492
800.03870.11130.10555189028493.12295423909380.958973647.1953
810.0390.0850.10322810860967.76335133570668.381671648.9405
820.04150.06950.09991949336455.0064815147247.044169391.262
830.04470.09090.0993582359775.5464703075658.72668578.9739
840.04240.04130.0942656204718.73324365836413.726666074.4763



Parameters (Session):
par1 = 12 ; par2 = -1.7 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = -1.7 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
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')