Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 13 Dec 2007 06:01:53 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2007/Dec/13/t11975500096p8klkm098nyecf.htm/, Retrieved Sun, 05 May 2024 14:26:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3503, Retrieved Sun, 05 May 2024 14:26:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact227
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Central Tendency] [Paper_EDA_output1] [2007-12-13 08:57:44] [e44956fac49704be9081ff9a6fb8481a]
- RMPD    [ARIMA Forecasting] [Paper_ARIMAest_ou...] [2007-12-13 13:01:53] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
36409
33163
34122
35225
28249
30374
26311
22069
23651
28628
23187
14727
43080
32519
39657
33614
28671
34243
27336
22916
24537
26128
22602
15744
41086
39690
43129
37863
35953
29133
24693
22205
21725
27192
21790
13253
37702
30364
32609
30212
29965
28352
25814
22414
20506
28806
22228
13971
36845
35338
35022
34777
26887
23970
22780
17351
21382
24561
17409
11514
31514
27071
29462
26105
22397
23843
21705
18089
20764
25316
17704
15548
28029
29383
36438
32034
22679
24319
18004
17537
20366
22782
19169
13807
29743
25591
29096
26482
22405
27044
17970
18730
19684
19785
18479
10698




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of compuational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3503&T=0

[TABLE]
[ROW][C]Summary of compuational 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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3503&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3503&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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[84])
7215548-------
7328029-------
7429383-------
7536438-------
7632034-------
7722679-------
7824319-------
7918004-------
8017537-------
8120366-------
8222782-------
8319169-------
8413807-------
852974329363.898424526.950834200.84610.43910.70571
862559127786.271822637.108232935.43530.20170.22820.27171
872909632296.14826521.041238071.25480.13870.98860.07991
882648228161.220821110.575935211.86580.32030.39750.14081
892240523190.857315823.414830558.29990.41720.19060.55420.9937
902704425643.213117592.384833694.04140.36650.78480.62640.998
911797021371.476112650.8830092.07220.22230.10120.77540.9554
921873019892.387110811.854928972.91920.40090.66090.69440.9055
931968421546.753911878.56831214.93990.35290.7160.59460.9417
941978525990.382115857.529236123.2350.1150.88870.73260.9908
951847920428.33329910.349530946.31690.35820.54770.59280.8914
961069817049.93916047.88628051.99220.12890.39950.71830.7183

\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[84]) \tabularnewline
72 & 15548 & - & - & - & - & - & - & - \tabularnewline
73 & 28029 & - & - & - & - & - & - & - \tabularnewline
74 & 29383 & - & - & - & - & - & - & - \tabularnewline
75 & 36438 & - & - & - & - & - & - & - \tabularnewline
76 & 32034 & - & - & - & - & - & - & - \tabularnewline
77 & 22679 & - & - & - & - & - & - & - \tabularnewline
78 & 24319 & - & - & - & - & - & - & - \tabularnewline
79 & 18004 & - & - & - & - & - & - & - \tabularnewline
80 & 17537 & - & - & - & - & - & - & - \tabularnewline
81 & 20366 & - & - & - & - & - & - & - \tabularnewline
82 & 22782 & - & - & - & - & - & - & - \tabularnewline
83 & 19169 & - & - & - & - & - & - & - \tabularnewline
84 & 13807 & - & - & - & - & - & - & - \tabularnewline
85 & 29743 & 29363.8984 & 24526.9508 & 34200.8461 & 0.439 & 1 & 0.7057 & 1 \tabularnewline
86 & 25591 & 27786.2718 & 22637.1082 & 32935.4353 & 0.2017 & 0.2282 & 0.2717 & 1 \tabularnewline
87 & 29096 & 32296.148 & 26521.0412 & 38071.2548 & 0.1387 & 0.9886 & 0.0799 & 1 \tabularnewline
88 & 26482 & 28161.2208 & 21110.5759 & 35211.8658 & 0.3203 & 0.3975 & 0.1408 & 1 \tabularnewline
89 & 22405 & 23190.8573 & 15823.4148 & 30558.2999 & 0.4172 & 0.1906 & 0.5542 & 0.9937 \tabularnewline
90 & 27044 & 25643.2131 & 17592.3848 & 33694.0414 & 0.3665 & 0.7848 & 0.6264 & 0.998 \tabularnewline
91 & 17970 & 21371.4761 & 12650.88 & 30092.0722 & 0.2223 & 0.1012 & 0.7754 & 0.9554 \tabularnewline
92 & 18730 & 19892.3871 & 10811.8549 & 28972.9192 & 0.4009 & 0.6609 & 0.6944 & 0.9055 \tabularnewline
93 & 19684 & 21546.7539 & 11878.568 & 31214.9399 & 0.3529 & 0.716 & 0.5946 & 0.9417 \tabularnewline
94 & 19785 & 25990.3821 & 15857.5292 & 36123.235 & 0.115 & 0.8887 & 0.7326 & 0.9908 \tabularnewline
95 & 18479 & 20428.3332 & 9910.3495 & 30946.3169 & 0.3582 & 0.5477 & 0.5928 & 0.8914 \tabularnewline
96 & 10698 & 17049.9391 & 6047.886 & 28051.9922 & 0.1289 & 0.3995 & 0.7183 & 0.7183 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3503&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[84])[/C][/ROW]
[ROW][C]72[/C][C]15548[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]28029[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]29383[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]36438[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]32034[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]22679[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]24319[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]18004[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]17537[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]20366[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]22782[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]19169[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]13807[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]29743[/C][C]29363.8984[/C][C]24526.9508[/C][C]34200.8461[/C][C]0.439[/C][C]1[/C][C]0.7057[/C][C]1[/C][/ROW]
[ROW][C]86[/C][C]25591[/C][C]27786.2718[/C][C]22637.1082[/C][C]32935.4353[/C][C]0.2017[/C][C]0.2282[/C][C]0.2717[/C][C]1[/C][/ROW]
[ROW][C]87[/C][C]29096[/C][C]32296.148[/C][C]26521.0412[/C][C]38071.2548[/C][C]0.1387[/C][C]0.9886[/C][C]0.0799[/C][C]1[/C][/ROW]
[ROW][C]88[/C][C]26482[/C][C]28161.2208[/C][C]21110.5759[/C][C]35211.8658[/C][C]0.3203[/C][C]0.3975[/C][C]0.1408[/C][C]1[/C][/ROW]
[ROW][C]89[/C][C]22405[/C][C]23190.8573[/C][C]15823.4148[/C][C]30558.2999[/C][C]0.4172[/C][C]0.1906[/C][C]0.5542[/C][C]0.9937[/C][/ROW]
[ROW][C]90[/C][C]27044[/C][C]25643.2131[/C][C]17592.3848[/C][C]33694.0414[/C][C]0.3665[/C][C]0.7848[/C][C]0.6264[/C][C]0.998[/C][/ROW]
[ROW][C]91[/C][C]17970[/C][C]21371.4761[/C][C]12650.88[/C][C]30092.0722[/C][C]0.2223[/C][C]0.1012[/C][C]0.7754[/C][C]0.9554[/C][/ROW]
[ROW][C]92[/C][C]18730[/C][C]19892.3871[/C][C]10811.8549[/C][C]28972.9192[/C][C]0.4009[/C][C]0.6609[/C][C]0.6944[/C][C]0.9055[/C][/ROW]
[ROW][C]93[/C][C]19684[/C][C]21546.7539[/C][C]11878.568[/C][C]31214.9399[/C][C]0.3529[/C][C]0.716[/C][C]0.5946[/C][C]0.9417[/C][/ROW]
[ROW][C]94[/C][C]19785[/C][C]25990.3821[/C][C]15857.5292[/C][C]36123.235[/C][C]0.115[/C][C]0.8887[/C][C]0.7326[/C][C]0.9908[/C][/ROW]
[ROW][C]95[/C][C]18479[/C][C]20428.3332[/C][C]9910.3495[/C][C]30946.3169[/C][C]0.3582[/C][C]0.5477[/C][C]0.5928[/C][C]0.8914[/C][/ROW]
[ROW][C]96[/C][C]10698[/C][C]17049.9391[/C][C]6047.886[/C][C]28051.9922[/C][C]0.1289[/C][C]0.3995[/C][C]0.7183[/C][C]0.7183[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3503&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3503&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[84])
7215548-------
7328029-------
7429383-------
7536438-------
7632034-------
7722679-------
7824319-------
7918004-------
8017537-------
8120366-------
8222782-------
8319169-------
8413807-------
852974329363.898424526.950834200.84610.43910.70571
862559127786.271822637.108232935.43530.20170.22820.27171
872909632296.14826521.041238071.25480.13870.98860.07991
882648228161.220821110.575935211.86580.32030.39750.14081
892240523190.857315823.414830558.29990.41720.19060.55420.9937
902704425643.213117592.384833694.04140.36650.78480.62640.998
911797021371.476112650.8830092.07220.22230.10120.77540.9554
921873019892.387110811.854928972.91920.40090.66090.69440.9055
931968421546.753911878.56831214.93990.35290.7160.59460.9417
941978525990.382115857.529236123.2350.1150.88870.73260.9908
951847920428.33329910.349530946.31690.35820.54770.59280.8914
961069817049.93916047.88628051.99220.12890.39950.71830.7183







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
850.0840.01290.0011143717.995811976.4997109.4372
860.0945-0.0790.00664819218.2398401601.52633.7204
870.0912-0.09910.008310240947.063853412.2553923.8031
880.1277-0.05960.0052819782.6625234981.8885484.7493
890.1621-0.03390.0028617571.715251464.3096226.8575
900.16020.05460.00461962203.9704163516.9975404.3724
910.2082-0.15920.013311570039.7377964169.9781981.9216
920.2329-0.05840.00491351143.7095112595.3091335.5522
930.2289-0.08650.00723469852.1775289154.3481537.7307
940.1989-0.23880.019938506767.05583208897.25461791.3395
950.2627-0.09540.0083799899.7721316658.3143562.724
960.3292-0.37250.03140347130.38373362260.86531833.6469

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & 0.084 & 0.0129 & 0.0011 & 143717.9958 & 11976.4997 & 109.4372 \tabularnewline
86 & 0.0945 & -0.079 & 0.0066 & 4819218.2398 & 401601.52 & 633.7204 \tabularnewline
87 & 0.0912 & -0.0991 & 0.0083 & 10240947.063 & 853412.2553 & 923.8031 \tabularnewline
88 & 0.1277 & -0.0596 & 0.005 & 2819782.6625 & 234981.8885 & 484.7493 \tabularnewline
89 & 0.1621 & -0.0339 & 0.0028 & 617571.7152 & 51464.3096 & 226.8575 \tabularnewline
90 & 0.1602 & 0.0546 & 0.0046 & 1962203.9704 & 163516.9975 & 404.3724 \tabularnewline
91 & 0.2082 & -0.1592 & 0.0133 & 11570039.7377 & 964169.9781 & 981.9216 \tabularnewline
92 & 0.2329 & -0.0584 & 0.0049 & 1351143.7095 & 112595.3091 & 335.5522 \tabularnewline
93 & 0.2289 & -0.0865 & 0.0072 & 3469852.1775 & 289154.3481 & 537.7307 \tabularnewline
94 & 0.1989 & -0.2388 & 0.0199 & 38506767.0558 & 3208897.2546 & 1791.3395 \tabularnewline
95 & 0.2627 & -0.0954 & 0.008 & 3799899.7721 & 316658.3143 & 562.724 \tabularnewline
96 & 0.3292 & -0.3725 & 0.031 & 40347130.3837 & 3362260.8653 & 1833.6469 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3503&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]85[/C][C]0.084[/C][C]0.0129[/C][C]0.0011[/C][C]143717.9958[/C][C]11976.4997[/C][C]109.4372[/C][/ROW]
[ROW][C]86[/C][C]0.0945[/C][C]-0.079[/C][C]0.0066[/C][C]4819218.2398[/C][C]401601.52[/C][C]633.7204[/C][/ROW]
[ROW][C]87[/C][C]0.0912[/C][C]-0.0991[/C][C]0.0083[/C][C]10240947.063[/C][C]853412.2553[/C][C]923.8031[/C][/ROW]
[ROW][C]88[/C][C]0.1277[/C][C]-0.0596[/C][C]0.005[/C][C]2819782.6625[/C][C]234981.8885[/C][C]484.7493[/C][/ROW]
[ROW][C]89[/C][C]0.1621[/C][C]-0.0339[/C][C]0.0028[/C][C]617571.7152[/C][C]51464.3096[/C][C]226.8575[/C][/ROW]
[ROW][C]90[/C][C]0.1602[/C][C]0.0546[/C][C]0.0046[/C][C]1962203.9704[/C][C]163516.9975[/C][C]404.3724[/C][/ROW]
[ROW][C]91[/C][C]0.2082[/C][C]-0.1592[/C][C]0.0133[/C][C]11570039.7377[/C][C]964169.9781[/C][C]981.9216[/C][/ROW]
[ROW][C]92[/C][C]0.2329[/C][C]-0.0584[/C][C]0.0049[/C][C]1351143.7095[/C][C]112595.3091[/C][C]335.5522[/C][/ROW]
[ROW][C]93[/C][C]0.2289[/C][C]-0.0865[/C][C]0.0072[/C][C]3469852.1775[/C][C]289154.3481[/C][C]537.7307[/C][/ROW]
[ROW][C]94[/C][C]0.1989[/C][C]-0.2388[/C][C]0.0199[/C][C]38506767.0558[/C][C]3208897.2546[/C][C]1791.3395[/C][/ROW]
[ROW][C]95[/C][C]0.2627[/C][C]-0.0954[/C][C]0.008[/C][C]3799899.7721[/C][C]316658.3143[/C][C]562.724[/C][/ROW]
[ROW][C]96[/C][C]0.3292[/C][C]-0.3725[/C][C]0.031[/C][C]40347130.3837[/C][C]3362260.8653[/C][C]1833.6469[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3503&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3503&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
850.0840.01290.0011143717.995811976.4997109.4372
860.0945-0.0790.00664819218.2398401601.52633.7204
870.0912-0.09910.008310240947.063853412.2553923.8031
880.1277-0.05960.0052819782.6625234981.8885484.7493
890.1621-0.03390.0028617571.715251464.3096226.8575
900.16020.05460.00461962203.9704163516.9975404.3724
910.2082-0.15920.013311570039.7377964169.9781981.9216
920.2329-0.05840.00491351143.7095112595.3091335.5522
930.2289-0.08650.00723469852.1775289154.3481537.7307
940.1989-0.23880.019938506767.05583208897.25461791.3395
950.2627-0.09540.0083799899.7721316658.3143562.724
960.3292-0.37250.03140347130.38373362260.86531833.6469



Parameters (Session):
par1 = -0.4 ; par2 = 1 ; par3 = 1 ; par4 = 12 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; 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,fx))
(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)
}
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')