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, 24 Dec 2010 09:41:06 +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/24/t1293183557ocuocn2oc43aefk.htm/, Retrieved Tue, 30 Apr 2024 00:25:00 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114666, Retrieved Tue, 30 Apr 2024 00:25:00 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact145
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [paper - arima for...] [2010-12-24 09:41:06] [5398da98f4f83c6a353e4d3806d4bcaa] [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
644 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 time13 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 13 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114666&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]13 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114666&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114666&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 time13 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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-------
73707372674407.8636645708.9645703106.76270.012210.99731
74739770689285.6107660484.731718086.49053e-040.10920.99961
75777535660233.4049630425.0954690041.7143000.52050.9991
76685030628237.7877591317.6249665157.95050.001300.96840.7963
77730234646929.5645609956.7603683902.368700.02170.98360.9655
78714154606890.9639567957.5033645824.4244000.64630.3863
79630872599926.9416557712.934642140.94910.075400.92060.2776
80719492642656.7701600443.3752684870.1652e-040.70790.72360.9183
81677023624303.0665579753.8047668852.32830.010200.68370.6962
82679272631276.3479585094.9631677457.73270.02080.02610.8750.7856
83718317652086.3238605811.0332698361.61440.00250.12480.39570.9526
84645672618970.1999570469.8109667470.58890.140300.60110.6011

\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 & 674407.8636 & 645708.9645 & 703106.7627 & 0.0122 & 1 & 0.9973 & 1 \tabularnewline
74 & 739770 & 689285.6107 & 660484.731 & 718086.4905 & 3e-04 & 0.1092 & 0.9996 & 1 \tabularnewline
75 & 777535 & 660233.4049 & 630425.0954 & 690041.7143 & 0 & 0 & 0.5205 & 0.9991 \tabularnewline
76 & 685030 & 628237.7877 & 591317.6249 & 665157.9505 & 0.0013 & 0 & 0.9684 & 0.7963 \tabularnewline
77 & 730234 & 646929.5645 & 609956.7603 & 683902.3687 & 0 & 0.0217 & 0.9836 & 0.9655 \tabularnewline
78 & 714154 & 606890.9639 & 567957.5033 & 645824.4244 & 0 & 0 & 0.6463 & 0.3863 \tabularnewline
79 & 630872 & 599926.9416 & 557712.934 & 642140.9491 & 0.0754 & 0 & 0.9206 & 0.2776 \tabularnewline
80 & 719492 & 642656.7701 & 600443.3752 & 684870.165 & 2e-04 & 0.7079 & 0.7236 & 0.9183 \tabularnewline
81 & 677023 & 624303.0665 & 579753.8047 & 668852.3283 & 0.0102 & 0 & 0.6837 & 0.6962 \tabularnewline
82 & 679272 & 631276.3479 & 585094.9631 & 677457.7327 & 0.0208 & 0.0261 & 0.875 & 0.7856 \tabularnewline
83 & 718317 & 652086.3238 & 605811.0332 & 698361.6144 & 0.0025 & 0.1248 & 0.3957 & 0.9526 \tabularnewline
84 & 645672 & 618970.1999 & 570469.8109 & 667470.5889 & 0.1403 & 0 & 0.6011 & 0.6011 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114666&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]674407.8636[/C][C]645708.9645[/C][C]703106.7627[/C][C]0.0122[/C][C]1[/C][C]0.9973[/C][C]1[/C][/ROW]
[ROW][C]74[/C][C]739770[/C][C]689285.6107[/C][C]660484.731[/C][C]718086.4905[/C][C]3e-04[/C][C]0.1092[/C][C]0.9996[/C][C]1[/C][/ROW]
[ROW][C]75[/C][C]777535[/C][C]660233.4049[/C][C]630425.0954[/C][C]690041.7143[/C][C]0[/C][C]0[/C][C]0.5205[/C][C]0.9991[/C][/ROW]
[ROW][C]76[/C][C]685030[/C][C]628237.7877[/C][C]591317.6249[/C][C]665157.9505[/C][C]0.0013[/C][C]0[/C][C]0.9684[/C][C]0.7963[/C][/ROW]
[ROW][C]77[/C][C]730234[/C][C]646929.5645[/C][C]609956.7603[/C][C]683902.3687[/C][C]0[/C][C]0.0217[/C][C]0.9836[/C][C]0.9655[/C][/ROW]
[ROW][C]78[/C][C]714154[/C][C]606890.9639[/C][C]567957.5033[/C][C]645824.4244[/C][C]0[/C][C]0[/C][C]0.6463[/C][C]0.3863[/C][/ROW]
[ROW][C]79[/C][C]630872[/C][C]599926.9416[/C][C]557712.934[/C][C]642140.9491[/C][C]0.0754[/C][C]0[/C][C]0.9206[/C][C]0.2776[/C][/ROW]
[ROW][C]80[/C][C]719492[/C][C]642656.7701[/C][C]600443.3752[/C][C]684870.165[/C][C]2e-04[/C][C]0.7079[/C][C]0.7236[/C][C]0.9183[/C][/ROW]
[ROW][C]81[/C][C]677023[/C][C]624303.0665[/C][C]579753.8047[/C][C]668852.3283[/C][C]0.0102[/C][C]0[/C][C]0.6837[/C][C]0.6962[/C][/ROW]
[ROW][C]82[/C][C]679272[/C][C]631276.3479[/C][C]585094.9631[/C][C]677457.7327[/C][C]0.0208[/C][C]0.0261[/C][C]0.875[/C][C]0.7856[/C][/ROW]
[ROW][C]83[/C][C]718317[/C][C]652086.3238[/C][C]605811.0332[/C][C]698361.6144[/C][C]0.0025[/C][C]0.1248[/C][C]0.3957[/C][C]0.9526[/C][/ROW]
[ROW][C]84[/C][C]645672[/C][C]618970.1999[/C][C]570469.8109[/C][C]667470.5889[/C][C]0.1403[/C][C]0[/C][C]0.6011[/C][C]0.6011[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114666&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114666&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-------
73707372674407.8636645708.9645703106.76270.012210.99731
74739770689285.6107660484.731718086.49053e-040.10920.99961
75777535660233.4049630425.0954690041.7143000.52050.9991
76685030628237.7877591317.6249665157.95050.001300.96840.7963
77730234646929.5645609956.7603683902.368700.02170.98360.9655
78714154606890.9639567957.5033645824.4244000.64630.3863
79630872599926.9416557712.934642140.94910.075400.92060.2776
80719492642656.7701600443.3752684870.1652e-040.70790.72360.9183
81677023624303.0665579753.8047668852.32830.010200.68370.6962
82679272631276.3479585094.9631677457.73270.02080.02610.8750.7856
83718317652086.3238605811.0332698361.61440.00250.12480.39570.9526
84645672618970.1999570469.8109667470.58890.140300.60110.6011







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.02170.048901086634289.507600
740.02130.07320.06112548673561.39691817653925.452342633.9527
750.0230.17770.099913759664224.62145798324025.175376146.7269
760.030.09040.09753225355374.75435155081862.570171798.8988
770.02920.12880.10386939628975.51895511991285.159874242.7861
780.03270.17670.115911505358922.18536510885891.330780690.0607
790.03590.05160.1068957596639.89985717558855.41275614.5413
800.03350.11960.10845903652549.52315740820567.175975768.2029
810.03640.08440.10572779391388.81325411772880.691273564.753
820.03730.0760.10272303582621.55245100953854.777371420.9623
830.03620.10160.10264386502468.69375036003728.769770964.8063
840.040.04310.0977712986128.3734675752262.0768379.4725

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.0217 & 0.0489 & 0 & 1086634289.5076 & 0 & 0 \tabularnewline
74 & 0.0213 & 0.0732 & 0.0611 & 2548673561.3969 & 1817653925.4523 & 42633.9527 \tabularnewline
75 & 0.023 & 0.1777 & 0.0999 & 13759664224.6214 & 5798324025.1753 & 76146.7269 \tabularnewline
76 & 0.03 & 0.0904 & 0.0975 & 3225355374.7543 & 5155081862.5701 & 71798.8988 \tabularnewline
77 & 0.0292 & 0.1288 & 0.1038 & 6939628975.5189 & 5511991285.1598 & 74242.7861 \tabularnewline
78 & 0.0327 & 0.1767 & 0.1159 & 11505358922.1853 & 6510885891.3307 & 80690.0607 \tabularnewline
79 & 0.0359 & 0.0516 & 0.1068 & 957596639.8998 & 5717558855.412 & 75614.5413 \tabularnewline
80 & 0.0335 & 0.1196 & 0.1084 & 5903652549.5231 & 5740820567.1759 & 75768.2029 \tabularnewline
81 & 0.0364 & 0.0844 & 0.1057 & 2779391388.8132 & 5411772880.6912 & 73564.753 \tabularnewline
82 & 0.0373 & 0.076 & 0.1027 & 2303582621.5524 & 5100953854.7773 & 71420.9623 \tabularnewline
83 & 0.0362 & 0.1016 & 0.1026 & 4386502468.6937 & 5036003728.7697 & 70964.8063 \tabularnewline
84 & 0.04 & 0.0431 & 0.0977 & 712986128.373 & 4675752262.07 & 68379.4725 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114666&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.0217[/C][C]0.0489[/C][C]0[/C][C]1086634289.5076[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]0.0213[/C][C]0.0732[/C][C]0.0611[/C][C]2548673561.3969[/C][C]1817653925.4523[/C][C]42633.9527[/C][/ROW]
[ROW][C]75[/C][C]0.023[/C][C]0.1777[/C][C]0.0999[/C][C]13759664224.6214[/C][C]5798324025.1753[/C][C]76146.7269[/C][/ROW]
[ROW][C]76[/C][C]0.03[/C][C]0.0904[/C][C]0.0975[/C][C]3225355374.7543[/C][C]5155081862.5701[/C][C]71798.8988[/C][/ROW]
[ROW][C]77[/C][C]0.0292[/C][C]0.1288[/C][C]0.1038[/C][C]6939628975.5189[/C][C]5511991285.1598[/C][C]74242.7861[/C][/ROW]
[ROW][C]78[/C][C]0.0327[/C][C]0.1767[/C][C]0.1159[/C][C]11505358922.1853[/C][C]6510885891.3307[/C][C]80690.0607[/C][/ROW]
[ROW][C]79[/C][C]0.0359[/C][C]0.0516[/C][C]0.1068[/C][C]957596639.8998[/C][C]5717558855.412[/C][C]75614.5413[/C][/ROW]
[ROW][C]80[/C][C]0.0335[/C][C]0.1196[/C][C]0.1084[/C][C]5903652549.5231[/C][C]5740820567.1759[/C][C]75768.2029[/C][/ROW]
[ROW][C]81[/C][C]0.0364[/C][C]0.0844[/C][C]0.1057[/C][C]2779391388.8132[/C][C]5411772880.6912[/C][C]73564.753[/C][/ROW]
[ROW][C]82[/C][C]0.0373[/C][C]0.076[/C][C]0.1027[/C][C]2303582621.5524[/C][C]5100953854.7773[/C][C]71420.9623[/C][/ROW]
[ROW][C]83[/C][C]0.0362[/C][C]0.1016[/C][C]0.1026[/C][C]4386502468.6937[/C][C]5036003728.7697[/C][C]70964.8063[/C][/ROW]
[ROW][C]84[/C][C]0.04[/C][C]0.0431[/C][C]0.0977[/C][C]712986128.373[/C][C]4675752262.07[/C][C]68379.4725[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114666&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114666&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.02170.048901086634289.507600
740.02130.07320.06112548673561.39691817653925.452342633.9527
750.0230.17770.099913759664224.62145798324025.175376146.7269
760.030.09040.09753225355374.75435155081862.570171798.8988
770.02920.12880.10386939628975.51895511991285.159874242.7861
780.03270.17670.115911505358922.18536510885891.330780690.0607
790.03590.05160.1068957596639.89985717558855.41275614.5413
800.03350.11960.10845903652549.52315740820567.175975768.2029
810.03640.08440.10572779391388.81325411772880.691273564.753
820.03730.0760.10272303582621.55245100953854.777371420.9623
830.03620.10160.10264386502468.69375036003728.769770964.8063
840.040.04310.0977712986128.3734675752262.0768379.4725



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