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:35:03 +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/t1293629591v00wjm1qx9qcsr7.htm/, Retrieved Fri, 03 May 2024 08:57:04 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116816, Retrieved Fri, 03 May 2024 08:57:04 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact144
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:35:03] [e180d4cd19004beeddc12e67012247dc] [Current]
Feedback Forum

Post a new message
Dataseries X:
04,031636
03,702076
03,056167
03,280707
02,984728
03,693712
03,226317
02,190349
02,599515
03,080288
02,929672
02,922548
03,234943
02,983081
03,284389
03,806511
03,784579
02,645654
03,092081
03,204859
03,107225
03,466909
02,984404
03,218072
02,827310
03,182049
02,236319
02,033218
01,644804
01,627971
01,677559
02,330828
02,493615
02,257172
02,655517
02,298655
02,600402
03,045230
02,790583
03,227052
02,967479
02,938817
03,277961
03,423985
03,072646
02,754253
02,910431
03,174369
03,068387
03,089543
02,906654
02,931161
03,025660
02,939551
02,691019
03,198120
03,076390
02,863873
03,013802
03,053364
02,864753
03,057062
02,959365
03,252258
03,602988
03,497704
03,296867
03,602417
03,300100
03,401930
03,502591
03,402348
03,498551
03,199823
02,700064
02,801034
02,898628
02,800854
02,399942
02,402724
02,202331
02,102594
01,798293
01,202484
01,400201
01,200832
01,298083
01,099742
01,001377
00,836174




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=116816&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=116816&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116816&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[78])
663.497704-------
673.296867-------
683.602417-------
693.3001-------
703.40193-------
713.502591-------
723.402348-------
733.498551-------
743.199823-------
752.700064-------
762.801034-------
772.898628-------
782.800854-------
792.39992.83192.0883.57580.12750.53260.11030.5326
802.40272.97752.03583.91920.11580.88530.09670.6434
812.20232.951.89774.00240.08190.8460.25720.6094
822.10262.99821.87244.12390.05950.91710.2410.6344
831.79833.04571.86534.22610.01920.94130.2240.6578
841.20253.08011.85564.30470.00130.97990.3030.6726
851.40023.11421.8524.37640.00390.99850.27530.6867
861.20083.13541.84074.43010.00170.99570.46120.6937
871.29812.80481.48024.12950.01290.99120.56160.5024
881.09973.00591.65314.35880.00290.99330.61670.6168
891.00142.94681.56694.32660.00290.99560.52730.5821
900.83622.8391.43314.2450.00260.99480.52120.5212

\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 & 3.497704 & - & - & - & - & - & - & - \tabularnewline
67 & 3.296867 & - & - & - & - & - & - & - \tabularnewline
68 & 3.602417 & - & - & - & - & - & - & - \tabularnewline
69 & 3.3001 & - & - & - & - & - & - & - \tabularnewline
70 & 3.40193 & - & - & - & - & - & - & - \tabularnewline
71 & 3.502591 & - & - & - & - & - & - & - \tabularnewline
72 & 3.402348 & - & - & - & - & - & - & - \tabularnewline
73 & 3.498551 & - & - & - & - & - & - & - \tabularnewline
74 & 3.199823 & - & - & - & - & - & - & - \tabularnewline
75 & 2.700064 & - & - & - & - & - & - & - \tabularnewline
76 & 2.801034 & - & - & - & - & - & - & - \tabularnewline
77 & 2.898628 & - & - & - & - & - & - & - \tabularnewline
78 & 2.800854 & - & - & - & - & - & - & - \tabularnewline
79 & 2.3999 & 2.8319 & 2.088 & 3.5758 & 0.1275 & 0.5326 & 0.1103 & 0.5326 \tabularnewline
80 & 2.4027 & 2.9775 & 2.0358 & 3.9192 & 0.1158 & 0.8853 & 0.0967 & 0.6434 \tabularnewline
81 & 2.2023 & 2.95 & 1.8977 & 4.0024 & 0.0819 & 0.846 & 0.2572 & 0.6094 \tabularnewline
82 & 2.1026 & 2.9982 & 1.8724 & 4.1239 & 0.0595 & 0.9171 & 0.241 & 0.6344 \tabularnewline
83 & 1.7983 & 3.0457 & 1.8653 & 4.2261 & 0.0192 & 0.9413 & 0.224 & 0.6578 \tabularnewline
84 & 1.2025 & 3.0801 & 1.8556 & 4.3047 & 0.0013 & 0.9799 & 0.303 & 0.6726 \tabularnewline
85 & 1.4002 & 3.1142 & 1.852 & 4.3764 & 0.0039 & 0.9985 & 0.2753 & 0.6867 \tabularnewline
86 & 1.2008 & 3.1354 & 1.8407 & 4.4301 & 0.0017 & 0.9957 & 0.4612 & 0.6937 \tabularnewline
87 & 1.2981 & 2.8048 & 1.4802 & 4.1295 & 0.0129 & 0.9912 & 0.5616 & 0.5024 \tabularnewline
88 & 1.0997 & 3.0059 & 1.6531 & 4.3588 & 0.0029 & 0.9933 & 0.6167 & 0.6168 \tabularnewline
89 & 1.0014 & 2.9468 & 1.5669 & 4.3266 & 0.0029 & 0.9956 & 0.5273 & 0.5821 \tabularnewline
90 & 0.8362 & 2.839 & 1.4331 & 4.245 & 0.0026 & 0.9948 & 0.5212 & 0.5212 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116816&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]3.497704[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]3.296867[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]3.602417[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]3.3001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]3.40193[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]3.502591[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]3.402348[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]3.498551[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]3.199823[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]2.700064[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]2.801034[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]2.898628[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]2.800854[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]2.3999[/C][C]2.8319[/C][C]2.088[/C][C]3.5758[/C][C]0.1275[/C][C]0.5326[/C][C]0.1103[/C][C]0.5326[/C][/ROW]
[ROW][C]80[/C][C]2.4027[/C][C]2.9775[/C][C]2.0358[/C][C]3.9192[/C][C]0.1158[/C][C]0.8853[/C][C]0.0967[/C][C]0.6434[/C][/ROW]
[ROW][C]81[/C][C]2.2023[/C][C]2.95[/C][C]1.8977[/C][C]4.0024[/C][C]0.0819[/C][C]0.846[/C][C]0.2572[/C][C]0.6094[/C][/ROW]
[ROW][C]82[/C][C]2.1026[/C][C]2.9982[/C][C]1.8724[/C][C]4.1239[/C][C]0.0595[/C][C]0.9171[/C][C]0.241[/C][C]0.6344[/C][/ROW]
[ROW][C]83[/C][C]1.7983[/C][C]3.0457[/C][C]1.8653[/C][C]4.2261[/C][C]0.0192[/C][C]0.9413[/C][C]0.224[/C][C]0.6578[/C][/ROW]
[ROW][C]84[/C][C]1.2025[/C][C]3.0801[/C][C]1.8556[/C][C]4.3047[/C][C]0.0013[/C][C]0.9799[/C][C]0.303[/C][C]0.6726[/C][/ROW]
[ROW][C]85[/C][C]1.4002[/C][C]3.1142[/C][C]1.852[/C][C]4.3764[/C][C]0.0039[/C][C]0.9985[/C][C]0.2753[/C][C]0.6867[/C][/ROW]
[ROW][C]86[/C][C]1.2008[/C][C]3.1354[/C][C]1.8407[/C][C]4.4301[/C][C]0.0017[/C][C]0.9957[/C][C]0.4612[/C][C]0.6937[/C][/ROW]
[ROW][C]87[/C][C]1.2981[/C][C]2.8048[/C][C]1.4802[/C][C]4.1295[/C][C]0.0129[/C][C]0.9912[/C][C]0.5616[/C][C]0.5024[/C][/ROW]
[ROW][C]88[/C][C]1.0997[/C][C]3.0059[/C][C]1.6531[/C][C]4.3588[/C][C]0.0029[/C][C]0.9933[/C][C]0.6167[/C][C]0.6168[/C][/ROW]
[ROW][C]89[/C][C]1.0014[/C][C]2.9468[/C][C]1.5669[/C][C]4.3266[/C][C]0.0029[/C][C]0.9956[/C][C]0.5273[/C][C]0.5821[/C][/ROW]
[ROW][C]90[/C][C]0.8362[/C][C]2.839[/C][C]1.4331[/C][C]4.245[/C][C]0.0026[/C][C]0.9948[/C][C]0.5212[/C][C]0.5212[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116816&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116816&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])
663.497704-------
673.296867-------
683.602417-------
693.3001-------
703.40193-------
713.502591-------
723.402348-------
733.498551-------
743.199823-------
752.700064-------
762.801034-------
772.898628-------
782.800854-------
792.39992.83192.0883.57580.12750.53260.11030.5326
802.40272.97752.03583.91920.11580.88530.09670.6434
812.20232.951.89774.00240.08190.8460.25720.6094
822.10262.99821.87244.12390.05950.91710.2410.6344
831.79833.04571.86534.22610.01920.94130.2240.6578
841.20253.08011.85564.30470.00130.97990.3030.6726
851.40023.11421.8524.37640.00390.99850.27530.6867
861.20083.13541.84074.43010.00170.99570.46120.6937
871.29812.80481.48024.12950.01290.99120.56160.5024
881.09973.00591.65314.35880.00290.99330.61670.6168
891.00142.94681.56694.32660.00290.99560.52730.5821
900.83622.8391.43314.2450.00260.99480.52120.5212







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
790.134-0.152500.186600
800.1614-0.1930.17280.33040.25850.5084
810.182-0.25350.19970.55910.35870.5989
820.1916-0.29870.22440.80210.46950.6852
830.1977-0.40960.26151.5560.68680.8287
840.2028-0.60960.31953.52551.15991.077
850.2068-0.55040.35252.93781.41391.1891
860.2107-0.6170.38553.74261.7051.3058
870.241-0.53720.40242.27031.76781.3296
880.2296-0.63410.42563.63361.95441.398
890.2389-0.66020.44693.78462.12081.4563
900.2527-0.70550.46844.01142.27831.5094

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
79 & 0.134 & -0.1525 & 0 & 0.1866 & 0 & 0 \tabularnewline
80 & 0.1614 & -0.193 & 0.1728 & 0.3304 & 0.2585 & 0.5084 \tabularnewline
81 & 0.182 & -0.2535 & 0.1997 & 0.5591 & 0.3587 & 0.5989 \tabularnewline
82 & 0.1916 & -0.2987 & 0.2244 & 0.8021 & 0.4695 & 0.6852 \tabularnewline
83 & 0.1977 & -0.4096 & 0.2615 & 1.556 & 0.6868 & 0.8287 \tabularnewline
84 & 0.2028 & -0.6096 & 0.3195 & 3.5255 & 1.1599 & 1.077 \tabularnewline
85 & 0.2068 & -0.5504 & 0.3525 & 2.9378 & 1.4139 & 1.1891 \tabularnewline
86 & 0.2107 & -0.617 & 0.3855 & 3.7426 & 1.705 & 1.3058 \tabularnewline
87 & 0.241 & -0.5372 & 0.4024 & 2.2703 & 1.7678 & 1.3296 \tabularnewline
88 & 0.2296 & -0.6341 & 0.4256 & 3.6336 & 1.9544 & 1.398 \tabularnewline
89 & 0.2389 & -0.6602 & 0.4469 & 3.7846 & 2.1208 & 1.4563 \tabularnewline
90 & 0.2527 & -0.7055 & 0.4684 & 4.0114 & 2.2783 & 1.5094 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116816&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.134[/C][C]-0.1525[/C][C]0[/C][C]0.1866[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]80[/C][C]0.1614[/C][C]-0.193[/C][C]0.1728[/C][C]0.3304[/C][C]0.2585[/C][C]0.5084[/C][/ROW]
[ROW][C]81[/C][C]0.182[/C][C]-0.2535[/C][C]0.1997[/C][C]0.5591[/C][C]0.3587[/C][C]0.5989[/C][/ROW]
[ROW][C]82[/C][C]0.1916[/C][C]-0.2987[/C][C]0.2244[/C][C]0.8021[/C][C]0.4695[/C][C]0.6852[/C][/ROW]
[ROW][C]83[/C][C]0.1977[/C][C]-0.4096[/C][C]0.2615[/C][C]1.556[/C][C]0.6868[/C][C]0.8287[/C][/ROW]
[ROW][C]84[/C][C]0.2028[/C][C]-0.6096[/C][C]0.3195[/C][C]3.5255[/C][C]1.1599[/C][C]1.077[/C][/ROW]
[ROW][C]85[/C][C]0.2068[/C][C]-0.5504[/C][C]0.3525[/C][C]2.9378[/C][C]1.4139[/C][C]1.1891[/C][/ROW]
[ROW][C]86[/C][C]0.2107[/C][C]-0.617[/C][C]0.3855[/C][C]3.7426[/C][C]1.705[/C][C]1.3058[/C][/ROW]
[ROW][C]87[/C][C]0.241[/C][C]-0.5372[/C][C]0.4024[/C][C]2.2703[/C][C]1.7678[/C][C]1.3296[/C][/ROW]
[ROW][C]88[/C][C]0.2296[/C][C]-0.6341[/C][C]0.4256[/C][C]3.6336[/C][C]1.9544[/C][C]1.398[/C][/ROW]
[ROW][C]89[/C][C]0.2389[/C][C]-0.6602[/C][C]0.4469[/C][C]3.7846[/C][C]2.1208[/C][C]1.4563[/C][/ROW]
[ROW][C]90[/C][C]0.2527[/C][C]-0.7055[/C][C]0.4684[/C][C]4.0114[/C][C]2.2783[/C][C]1.5094[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116816&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116816&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.134-0.152500.186600
800.1614-0.1930.17280.33040.25850.5084
810.182-0.25350.19970.55910.35870.5989
820.1916-0.29870.22440.80210.46950.6852
830.1977-0.40960.26151.5560.68680.8287
840.2028-0.60960.31953.52551.15991.077
850.2068-0.55040.35252.93781.41391.1891
860.2107-0.6170.38553.74261.7051.3058
870.241-0.53720.40242.27031.76781.3296
880.2296-0.63410.42563.63361.95441.398
890.2389-0.66020.44693.78462.12081.4563
900.2527-0.70550.46844.01142.27831.5094



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')