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 computationSat, 11 Dec 2010 12:50:43 +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/11/t12920717117gjyrvafgdop10q.htm/, Retrieved Tue, 07 May 2024 01:27:21 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=108108, Retrieved Tue, 07 May 2024 01:27:21 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact171
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] [W9 ] [2010-12-03 13:29:18] [56d90b683fcd93137645f9226b43c62b]
-   PD          [ARIMA Forecasting] [Paper Forecasting...] [2010-12-11 12:50:43] [59f7d3e7fcb6374015f4e6b9053b0f01] [Current]
Feedback Forum

Post a new message
Dataseries X:
17848
19592
21092
20899
25890
24965
22225
20977
22897
22785
22769
19637
20203
20450
23083
21738
26766
25280
22574
22729
21378
22902
24989
21116
15169
15846
20927
18273
22538
15596
14034
11366
14861
15149
13577
13026
13190
13196
15826
14733
16307
15703
14589
12043
15057
14053
12698
10888
10045
11549
13767
12434
13116
14211
12266
12602
15714
13742
12745
10491
10057
10900
11771
11992
11933
14504
11727
11477
13578
11555
11846
11397
10066
10269
14279
13870
13695
14420
11424
9704
12464
14301
13464
9893
11572
12380
16692
16052
16459
14761
13654
13480
18068
16560
14530
10650
11651
13735
13360
17818
20613
16231
13862
12004
17734
15034
12609
12320
10833
11350
13648
14890
16325
18045
15616
11926
16855
15083
12520
12355




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108108&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=108108&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108108&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[108])
9610650-------
9711651-------
9813735-------
9913360-------
10017818-------
10120613-------
10216231-------
10313862-------
10412004-------
10517734-------
10615034-------
10712609-------
10812320-------
1091083312625.32738817.262516433.39210.17810.56240.6920.5624
1101135013823.47658438.400619208.55250.1840.86180.51280.7079
1111364815808.48639213.281422403.69120.26040.90740.76660.8501
1121489017022.05839406.65224637.46460.29160.80740.41880.8869
1131632518496.52259982.293327010.75160.30860.79680.31310.9225
1141804516669.88317343.051825996.71450.38630.52890.53670.8197
1151561614546.68614472.587224620.7850.41760.24810.5530.6676
1161192613383.75732614.116924153.39770.39540.34230.59910.5768
1171685517546.40556123.49728969.3140.45280.83260.48720.8151
1181508316169.41534128.629428210.20110.42980.45560.57330.7345
1191252014603.00781974.539627231.4760.37320.47030.62150.6385
1201235512681.4665-508.525725871.45860.48070.50960.52140.5214

\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[108]) \tabularnewline
96 & 10650 & - & - & - & - & - & - & - \tabularnewline
97 & 11651 & - & - & - & - & - & - & - \tabularnewline
98 & 13735 & - & - & - & - & - & - & - \tabularnewline
99 & 13360 & - & - & - & - & - & - & - \tabularnewline
100 & 17818 & - & - & - & - & - & - & - \tabularnewline
101 & 20613 & - & - & - & - & - & - & - \tabularnewline
102 & 16231 & - & - & - & - & - & - & - \tabularnewline
103 & 13862 & - & - & - & - & - & - & - \tabularnewline
104 & 12004 & - & - & - & - & - & - & - \tabularnewline
105 & 17734 & - & - & - & - & - & - & - \tabularnewline
106 & 15034 & - & - & - & - & - & - & - \tabularnewline
107 & 12609 & - & - & - & - & - & - & - \tabularnewline
108 & 12320 & - & - & - & - & - & - & - \tabularnewline
109 & 10833 & 12625.3273 & 8817.2625 & 16433.3921 & 0.1781 & 0.5624 & 0.692 & 0.5624 \tabularnewline
110 & 11350 & 13823.4765 & 8438.4006 & 19208.5525 & 0.184 & 0.8618 & 0.5128 & 0.7079 \tabularnewline
111 & 13648 & 15808.4863 & 9213.2814 & 22403.6912 & 0.2604 & 0.9074 & 0.7666 & 0.8501 \tabularnewline
112 & 14890 & 17022.0583 & 9406.652 & 24637.4646 & 0.2916 & 0.8074 & 0.4188 & 0.8869 \tabularnewline
113 & 16325 & 18496.5225 & 9982.2933 & 27010.7516 & 0.3086 & 0.7968 & 0.3131 & 0.9225 \tabularnewline
114 & 18045 & 16669.8831 & 7343.0518 & 25996.7145 & 0.3863 & 0.5289 & 0.5367 & 0.8197 \tabularnewline
115 & 15616 & 14546.6861 & 4472.5872 & 24620.785 & 0.4176 & 0.2481 & 0.553 & 0.6676 \tabularnewline
116 & 11926 & 13383.7573 & 2614.1169 & 24153.3977 & 0.3954 & 0.3423 & 0.5991 & 0.5768 \tabularnewline
117 & 16855 & 17546.4055 & 6123.497 & 28969.314 & 0.4528 & 0.8326 & 0.4872 & 0.8151 \tabularnewline
118 & 15083 & 16169.4153 & 4128.6294 & 28210.2011 & 0.4298 & 0.4556 & 0.5733 & 0.7345 \tabularnewline
119 & 12520 & 14603.0078 & 1974.5396 & 27231.476 & 0.3732 & 0.4703 & 0.6215 & 0.6385 \tabularnewline
120 & 12355 & 12681.4665 & -508.5257 & 25871.4586 & 0.4807 & 0.5096 & 0.5214 & 0.5214 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108108&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[108])[/C][/ROW]
[ROW][C]96[/C][C]10650[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]11651[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]13735[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]13360[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]17818[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]20613[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]16231[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]13862[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]12004[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]17734[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]15034[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]12609[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]12320[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]10833[/C][C]12625.3273[/C][C]8817.2625[/C][C]16433.3921[/C][C]0.1781[/C][C]0.5624[/C][C]0.692[/C][C]0.5624[/C][/ROW]
[ROW][C]110[/C][C]11350[/C][C]13823.4765[/C][C]8438.4006[/C][C]19208.5525[/C][C]0.184[/C][C]0.8618[/C][C]0.5128[/C][C]0.7079[/C][/ROW]
[ROW][C]111[/C][C]13648[/C][C]15808.4863[/C][C]9213.2814[/C][C]22403.6912[/C][C]0.2604[/C][C]0.9074[/C][C]0.7666[/C][C]0.8501[/C][/ROW]
[ROW][C]112[/C][C]14890[/C][C]17022.0583[/C][C]9406.652[/C][C]24637.4646[/C][C]0.2916[/C][C]0.8074[/C][C]0.4188[/C][C]0.8869[/C][/ROW]
[ROW][C]113[/C][C]16325[/C][C]18496.5225[/C][C]9982.2933[/C][C]27010.7516[/C][C]0.3086[/C][C]0.7968[/C][C]0.3131[/C][C]0.9225[/C][/ROW]
[ROW][C]114[/C][C]18045[/C][C]16669.8831[/C][C]7343.0518[/C][C]25996.7145[/C][C]0.3863[/C][C]0.5289[/C][C]0.5367[/C][C]0.8197[/C][/ROW]
[ROW][C]115[/C][C]15616[/C][C]14546.6861[/C][C]4472.5872[/C][C]24620.785[/C][C]0.4176[/C][C]0.2481[/C][C]0.553[/C][C]0.6676[/C][/ROW]
[ROW][C]116[/C][C]11926[/C][C]13383.7573[/C][C]2614.1169[/C][C]24153.3977[/C][C]0.3954[/C][C]0.3423[/C][C]0.5991[/C][C]0.5768[/C][/ROW]
[ROW][C]117[/C][C]16855[/C][C]17546.4055[/C][C]6123.497[/C][C]28969.314[/C][C]0.4528[/C][C]0.8326[/C][C]0.4872[/C][C]0.8151[/C][/ROW]
[ROW][C]118[/C][C]15083[/C][C]16169.4153[/C][C]4128.6294[/C][C]28210.2011[/C][C]0.4298[/C][C]0.4556[/C][C]0.5733[/C][C]0.7345[/C][/ROW]
[ROW][C]119[/C][C]12520[/C][C]14603.0078[/C][C]1974.5396[/C][C]27231.476[/C][C]0.3732[/C][C]0.4703[/C][C]0.6215[/C][C]0.6385[/C][/ROW]
[ROW][C]120[/C][C]12355[/C][C]12681.4665[/C][C]-508.5257[/C][C]25871.4586[/C][C]0.4807[/C][C]0.5096[/C][C]0.5214[/C][C]0.5214[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=108108&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108108&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[108])
9610650-------
9711651-------
9813735-------
9913360-------
10017818-------
10120613-------
10216231-------
10313862-------
10412004-------
10517734-------
10615034-------
10712609-------
10812320-------
1091083312625.32738817.262516433.39210.17810.56240.6920.5624
1101135013823.47658438.400619208.55250.1840.86180.51280.7079
1111364815808.48639213.281422403.69120.26040.90740.76660.8501
1121489017022.05839406.65224637.46460.29160.80740.41880.8869
1131632518496.52259982.293327010.75160.30860.79680.31310.9225
1141804516669.88317343.051825996.71450.38630.52890.53670.8197
1151561614546.68614472.587224620.7850.41760.24810.5530.6676
1161192613383.75732614.116924153.39770.39540.34230.59910.5768
1171685517546.40556123.49728969.3140.45280.83260.48720.8151
1181508316169.41534128.629428210.20110.42980.45560.57330.7345
1191252014603.00781974.539627231.4760.37320.47030.62150.6385
1201235512681.4665-508.525725871.45860.48070.50960.52140.5214







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1090.1539-0.14203212437.267600
1100.1988-0.17890.16046118086.24264665261.75512159.9217
1110.2129-0.13670.15254667701.16184666074.89062160.1099
1120.2283-0.12530.14574545672.60554635974.31942153.1313
1130.2349-0.11740.144715509.75714651881.40692156.8221
1140.28550.08250.13051890946.4254191725.57662047.3704
1150.35330.07350.12231143432.12493756255.08351938.1061
1160.4106-0.10890.12062125056.35013552355.24181884.7693
1170.3321-0.03940.1116478041.59863210764.8371791.8607
1180.3799-0.06720.10721180298.16483007718.16981734.2774
1190.4412-0.14260.11044338921.36633128736.64221768.8235
1200.5307-0.02570.1033106580.34622876890.28421696.1398

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
109 & 0.1539 & -0.142 & 0 & 3212437.2676 & 0 & 0 \tabularnewline
110 & 0.1988 & -0.1789 & 0.1604 & 6118086.2426 & 4665261.7551 & 2159.9217 \tabularnewline
111 & 0.2129 & -0.1367 & 0.1525 & 4667701.1618 & 4666074.8906 & 2160.1099 \tabularnewline
112 & 0.2283 & -0.1253 & 0.1457 & 4545672.6055 & 4635974.3194 & 2153.1313 \tabularnewline
113 & 0.2349 & -0.1174 & 0.14 & 4715509.7571 & 4651881.4069 & 2156.8221 \tabularnewline
114 & 0.2855 & 0.0825 & 0.1305 & 1890946.425 & 4191725.5766 & 2047.3704 \tabularnewline
115 & 0.3533 & 0.0735 & 0.1223 & 1143432.1249 & 3756255.0835 & 1938.1061 \tabularnewline
116 & 0.4106 & -0.1089 & 0.1206 & 2125056.3501 & 3552355.2418 & 1884.7693 \tabularnewline
117 & 0.3321 & -0.0394 & 0.1116 & 478041.5986 & 3210764.837 & 1791.8607 \tabularnewline
118 & 0.3799 & -0.0672 & 0.1072 & 1180298.1648 & 3007718.1698 & 1734.2774 \tabularnewline
119 & 0.4412 & -0.1426 & 0.1104 & 4338921.3663 & 3128736.6422 & 1768.8235 \tabularnewline
120 & 0.5307 & -0.0257 & 0.1033 & 106580.3462 & 2876890.2842 & 1696.1398 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108108&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]109[/C][C]0.1539[/C][C]-0.142[/C][C]0[/C][C]3212437.2676[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]110[/C][C]0.1988[/C][C]-0.1789[/C][C]0.1604[/C][C]6118086.2426[/C][C]4665261.7551[/C][C]2159.9217[/C][/ROW]
[ROW][C]111[/C][C]0.2129[/C][C]-0.1367[/C][C]0.1525[/C][C]4667701.1618[/C][C]4666074.8906[/C][C]2160.1099[/C][/ROW]
[ROW][C]112[/C][C]0.2283[/C][C]-0.1253[/C][C]0.1457[/C][C]4545672.6055[/C][C]4635974.3194[/C][C]2153.1313[/C][/ROW]
[ROW][C]113[/C][C]0.2349[/C][C]-0.1174[/C][C]0.14[/C][C]4715509.7571[/C][C]4651881.4069[/C][C]2156.8221[/C][/ROW]
[ROW][C]114[/C][C]0.2855[/C][C]0.0825[/C][C]0.1305[/C][C]1890946.425[/C][C]4191725.5766[/C][C]2047.3704[/C][/ROW]
[ROW][C]115[/C][C]0.3533[/C][C]0.0735[/C][C]0.1223[/C][C]1143432.1249[/C][C]3756255.0835[/C][C]1938.1061[/C][/ROW]
[ROW][C]116[/C][C]0.4106[/C][C]-0.1089[/C][C]0.1206[/C][C]2125056.3501[/C][C]3552355.2418[/C][C]1884.7693[/C][/ROW]
[ROW][C]117[/C][C]0.3321[/C][C]-0.0394[/C][C]0.1116[/C][C]478041.5986[/C][C]3210764.837[/C][C]1791.8607[/C][/ROW]
[ROW][C]118[/C][C]0.3799[/C][C]-0.0672[/C][C]0.1072[/C][C]1180298.1648[/C][C]3007718.1698[/C][C]1734.2774[/C][/ROW]
[ROW][C]119[/C][C]0.4412[/C][C]-0.1426[/C][C]0.1104[/C][C]4338921.3663[/C][C]3128736.6422[/C][C]1768.8235[/C][/ROW]
[ROW][C]120[/C][C]0.5307[/C][C]-0.0257[/C][C]0.1033[/C][C]106580.3462[/C][C]2876890.2842[/C][C]1696.1398[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=108108&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108108&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
1090.1539-0.14203212437.267600
1100.1988-0.17890.16046118086.24264665261.75512159.9217
1110.2129-0.13670.15254667701.16184666074.89062160.1099
1120.2283-0.12530.14574545672.60554635974.31942153.1313
1130.2349-0.11740.144715509.75714651881.40692156.8221
1140.28550.08250.13051890946.4254191725.57662047.3704
1150.35330.07350.12231143432.12493756255.08351938.1061
1160.4106-0.10890.12062125056.35013552355.24181884.7693
1170.3321-0.03940.1116478041.59863210764.8371791.8607
1180.3799-0.06720.10721180298.16483007718.16981734.2774
1190.4412-0.14260.11044338921.36633128736.64221768.8235
1200.5307-0.02570.1033106580.34622876890.28421696.1398



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