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, 15 Dec 2010 04:30:25 +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/15/t1292387318yxxuga4vjescntz.htm/, Retrieved Fri, 03 May 2024 09:50:37 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=110310, Retrieved Fri, 03 May 2024 09:50:37 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact167
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]
F   PD      [ARIMA Forecasting] [Forecast Arima cu...] [2010-12-03 11:50:31] [74deae64b71f9d77c839af86f7c687b5]
- R PD          [ARIMA Forecasting] [] [2010-12-15 04:30:25] [ee4a783fb13f41eb2e9bc8a0c4f26279] [Current]
Feedback Forum

Post a new message
Dataseries X:
31.514
27.071
29.462
26.105
22.397
23.843
21.705
18.089
20.764
25.316
17.704
15.548
28.029
29.383
36.438
32.034
22.679
24.319
18.004
17.537
20.366
22.782
19.169
13.807
29.743
25.591
29.096
26.482
22.405
27.044
17.970
18.730
19.684
19.785
18.479
10.698
31.956
29.506
34.506
27.165
26.736
23.691
18.157
17.328
18.205
20.995
17.382
9.367
31.124
26.551
30.651
25.859
25.100
25.778
20.418
18.688
20.424
24.776
19.814
12.738
31.566
30.111
30.019
31.934
25.826
26.835
20.205
17.789
20.520
22.518
15.572
11.509
25.447
24.090
27.786
26.195
20.516
22.759
19.028
16.971
20.036
22.485
18.730
14.538




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 10 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110310&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]10 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110310&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110310&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 time10 seconds
R Server'George Udny Yule' @ 72.249.76.132







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])
6012.738-------
6131.566-------
6230.111-------
6330.019-------
6431.934-------
6525.826-------
6626.835-------
6720.205-------
6817.789-------
6920.52-------
7022.518-------
7115.572-------
7211.509-------
7325.44730.092625.996534.18880.013110.24041
7424.0927.742423.602331.88260.04190.86140.13111
7527.78631.364227.063235.66510.05150.99950.73011
7626.19528.054623.736932.37220.19930.54850.03911
7720.51624.384120.045228.72290.04030.20670.25741
7822.75925.429421.085329.77350.11410.98670.2631
7919.02819.731815.382924.08060.37560.08620.41560.9999
8016.97118.206913.855922.55790.28890.35570.57470.9987
8120.03620.219315.865524.5730.46710.92820.44621
8222.48523.220718.86527.57640.37030.92410.62411
8318.7318.368814.007722.72990.43550.03220.89560.999
8414.53812.53278.168716.89670.18390.00270.67720.6772

\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 & 12.738 & - & - & - & - & - & - & - \tabularnewline
61 & 31.566 & - & - & - & - & - & - & - \tabularnewline
62 & 30.111 & - & - & - & - & - & - & - \tabularnewline
63 & 30.019 & - & - & - & - & - & - & - \tabularnewline
64 & 31.934 & - & - & - & - & - & - & - \tabularnewline
65 & 25.826 & - & - & - & - & - & - & - \tabularnewline
66 & 26.835 & - & - & - & - & - & - & - \tabularnewline
67 & 20.205 & - & - & - & - & - & - & - \tabularnewline
68 & 17.789 & - & - & - & - & - & - & - \tabularnewline
69 & 20.52 & - & - & - & - & - & - & - \tabularnewline
70 & 22.518 & - & - & - & - & - & - & - \tabularnewline
71 & 15.572 & - & - & - & - & - & - & - \tabularnewline
72 & 11.509 & - & - & - & - & - & - & - \tabularnewline
73 & 25.447 & 30.0926 & 25.9965 & 34.1888 & 0.0131 & 1 & 0.2404 & 1 \tabularnewline
74 & 24.09 & 27.7424 & 23.6023 & 31.8826 & 0.0419 & 0.8614 & 0.1311 & 1 \tabularnewline
75 & 27.786 & 31.3642 & 27.0632 & 35.6651 & 0.0515 & 0.9995 & 0.7301 & 1 \tabularnewline
76 & 26.195 & 28.0546 & 23.7369 & 32.3722 & 0.1993 & 0.5485 & 0.0391 & 1 \tabularnewline
77 & 20.516 & 24.3841 & 20.0452 & 28.7229 & 0.0403 & 0.2067 & 0.2574 & 1 \tabularnewline
78 & 22.759 & 25.4294 & 21.0853 & 29.7735 & 0.1141 & 0.9867 & 0.263 & 1 \tabularnewline
79 & 19.028 & 19.7318 & 15.3829 & 24.0806 & 0.3756 & 0.0862 & 0.4156 & 0.9999 \tabularnewline
80 & 16.971 & 18.2069 & 13.8559 & 22.5579 & 0.2889 & 0.3557 & 0.5747 & 0.9987 \tabularnewline
81 & 20.036 & 20.2193 & 15.8655 & 24.573 & 0.4671 & 0.9282 & 0.4462 & 1 \tabularnewline
82 & 22.485 & 23.2207 & 18.865 & 27.5764 & 0.3703 & 0.9241 & 0.6241 & 1 \tabularnewline
83 & 18.73 & 18.3688 & 14.0077 & 22.7299 & 0.4355 & 0.0322 & 0.8956 & 0.999 \tabularnewline
84 & 14.538 & 12.5327 & 8.1687 & 16.8967 & 0.1839 & 0.0027 & 0.6772 & 0.6772 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110310&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]12.738[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]31.566[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]30.111[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]30.019[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]31.934[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]25.826[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]26.835[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]20.205[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]17.789[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]20.52[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]22.518[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]15.572[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]11.509[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]25.447[/C][C]30.0926[/C][C]25.9965[/C][C]34.1888[/C][C]0.0131[/C][C]1[/C][C]0.2404[/C][C]1[/C][/ROW]
[ROW][C]74[/C][C]24.09[/C][C]27.7424[/C][C]23.6023[/C][C]31.8826[/C][C]0.0419[/C][C]0.8614[/C][C]0.1311[/C][C]1[/C][/ROW]
[ROW][C]75[/C][C]27.786[/C][C]31.3642[/C][C]27.0632[/C][C]35.6651[/C][C]0.0515[/C][C]0.9995[/C][C]0.7301[/C][C]1[/C][/ROW]
[ROW][C]76[/C][C]26.195[/C][C]28.0546[/C][C]23.7369[/C][C]32.3722[/C][C]0.1993[/C][C]0.5485[/C][C]0.0391[/C][C]1[/C][/ROW]
[ROW][C]77[/C][C]20.516[/C][C]24.3841[/C][C]20.0452[/C][C]28.7229[/C][C]0.0403[/C][C]0.2067[/C][C]0.2574[/C][C]1[/C][/ROW]
[ROW][C]78[/C][C]22.759[/C][C]25.4294[/C][C]21.0853[/C][C]29.7735[/C][C]0.1141[/C][C]0.9867[/C][C]0.263[/C][C]1[/C][/ROW]
[ROW][C]79[/C][C]19.028[/C][C]19.7318[/C][C]15.3829[/C][C]24.0806[/C][C]0.3756[/C][C]0.0862[/C][C]0.4156[/C][C]0.9999[/C][/ROW]
[ROW][C]80[/C][C]16.971[/C][C]18.2069[/C][C]13.8559[/C][C]22.5579[/C][C]0.2889[/C][C]0.3557[/C][C]0.5747[/C][C]0.9987[/C][/ROW]
[ROW][C]81[/C][C]20.036[/C][C]20.2193[/C][C]15.8655[/C][C]24.573[/C][C]0.4671[/C][C]0.9282[/C][C]0.4462[/C][C]1[/C][/ROW]
[ROW][C]82[/C][C]22.485[/C][C]23.2207[/C][C]18.865[/C][C]27.5764[/C][C]0.3703[/C][C]0.9241[/C][C]0.6241[/C][C]1[/C][/ROW]
[ROW][C]83[/C][C]18.73[/C][C]18.3688[/C][C]14.0077[/C][C]22.7299[/C][C]0.4355[/C][C]0.0322[/C][C]0.8956[/C][C]0.999[/C][/ROW]
[ROW][C]84[/C][C]14.538[/C][C]12.5327[/C][C]8.1687[/C][C]16.8967[/C][C]0.1839[/C][C]0.0027[/C][C]0.6772[/C][C]0.6772[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110310&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110310&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])
6012.738-------
6131.566-------
6230.111-------
6330.019-------
6431.934-------
6525.826-------
6626.835-------
6720.205-------
6817.789-------
6920.52-------
7022.518-------
7115.572-------
7211.509-------
7325.44730.092625.996534.18880.013110.24041
7424.0927.742423.602331.88260.04190.86140.13111
7527.78631.364227.063235.66510.05150.99950.73011
7626.19528.054623.736932.37220.19930.54850.03911
7720.51624.384120.045228.72290.04030.20670.25741
7822.75925.429421.085329.77350.11410.98670.2631
7919.02819.731815.382924.08060.37560.08620.41560.9999
8016.97118.206913.855922.55790.28890.35570.57470.9987
8120.03620.219315.865524.5730.46710.92820.44621
8222.48523.220718.86527.57640.37030.92410.62411
8318.7318.368814.007722.72990.43550.03220.89560.999
8414.53812.53278.168716.89670.18390.00270.67720.6772







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.0694-0.1544021.581700
740.0761-0.13170.14313.340317.4614.1786
750.07-0.11410.133412.803215.90843.9885
760.0785-0.06630.11663.457912.79583.5771
770.0908-0.15860.12514.961913.2293.6372
780.0872-0.1050.12177.131112.21273.4947
790.1124-0.03570.10940.495310.53883.2463
800.1219-0.06790.10421.52749.41233.068
810.1099-0.00910.09360.03368.37032.8931
820.0957-0.03170.08740.54137.58742.7545
830.12110.01970.08130.13056.90952.6286
840.17770.160.08784.02116.66882.5824

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.0694 & -0.1544 & 0 & 21.5817 & 0 & 0 \tabularnewline
74 & 0.0761 & -0.1317 & 0.143 & 13.3403 & 17.461 & 4.1786 \tabularnewline
75 & 0.07 & -0.1141 & 0.1334 & 12.8032 & 15.9084 & 3.9885 \tabularnewline
76 & 0.0785 & -0.0663 & 0.1166 & 3.4579 & 12.7958 & 3.5771 \tabularnewline
77 & 0.0908 & -0.1586 & 0.125 & 14.9619 & 13.229 & 3.6372 \tabularnewline
78 & 0.0872 & -0.105 & 0.1217 & 7.1311 & 12.2127 & 3.4947 \tabularnewline
79 & 0.1124 & -0.0357 & 0.1094 & 0.4953 & 10.5388 & 3.2463 \tabularnewline
80 & 0.1219 & -0.0679 & 0.1042 & 1.5274 & 9.4123 & 3.068 \tabularnewline
81 & 0.1099 & -0.0091 & 0.0936 & 0.0336 & 8.3703 & 2.8931 \tabularnewline
82 & 0.0957 & -0.0317 & 0.0874 & 0.5413 & 7.5874 & 2.7545 \tabularnewline
83 & 0.1211 & 0.0197 & 0.0813 & 0.1305 & 6.9095 & 2.6286 \tabularnewline
84 & 0.1777 & 0.16 & 0.0878 & 4.0211 & 6.6688 & 2.5824 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110310&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.0694[/C][C]-0.1544[/C][C]0[/C][C]21.5817[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]0.0761[/C][C]-0.1317[/C][C]0.143[/C][C]13.3403[/C][C]17.461[/C][C]4.1786[/C][/ROW]
[ROW][C]75[/C][C]0.07[/C][C]-0.1141[/C][C]0.1334[/C][C]12.8032[/C][C]15.9084[/C][C]3.9885[/C][/ROW]
[ROW][C]76[/C][C]0.0785[/C][C]-0.0663[/C][C]0.1166[/C][C]3.4579[/C][C]12.7958[/C][C]3.5771[/C][/ROW]
[ROW][C]77[/C][C]0.0908[/C][C]-0.1586[/C][C]0.125[/C][C]14.9619[/C][C]13.229[/C][C]3.6372[/C][/ROW]
[ROW][C]78[/C][C]0.0872[/C][C]-0.105[/C][C]0.1217[/C][C]7.1311[/C][C]12.2127[/C][C]3.4947[/C][/ROW]
[ROW][C]79[/C][C]0.1124[/C][C]-0.0357[/C][C]0.1094[/C][C]0.4953[/C][C]10.5388[/C][C]3.2463[/C][/ROW]
[ROW][C]80[/C][C]0.1219[/C][C]-0.0679[/C][C]0.1042[/C][C]1.5274[/C][C]9.4123[/C][C]3.068[/C][/ROW]
[ROW][C]81[/C][C]0.1099[/C][C]-0.0091[/C][C]0.0936[/C][C]0.0336[/C][C]8.3703[/C][C]2.8931[/C][/ROW]
[ROW][C]82[/C][C]0.0957[/C][C]-0.0317[/C][C]0.0874[/C][C]0.5413[/C][C]7.5874[/C][C]2.7545[/C][/ROW]
[ROW][C]83[/C][C]0.1211[/C][C]0.0197[/C][C]0.0813[/C][C]0.1305[/C][C]6.9095[/C][C]2.6286[/C][/ROW]
[ROW][C]84[/C][C]0.1777[/C][C]0.16[/C][C]0.0878[/C][C]4.0211[/C][C]6.6688[/C][C]2.5824[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110310&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110310&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.0694-0.1544021.581700
740.0761-0.13170.14313.340317.4614.1786
750.07-0.11410.133412.803215.90843.9885
760.0785-0.06630.11663.457912.79583.5771
770.0908-0.15860.12514.961913.2293.6372
780.0872-0.1050.12177.131112.21273.4947
790.1124-0.03570.10940.495310.53883.2463
800.1219-0.06790.10421.52749.41233.068
810.1099-0.00910.09360.03368.37032.8931
820.0957-0.03170.08740.54137.58742.7545
830.12110.01970.08130.13056.90952.6286
840.17770.160.08784.02116.66882.5824



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