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 computationWed, 22 Dec 2010 19:37:44 +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/22/t1293046623yrof9pcuke4q4br.htm/, Retrieved Mon, 06 May 2024 08:19:16 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114529, Retrieved Mon, 06 May 2024 08:19:16 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact107
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]
-   PD      [ARIMA Forecasting] [paper - forecast ...] [2010-12-21 18:52:08] [9894f466352df31a128e82ec8d720241]
-   PD          [ARIMA Forecasting] [paper - arima for...] [2010-12-22 19:37:44] [5398da98f4f83c6a353e4d3806d4bcaa] [Current]
Feedback Forum

Post a new message
Dataseries X:
631923
654294
671833
586840
600969
625568
558110
630577
628654
603184
656255
600730
670326
678423
641502
625311
628177
589767
582471
636248
599885
621694
637406
595994
696308
674201
648861
649605
672392
598396
613177
638104
615632
634465
638686
604243
706669
677185
644328
644825
605707
600136
612166
599659
634210
618234
613576
627200
668973
651479
619661
644260
579936
601752
595376
588902
634341
594305
606200
610926
633685
639696
659451
593248
606677
599434
569578
629873
613438
604172
658328
612633
707372
739770
777535
685030
730234
714154
630872
719492
677023
679272
718317
645672




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114529&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114529&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114529&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'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-------
73707372658733.0943616761.9495700704.23910.01160.98430.87890.9843
74739770658216.9497615906.2839700527.61551e-040.01140.80450.9826
75777535663157.4901618803.0194707511.960904e-040.56510.9872
76685030614676.6212569942.8479659410.39460.00100.82610.5357
77730234618480.8485572888.4619664073.23500.00210.69410.5992
78714154610371.782564147.9225656595.6416000.67860.4618
79630872585474.6421538547.9162632401.36790.02900.74660.1283
80719492633810.7987586224.2784681397.31912e-040.54820.56440.8085
81677023625711.9868577460.1469673963.82670.01861e-040.6910.7024
82679272616195.6431567298.4653665092.82090.00570.00740.68510.5568
83718317655313.6232605767.2787704859.96770.00630.17160.45250.9543
84645672619433.2405569301.3122669565.16880.15251e-040.60480.6048

\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 & 658733.0943 & 616761.9495 & 700704.2391 & 0.0116 & 0.9843 & 0.8789 & 0.9843 \tabularnewline
74 & 739770 & 658216.9497 & 615906.2839 & 700527.6155 & 1e-04 & 0.0114 & 0.8045 & 0.9826 \tabularnewline
75 & 777535 & 663157.4901 & 618803.0194 & 707511.9609 & 0 & 4e-04 & 0.5651 & 0.9872 \tabularnewline
76 & 685030 & 614676.6212 & 569942.8479 & 659410.3946 & 0.001 & 0 & 0.8261 & 0.5357 \tabularnewline
77 & 730234 & 618480.8485 & 572888.4619 & 664073.235 & 0 & 0.0021 & 0.6941 & 0.5992 \tabularnewline
78 & 714154 & 610371.782 & 564147.9225 & 656595.6416 & 0 & 0 & 0.6786 & 0.4618 \tabularnewline
79 & 630872 & 585474.6421 & 538547.9162 & 632401.3679 & 0.029 & 0 & 0.7466 & 0.1283 \tabularnewline
80 & 719492 & 633810.7987 & 586224.2784 & 681397.3191 & 2e-04 & 0.5482 & 0.5644 & 0.8085 \tabularnewline
81 & 677023 & 625711.9868 & 577460.1469 & 673963.8267 & 0.0186 & 1e-04 & 0.691 & 0.7024 \tabularnewline
82 & 679272 & 616195.6431 & 567298.4653 & 665092.8209 & 0.0057 & 0.0074 & 0.6851 & 0.5568 \tabularnewline
83 & 718317 & 655313.6232 & 605767.2787 & 704859.9677 & 0.0063 & 0.1716 & 0.4525 & 0.9543 \tabularnewline
84 & 645672 & 619433.2405 & 569301.3122 & 669565.1688 & 0.1525 & 1e-04 & 0.6048 & 0.6048 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114529&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]658733.0943[/C][C]616761.9495[/C][C]700704.2391[/C][C]0.0116[/C][C]0.9843[/C][C]0.8789[/C][C]0.9843[/C][/ROW]
[ROW][C]74[/C][C]739770[/C][C]658216.9497[/C][C]615906.2839[/C][C]700527.6155[/C][C]1e-04[/C][C]0.0114[/C][C]0.8045[/C][C]0.9826[/C][/ROW]
[ROW][C]75[/C][C]777535[/C][C]663157.4901[/C][C]618803.0194[/C][C]707511.9609[/C][C]0[/C][C]4e-04[/C][C]0.5651[/C][C]0.9872[/C][/ROW]
[ROW][C]76[/C][C]685030[/C][C]614676.6212[/C][C]569942.8479[/C][C]659410.3946[/C][C]0.001[/C][C]0[/C][C]0.8261[/C][C]0.5357[/C][/ROW]
[ROW][C]77[/C][C]730234[/C][C]618480.8485[/C][C]572888.4619[/C][C]664073.235[/C][C]0[/C][C]0.0021[/C][C]0.6941[/C][C]0.5992[/C][/ROW]
[ROW][C]78[/C][C]714154[/C][C]610371.782[/C][C]564147.9225[/C][C]656595.6416[/C][C]0[/C][C]0[/C][C]0.6786[/C][C]0.4618[/C][/ROW]
[ROW][C]79[/C][C]630872[/C][C]585474.6421[/C][C]538547.9162[/C][C]632401.3679[/C][C]0.029[/C][C]0[/C][C]0.7466[/C][C]0.1283[/C][/ROW]
[ROW][C]80[/C][C]719492[/C][C]633810.7987[/C][C]586224.2784[/C][C]681397.3191[/C][C]2e-04[/C][C]0.5482[/C][C]0.5644[/C][C]0.8085[/C][/ROW]
[ROW][C]81[/C][C]677023[/C][C]625711.9868[/C][C]577460.1469[/C][C]673963.8267[/C][C]0.0186[/C][C]1e-04[/C][C]0.691[/C][C]0.7024[/C][/ROW]
[ROW][C]82[/C][C]679272[/C][C]616195.6431[/C][C]567298.4653[/C][C]665092.8209[/C][C]0.0057[/C][C]0.0074[/C][C]0.6851[/C][C]0.5568[/C][/ROW]
[ROW][C]83[/C][C]718317[/C][C]655313.6232[/C][C]605767.2787[/C][C]704859.9677[/C][C]0.0063[/C][C]0.1716[/C][C]0.4525[/C][C]0.9543[/C][/ROW]
[ROW][C]84[/C][C]645672[/C][C]619433.2405[/C][C]569301.3122[/C][C]669565.1688[/C][C]0.1525[/C][C]1e-04[/C][C]0.6048[/C][C]0.6048[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114529&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114529&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-------
73707372658733.0943616761.9495700704.23910.01160.98430.87890.9843
74739770658216.9497615906.2839700527.61551e-040.01140.80450.9826
75777535663157.4901618803.0194707511.960904e-040.56510.9872
76685030614676.6212569942.8479659410.39460.00100.82610.5357
77730234618480.8485572888.4619664073.23500.00210.69410.5992
78714154610371.782564147.9225656595.6416000.67860.4618
79630872585474.6421538547.9162632401.36790.02900.74660.1283
80719492633810.7987586224.2784681397.31912e-040.54820.56440.8085
81677023625711.9868577460.1469673963.82670.01861e-040.6910.7024
82679272616195.6431567298.4653665092.82090.00570.00740.68510.5568
83718317655313.6232605767.2787704859.96770.00630.17160.45250.9543
84645672619433.2405569301.3122669565.16880.15251e-040.60480.6048







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.03250.073802365743149.776700
740.03280.12390.09896650900008.65744508321579.21767144.0361
750.03410.17250.123413082214768.1667366285975.533485827.0702
760.03710.11450.12124949597903.12316762113957.430882232.0738
770.03760.18070.133112488766877.31447907444541.407588923.8131
780.03860.170.139210770748763.0718384661911.684891567.7995
790.04090.07750.13042060920108.17697481270225.469486494.3364
800.03830.13520.1317341268247.71167463769978.249686393.113
810.03930.0820.12562632820075.41576926997766.823683228.5874
820.04050.10240.12323978626802.38326632160670.379681438.0787
830.03860.09610.12083969425486.20766390093835.454979938.0625
840.04130.04240.1142688472500.51785914958724.210176908.7688

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.0325 & 0.0738 & 0 & 2365743149.7767 & 0 & 0 \tabularnewline
74 & 0.0328 & 0.1239 & 0.0989 & 6650900008.6574 & 4508321579.217 & 67144.0361 \tabularnewline
75 & 0.0341 & 0.1725 & 0.1234 & 13082214768.166 & 7366285975.5334 & 85827.0702 \tabularnewline
76 & 0.0371 & 0.1145 & 0.1212 & 4949597903.1231 & 6762113957.4308 & 82232.0738 \tabularnewline
77 & 0.0376 & 0.1807 & 0.1331 & 12488766877.3144 & 7907444541.4075 & 88923.8131 \tabularnewline
78 & 0.0386 & 0.17 & 0.1392 & 10770748763.071 & 8384661911.6848 & 91567.7995 \tabularnewline
79 & 0.0409 & 0.0775 & 0.1304 & 2060920108.1769 & 7481270225.4694 & 86494.3364 \tabularnewline
80 & 0.0383 & 0.1352 & 0.131 & 7341268247.7116 & 7463769978.2496 & 86393.113 \tabularnewline
81 & 0.0393 & 0.082 & 0.1256 & 2632820075.4157 & 6926997766.8236 & 83228.5874 \tabularnewline
82 & 0.0405 & 0.1024 & 0.1232 & 3978626802.3832 & 6632160670.3796 & 81438.0787 \tabularnewline
83 & 0.0386 & 0.0961 & 0.1208 & 3969425486.2076 & 6390093835.4549 & 79938.0625 \tabularnewline
84 & 0.0413 & 0.0424 & 0.1142 & 688472500.5178 & 5914958724.2101 & 76908.7688 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114529&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.0325[/C][C]0.0738[/C][C]0[/C][C]2365743149.7767[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]0.0328[/C][C]0.1239[/C][C]0.0989[/C][C]6650900008.6574[/C][C]4508321579.217[/C][C]67144.0361[/C][/ROW]
[ROW][C]75[/C][C]0.0341[/C][C]0.1725[/C][C]0.1234[/C][C]13082214768.166[/C][C]7366285975.5334[/C][C]85827.0702[/C][/ROW]
[ROW][C]76[/C][C]0.0371[/C][C]0.1145[/C][C]0.1212[/C][C]4949597903.1231[/C][C]6762113957.4308[/C][C]82232.0738[/C][/ROW]
[ROW][C]77[/C][C]0.0376[/C][C]0.1807[/C][C]0.1331[/C][C]12488766877.3144[/C][C]7907444541.4075[/C][C]88923.8131[/C][/ROW]
[ROW][C]78[/C][C]0.0386[/C][C]0.17[/C][C]0.1392[/C][C]10770748763.071[/C][C]8384661911.6848[/C][C]91567.7995[/C][/ROW]
[ROW][C]79[/C][C]0.0409[/C][C]0.0775[/C][C]0.1304[/C][C]2060920108.1769[/C][C]7481270225.4694[/C][C]86494.3364[/C][/ROW]
[ROW][C]80[/C][C]0.0383[/C][C]0.1352[/C][C]0.131[/C][C]7341268247.7116[/C][C]7463769978.2496[/C][C]86393.113[/C][/ROW]
[ROW][C]81[/C][C]0.0393[/C][C]0.082[/C][C]0.1256[/C][C]2632820075.4157[/C][C]6926997766.8236[/C][C]83228.5874[/C][/ROW]
[ROW][C]82[/C][C]0.0405[/C][C]0.1024[/C][C]0.1232[/C][C]3978626802.3832[/C][C]6632160670.3796[/C][C]81438.0787[/C][/ROW]
[ROW][C]83[/C][C]0.0386[/C][C]0.0961[/C][C]0.1208[/C][C]3969425486.2076[/C][C]6390093835.4549[/C][C]79938.0625[/C][/ROW]
[ROW][C]84[/C][C]0.0413[/C][C]0.0424[/C][C]0.1142[/C][C]688472500.5178[/C][C]5914958724.2101[/C][C]76908.7688[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114529&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114529&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.03250.073802365743149.776700
740.03280.12390.09896650900008.65744508321579.21767144.0361
750.03410.17250.123413082214768.1667366285975.533485827.0702
760.03710.11450.12124949597903.12316762113957.430882232.0738
770.03760.18070.133112488766877.31447907444541.407588923.8131
780.03860.170.139210770748763.0718384661911.684891567.7995
790.04090.07750.13042060920108.17697481270225.469486494.3364
800.03830.13520.1317341268247.71167463769978.249686393.113
810.03930.0820.12562632820075.41576926997766.823683228.5874
820.04050.10240.12323978626802.38326632160670.379681438.0787
830.03860.09610.12083969425486.20766390093835.454979938.0625
840.04130.04240.1142688472500.51785914958724.210176908.7688



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