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, 29 Dec 2010 13:39:48 +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/29/t1293629860czqx8fybk5pin63.htm/, Retrieved Fri, 03 May 2024 04:13:54 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116820, Retrieved Fri, 03 May 2024 04:13:54 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact142
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Variance Reduction Matrix] [] [2010-12-24 15:11:40] [afd301b68d203992295e6972aed62880]
- RMPD  [ARIMA Forecasting] [] [2010-12-28 10:00:01] [afd301b68d203992295e6972aed62880]
-    D      [ARIMA Forecasting] [] [2010-12-29 13:39:48] [e180d4cd19004beeddc12e67012247dc] [Current]
Feedback Forum

Post a new message
Dataseries X:
09,166456
07,970589
07,104091
06,621064
07,529215
08,170938
08,157450
07,378962
07,921496
08,156740
08,856365
08,817177
08,734347
09,345927
08,992970
10,785120
08,886867
08,818847
08,823744
09,165298
08,652657
08,173054
07,563416
07,595809
08,381467
07,216432
06,540178
06,238914
05,487288
05,759462
05,993215
07,474726
07,348907
07,303379
07,119314
06,993780
06,958153
07,595706
08,088153
07,555753
07,315433
07,893427
08,858794
08,839367
08,014733
07,873465
08,930377
10,500550
12,611440
11,417870
11,872490
11,060820
12,043310
09,776299
09,557194
09,202590
10,224020
09,350807
08,300913
08,365779
08,133595
07,660470
08,074839
07,848597
07,998220
07,396895
07,900419
08,100500
07,899453
07,599783
08,100929
09,002175
10,298900
10,101520
10,699150
09,698140
09,800951
10,900470
10,697850
09,297252
10,397440
10,900720
12,901270
13,099060
11,698280
11,099870
11,301570
10,702110
10,099310
09,591119




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

\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 & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116820&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]3 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=116820&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116820&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 time3 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[78])
667.396895-------
677.900419-------
688.1005-------
697.899453-------
707.599783-------
718.100929-------
729.002175-------
7310.2989-------
7410.10152-------
7510.69915-------
769.69814-------
779.800951-------
7810.90047-------
7910.697911.1379.466412.80770.30320.60930.99990.6093
809.297311.28919.038313.53990.04140.69670.99730.6325
8110.397411.26778.476314.0590.27060.91680.9910.6017
8210.900711.0037.821914.1840.47490.64550.9820.5252
8312.901311.07157.494514.64840.1580.53730.94820.5373
8413.099111.47067.576515.36460.20620.23570.8930.6129
8511.698312.11477.895716.33370.42330.32370.80050.7137
8611.099911.69317.204216.18190.39780.49910.75640.6354
8711.301611.69966.934516.46470.4350.59740.65960.6288
8810.702111.47786.469916.48580.38070.52750.7570.5894
8910.099311.37046.115416.62540.31770.59840.72090.5696
909.591111.32095.843116.79880.2680.6690.55980.5598

\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[78]) \tabularnewline
66 & 7.396895 & - & - & - & - & - & - & - \tabularnewline
67 & 7.900419 & - & - & - & - & - & - & - \tabularnewline
68 & 8.1005 & - & - & - & - & - & - & - \tabularnewline
69 & 7.899453 & - & - & - & - & - & - & - \tabularnewline
70 & 7.599783 & - & - & - & - & - & - & - \tabularnewline
71 & 8.100929 & - & - & - & - & - & - & - \tabularnewline
72 & 9.002175 & - & - & - & - & - & - & - \tabularnewline
73 & 10.2989 & - & - & - & - & - & - & - \tabularnewline
74 & 10.10152 & - & - & - & - & - & - & - \tabularnewline
75 & 10.69915 & - & - & - & - & - & - & - \tabularnewline
76 & 9.69814 & - & - & - & - & - & - & - \tabularnewline
77 & 9.800951 & - & - & - & - & - & - & - \tabularnewline
78 & 10.90047 & - & - & - & - & - & - & - \tabularnewline
79 & 10.6979 & 11.137 & 9.4664 & 12.8077 & 0.3032 & 0.6093 & 0.9999 & 0.6093 \tabularnewline
80 & 9.2973 & 11.2891 & 9.0383 & 13.5399 & 0.0414 & 0.6967 & 0.9973 & 0.6325 \tabularnewline
81 & 10.3974 & 11.2677 & 8.4763 & 14.059 & 0.2706 & 0.9168 & 0.991 & 0.6017 \tabularnewline
82 & 10.9007 & 11.003 & 7.8219 & 14.184 & 0.4749 & 0.6455 & 0.982 & 0.5252 \tabularnewline
83 & 12.9013 & 11.0715 & 7.4945 & 14.6484 & 0.158 & 0.5373 & 0.9482 & 0.5373 \tabularnewline
84 & 13.0991 & 11.4706 & 7.5765 & 15.3646 & 0.2062 & 0.2357 & 0.893 & 0.6129 \tabularnewline
85 & 11.6983 & 12.1147 & 7.8957 & 16.3337 & 0.4233 & 0.3237 & 0.8005 & 0.7137 \tabularnewline
86 & 11.0999 & 11.6931 & 7.2042 & 16.1819 & 0.3978 & 0.4991 & 0.7564 & 0.6354 \tabularnewline
87 & 11.3016 & 11.6996 & 6.9345 & 16.4647 & 0.435 & 0.5974 & 0.6596 & 0.6288 \tabularnewline
88 & 10.7021 & 11.4778 & 6.4699 & 16.4858 & 0.3807 & 0.5275 & 0.757 & 0.5894 \tabularnewline
89 & 10.0993 & 11.3704 & 6.1154 & 16.6254 & 0.3177 & 0.5984 & 0.7209 & 0.5696 \tabularnewline
90 & 9.5911 & 11.3209 & 5.8431 & 16.7988 & 0.268 & 0.669 & 0.5598 & 0.5598 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116820&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[78])[/C][/ROW]
[ROW][C]66[/C][C]7.396895[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]7.900419[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]8.1005[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]7.899453[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]7.599783[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]8.100929[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]9.002175[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]10.2989[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]10.10152[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]10.69915[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]9.69814[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]9.800951[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]10.90047[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]10.6979[/C][C]11.137[/C][C]9.4664[/C][C]12.8077[/C][C]0.3032[/C][C]0.6093[/C][C]0.9999[/C][C]0.6093[/C][/ROW]
[ROW][C]80[/C][C]9.2973[/C][C]11.2891[/C][C]9.0383[/C][C]13.5399[/C][C]0.0414[/C][C]0.6967[/C][C]0.9973[/C][C]0.6325[/C][/ROW]
[ROW][C]81[/C][C]10.3974[/C][C]11.2677[/C][C]8.4763[/C][C]14.059[/C][C]0.2706[/C][C]0.9168[/C][C]0.991[/C][C]0.6017[/C][/ROW]
[ROW][C]82[/C][C]10.9007[/C][C]11.003[/C][C]7.8219[/C][C]14.184[/C][C]0.4749[/C][C]0.6455[/C][C]0.982[/C][C]0.5252[/C][/ROW]
[ROW][C]83[/C][C]12.9013[/C][C]11.0715[/C][C]7.4945[/C][C]14.6484[/C][C]0.158[/C][C]0.5373[/C][C]0.9482[/C][C]0.5373[/C][/ROW]
[ROW][C]84[/C][C]13.0991[/C][C]11.4706[/C][C]7.5765[/C][C]15.3646[/C][C]0.2062[/C][C]0.2357[/C][C]0.893[/C][C]0.6129[/C][/ROW]
[ROW][C]85[/C][C]11.6983[/C][C]12.1147[/C][C]7.8957[/C][C]16.3337[/C][C]0.4233[/C][C]0.3237[/C][C]0.8005[/C][C]0.7137[/C][/ROW]
[ROW][C]86[/C][C]11.0999[/C][C]11.6931[/C][C]7.2042[/C][C]16.1819[/C][C]0.3978[/C][C]0.4991[/C][C]0.7564[/C][C]0.6354[/C][/ROW]
[ROW][C]87[/C][C]11.3016[/C][C]11.6996[/C][C]6.9345[/C][C]16.4647[/C][C]0.435[/C][C]0.5974[/C][C]0.6596[/C][C]0.6288[/C][/ROW]
[ROW][C]88[/C][C]10.7021[/C][C]11.4778[/C][C]6.4699[/C][C]16.4858[/C][C]0.3807[/C][C]0.5275[/C][C]0.757[/C][C]0.5894[/C][/ROW]
[ROW][C]89[/C][C]10.0993[/C][C]11.3704[/C][C]6.1154[/C][C]16.6254[/C][C]0.3177[/C][C]0.5984[/C][C]0.7209[/C][C]0.5696[/C][/ROW]
[ROW][C]90[/C][C]9.5911[/C][C]11.3209[/C][C]5.8431[/C][C]16.7988[/C][C]0.268[/C][C]0.669[/C][C]0.5598[/C][C]0.5598[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116820&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116820&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[78])
667.396895-------
677.900419-------
688.1005-------
697.899453-------
707.599783-------
718.100929-------
729.002175-------
7310.2989-------
7410.10152-------
7510.69915-------
769.69814-------
779.800951-------
7810.90047-------
7910.697911.1379.466412.80770.30320.60930.99990.6093
809.297311.28919.038313.53990.04140.69670.99730.6325
8110.397411.26778.476314.0590.27060.91680.9910.6017
8210.900711.0037.821914.1840.47490.64550.9820.5252
8312.901311.07157.494514.64840.1580.53730.94820.5373
8413.099111.47067.576515.36460.20620.23570.8930.6129
8511.698312.11477.895716.33370.42330.32370.80050.7137
8611.099911.69317.204216.18190.39780.49910.75640.6354
8711.301611.69966.934516.46470.4350.59740.65960.6288
8810.702111.47786.469916.48580.38070.52750.7570.5894
8910.099311.37046.115416.62540.31770.59840.72090.5696
909.591111.32095.843116.79880.2680.6690.55980.5598







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
790.0765-0.039400.192900
800.1017-0.17640.10793.96752.08021.4423
810.1264-0.07720.09770.75731.63921.2803
820.1475-0.00930.07560.01051.2321.11
830.16480.16530.09353.34821.65531.2866
840.17320.1420.10162.6521.82141.3496
850.1777-0.03440.0920.17341.5861.2593
860.1959-0.05070.08680.35191.43171.1965
870.2078-0.0340.0810.15841.29021.1359
880.2226-0.06760.07960.60171.22141.1052
890.2358-0.11180.08261.61571.25721.1213
900.2469-0.15280.08842.99231.40181.184

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
79 & 0.0765 & -0.0394 & 0 & 0.1929 & 0 & 0 \tabularnewline
80 & 0.1017 & -0.1764 & 0.1079 & 3.9675 & 2.0802 & 1.4423 \tabularnewline
81 & 0.1264 & -0.0772 & 0.0977 & 0.7573 & 1.6392 & 1.2803 \tabularnewline
82 & 0.1475 & -0.0093 & 0.0756 & 0.0105 & 1.232 & 1.11 \tabularnewline
83 & 0.1648 & 0.1653 & 0.0935 & 3.3482 & 1.6553 & 1.2866 \tabularnewline
84 & 0.1732 & 0.142 & 0.1016 & 2.652 & 1.8214 & 1.3496 \tabularnewline
85 & 0.1777 & -0.0344 & 0.092 & 0.1734 & 1.586 & 1.2593 \tabularnewline
86 & 0.1959 & -0.0507 & 0.0868 & 0.3519 & 1.4317 & 1.1965 \tabularnewline
87 & 0.2078 & -0.034 & 0.081 & 0.1584 & 1.2902 & 1.1359 \tabularnewline
88 & 0.2226 & -0.0676 & 0.0796 & 0.6017 & 1.2214 & 1.1052 \tabularnewline
89 & 0.2358 & -0.1118 & 0.0826 & 1.6157 & 1.2572 & 1.1213 \tabularnewline
90 & 0.2469 & -0.1528 & 0.0884 & 2.9923 & 1.4018 & 1.184 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116820&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]79[/C][C]0.0765[/C][C]-0.0394[/C][C]0[/C][C]0.1929[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]80[/C][C]0.1017[/C][C]-0.1764[/C][C]0.1079[/C][C]3.9675[/C][C]2.0802[/C][C]1.4423[/C][/ROW]
[ROW][C]81[/C][C]0.1264[/C][C]-0.0772[/C][C]0.0977[/C][C]0.7573[/C][C]1.6392[/C][C]1.2803[/C][/ROW]
[ROW][C]82[/C][C]0.1475[/C][C]-0.0093[/C][C]0.0756[/C][C]0.0105[/C][C]1.232[/C][C]1.11[/C][/ROW]
[ROW][C]83[/C][C]0.1648[/C][C]0.1653[/C][C]0.0935[/C][C]3.3482[/C][C]1.6553[/C][C]1.2866[/C][/ROW]
[ROW][C]84[/C][C]0.1732[/C][C]0.142[/C][C]0.1016[/C][C]2.652[/C][C]1.8214[/C][C]1.3496[/C][/ROW]
[ROW][C]85[/C][C]0.1777[/C][C]-0.0344[/C][C]0.092[/C][C]0.1734[/C][C]1.586[/C][C]1.2593[/C][/ROW]
[ROW][C]86[/C][C]0.1959[/C][C]-0.0507[/C][C]0.0868[/C][C]0.3519[/C][C]1.4317[/C][C]1.1965[/C][/ROW]
[ROW][C]87[/C][C]0.2078[/C][C]-0.034[/C][C]0.081[/C][C]0.1584[/C][C]1.2902[/C][C]1.1359[/C][/ROW]
[ROW][C]88[/C][C]0.2226[/C][C]-0.0676[/C][C]0.0796[/C][C]0.6017[/C][C]1.2214[/C][C]1.1052[/C][/ROW]
[ROW][C]89[/C][C]0.2358[/C][C]-0.1118[/C][C]0.0826[/C][C]1.6157[/C][C]1.2572[/C][C]1.1213[/C][/ROW]
[ROW][C]90[/C][C]0.2469[/C][C]-0.1528[/C][C]0.0884[/C][C]2.9923[/C][C]1.4018[/C][C]1.184[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116820&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116820&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
790.0765-0.039400.192900
800.1017-0.17640.10793.96752.08021.4423
810.1264-0.07720.09770.75731.63921.2803
820.1475-0.00930.07560.01051.2321.11
830.16480.16530.09353.34821.65531.2866
840.17320.1420.10162.6521.82141.3496
850.1777-0.03440.0920.17341.5861.2593
860.1959-0.05070.08680.35191.43171.1965
870.2078-0.0340.0810.15841.29021.1359
880.2226-0.06760.07960.60171.22141.1052
890.2358-0.11180.08261.61571.25721.1213
900.2469-0.15280.08842.99231.40181.184



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