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 computationMon, 06 Dec 2010 21:12:10 +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/06/t1291669821kl6510za7cvrq29.htm/, Retrieved Mon, 29 Apr 2024 04:47:22 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=105897, Retrieved Mon, 29 Apr 2024 04:47:22 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact139
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] [Forecasting - ARI...] [2010-12-04 11:44:01] [2960375a246cc0628590c95c4038a43c]
-    D          [ARIMA Forecasting] [Voorspellingen ad...] [2010-12-06 21:12:10] [85c2b01fe80f9fc86b9396d4d142e465] [Current]
-                 [ARIMA Forecasting] [] [2010-12-07 13:46:43] [d87a19cd5db53e12ea62bda70b3bb267]
-   P               [ARIMA Forecasting] [Workshop 9 (Feedb...] [2010-12-10 13:24:31] [00b18f0d8e13a2047ccd266ce7bab24a]
-   P             [ARIMA Forecasting] [Forecast ARIMA-model] [2010-12-19 12:42:39] [d7a673bc47e3999e70f4e1e2276e5189]
Feedback Forum

Post a new message
Dataseries X:
16198.9
16554.2
19554.2
15903.8
18003.8
18329.6
16260.7
14851.9
18174.1
18406.6
18466.5
16016.5
17428.5
17167.2
19630
17183.6
18344.7
19301.4
18147.5
16192.9
18374.4
20515.2
18957.2
16471.5
18746.8
19009.5
19211.2
20547.7
19325.8
20605.5
20056.9
16141.4
20359.8
19711.6
15638.6
14384.5
13855.6
14308.3
15290.6
14423.8
13779.7
15686.3
14733.8
12522.5
16189.4
16059.1
16007.1
15806.8
15160
15692.1
18908.9
16969.9
16997.5
19858.9
17681.2




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105897&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105897&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105897&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'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[43])
3120056.9-------
3216141.4-------
3320359.8-------
3419711.6-------
3515638.6-------
3614384.5-------
3713855.6-------
3814308.3-------
3915290.6-------
4014423.8-------
4113779.7-------
4215686.3-------
4314733.8-------
4412522.511285.90239788.624712783.180.0527000
4516189.416221.889314551.318117892.46050.4848100.9596
4616059.114413.719612472.160316355.27890.04840.036500.3733
4716007.112160.310410017.023414303.59742e-042e-047e-040.0093
4815806.810716.63868378.457613054.8195000.00114e-04
49151609951.00647436.225912465.787000.00121e-04
5015692.19927.26797246.500112608.035601e-047e-042e-04
5118908.912683.30399846.554615520.053200.01880.03580.0783
5216969.99006.40426021.717211991.0913002e-041e-04
5316997.510274.44427148.844113400.0444000.0140.0026
5419858.911798.29028537.851815058.728609e-040.00970.0388
5517681.210405.15467015.240113795.0691000.00620.0062

\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[43]) \tabularnewline
31 & 20056.9 & - & - & - & - & - & - & - \tabularnewline
32 & 16141.4 & - & - & - & - & - & - & - \tabularnewline
33 & 20359.8 & - & - & - & - & - & - & - \tabularnewline
34 & 19711.6 & - & - & - & - & - & - & - \tabularnewline
35 & 15638.6 & - & - & - & - & - & - & - \tabularnewline
36 & 14384.5 & - & - & - & - & - & - & - \tabularnewline
37 & 13855.6 & - & - & - & - & - & - & - \tabularnewline
38 & 14308.3 & - & - & - & - & - & - & - \tabularnewline
39 & 15290.6 & - & - & - & - & - & - & - \tabularnewline
40 & 14423.8 & - & - & - & - & - & - & - \tabularnewline
41 & 13779.7 & - & - & - & - & - & - & - \tabularnewline
42 & 15686.3 & - & - & - & - & - & - & - \tabularnewline
43 & 14733.8 & - & - & - & - & - & - & - \tabularnewline
44 & 12522.5 & 11285.9023 & 9788.6247 & 12783.18 & 0.0527 & 0 & 0 & 0 \tabularnewline
45 & 16189.4 & 16221.8893 & 14551.3181 & 17892.4605 & 0.4848 & 1 & 0 & 0.9596 \tabularnewline
46 & 16059.1 & 14413.7196 & 12472.1603 & 16355.2789 & 0.0484 & 0.0365 & 0 & 0.3733 \tabularnewline
47 & 16007.1 & 12160.3104 & 10017.0234 & 14303.5974 & 2e-04 & 2e-04 & 7e-04 & 0.0093 \tabularnewline
48 & 15806.8 & 10716.6386 & 8378.4576 & 13054.8195 & 0 & 0 & 0.0011 & 4e-04 \tabularnewline
49 & 15160 & 9951.0064 & 7436.2259 & 12465.787 & 0 & 0 & 0.0012 & 1e-04 \tabularnewline
50 & 15692.1 & 9927.2679 & 7246.5001 & 12608.0356 & 0 & 1e-04 & 7e-04 & 2e-04 \tabularnewline
51 & 18908.9 & 12683.3039 & 9846.5546 & 15520.0532 & 0 & 0.0188 & 0.0358 & 0.0783 \tabularnewline
52 & 16969.9 & 9006.4042 & 6021.7172 & 11991.0913 & 0 & 0 & 2e-04 & 1e-04 \tabularnewline
53 & 16997.5 & 10274.4442 & 7148.8441 & 13400.0444 & 0 & 0 & 0.014 & 0.0026 \tabularnewline
54 & 19858.9 & 11798.2902 & 8537.8518 & 15058.7286 & 0 & 9e-04 & 0.0097 & 0.0388 \tabularnewline
55 & 17681.2 & 10405.1546 & 7015.2401 & 13795.0691 & 0 & 0 & 0.0062 & 0.0062 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105897&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[43])[/C][/ROW]
[ROW][C]31[/C][C]20056.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]16141.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]20359.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]19711.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]15638.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]14384.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]13855.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]14308.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]15290.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]14423.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]13779.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]15686.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]14733.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]12522.5[/C][C]11285.9023[/C][C]9788.6247[/C][C]12783.18[/C][C]0.0527[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]45[/C][C]16189.4[/C][C]16221.8893[/C][C]14551.3181[/C][C]17892.4605[/C][C]0.4848[/C][C]1[/C][C]0[/C][C]0.9596[/C][/ROW]
[ROW][C]46[/C][C]16059.1[/C][C]14413.7196[/C][C]12472.1603[/C][C]16355.2789[/C][C]0.0484[/C][C]0.0365[/C][C]0[/C][C]0.3733[/C][/ROW]
[ROW][C]47[/C][C]16007.1[/C][C]12160.3104[/C][C]10017.0234[/C][C]14303.5974[/C][C]2e-04[/C][C]2e-04[/C][C]7e-04[/C][C]0.0093[/C][/ROW]
[ROW][C]48[/C][C]15806.8[/C][C]10716.6386[/C][C]8378.4576[/C][C]13054.8195[/C][C]0[/C][C]0[/C][C]0.0011[/C][C]4e-04[/C][/ROW]
[ROW][C]49[/C][C]15160[/C][C]9951.0064[/C][C]7436.2259[/C][C]12465.787[/C][C]0[/C][C]0[/C][C]0.0012[/C][C]1e-04[/C][/ROW]
[ROW][C]50[/C][C]15692.1[/C][C]9927.2679[/C][C]7246.5001[/C][C]12608.0356[/C][C]0[/C][C]1e-04[/C][C]7e-04[/C][C]2e-04[/C][/ROW]
[ROW][C]51[/C][C]18908.9[/C][C]12683.3039[/C][C]9846.5546[/C][C]15520.0532[/C][C]0[/C][C]0.0188[/C][C]0.0358[/C][C]0.0783[/C][/ROW]
[ROW][C]52[/C][C]16969.9[/C][C]9006.4042[/C][C]6021.7172[/C][C]11991.0913[/C][C]0[/C][C]0[/C][C]2e-04[/C][C]1e-04[/C][/ROW]
[ROW][C]53[/C][C]16997.5[/C][C]10274.4442[/C][C]7148.8441[/C][C]13400.0444[/C][C]0[/C][C]0[/C][C]0.014[/C][C]0.0026[/C][/ROW]
[ROW][C]54[/C][C]19858.9[/C][C]11798.2902[/C][C]8537.8518[/C][C]15058.7286[/C][C]0[/C][C]9e-04[/C][C]0.0097[/C][C]0.0388[/C][/ROW]
[ROW][C]55[/C][C]17681.2[/C][C]10405.1546[/C][C]7015.2401[/C][C]13795.0691[/C][C]0[/C][C]0[/C][C]0.0062[/C][C]0.0062[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105897&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105897&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[43])
3120056.9-------
3216141.4-------
3320359.8-------
3419711.6-------
3515638.6-------
3614384.5-------
3713855.6-------
3814308.3-------
3915290.6-------
4014423.8-------
4113779.7-------
4215686.3-------
4314733.8-------
4412522.511285.90239788.624712783.180.0527000
4516189.416221.889314551.318117892.46050.4848100.9596
4616059.114413.719612472.160316355.27890.04840.036500.3733
4716007.112160.310410017.023414303.59742e-042e-047e-040.0093
4815806.810716.63868378.457613054.8195000.00114e-04
49151609951.00647436.225912465.787000.00121e-04
5015692.19927.26797246.500112608.035601e-047e-042e-04
5118908.912683.30399846.554615520.053200.01880.03580.0783
5216969.99006.40426021.717211991.0913002e-041e-04
5316997.510274.44427148.844113400.0444000.0140.0026
5419858.911798.29028537.851815058.728609e-040.00970.0388
5517681.210405.15467015.240113795.0691000.00620.0062







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
440.06770.109601529173.796700
450.0525-0.0020.05581055.556765114.6763874.7083
460.06870.11420.07522707276.67641412502.00971188.4873
470.08990.31630.135514797790.53954758824.14222181.4729
480.11130.4750.203425909743.37988989007.98972998.1674
490.12890.52350.256827133613.960212013108.98483465.9932
500.13780.58070.30333233289.63915044563.36393878.7322
510.11410.49080.326538758046.747318008748.78694243.6716
520.16910.88420.388563417264.873623054139.46324801.4726
530.15520.65430.415145199478.817925268673.39865026.7955
540.1410.68320.439464973429.613928878196.69095373.8438
550.16620.69930.461152940837.045430883416.72055557.285

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
44 & 0.0677 & 0.1096 & 0 & 1529173.7967 & 0 & 0 \tabularnewline
45 & 0.0525 & -0.002 & 0.0558 & 1055.556 & 765114.6763 & 874.7083 \tabularnewline
46 & 0.0687 & 0.1142 & 0.0752 & 2707276.6764 & 1412502.0097 & 1188.4873 \tabularnewline
47 & 0.0899 & 0.3163 & 0.1355 & 14797790.5395 & 4758824.1422 & 2181.4729 \tabularnewline
48 & 0.1113 & 0.475 & 0.2034 & 25909743.3798 & 8989007.9897 & 2998.1674 \tabularnewline
49 & 0.1289 & 0.5235 & 0.2568 & 27133613.9602 & 12013108.9848 & 3465.9932 \tabularnewline
50 & 0.1378 & 0.5807 & 0.303 & 33233289.639 & 15044563.3639 & 3878.7322 \tabularnewline
51 & 0.1141 & 0.4908 & 0.3265 & 38758046.7473 & 18008748.7869 & 4243.6716 \tabularnewline
52 & 0.1691 & 0.8842 & 0.3885 & 63417264.8736 & 23054139.4632 & 4801.4726 \tabularnewline
53 & 0.1552 & 0.6543 & 0.4151 & 45199478.8179 & 25268673.3986 & 5026.7955 \tabularnewline
54 & 0.141 & 0.6832 & 0.4394 & 64973429.6139 & 28878196.6909 & 5373.8438 \tabularnewline
55 & 0.1662 & 0.6993 & 0.4611 & 52940837.0454 & 30883416.7205 & 5557.285 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105897&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]44[/C][C]0.0677[/C][C]0.1096[/C][C]0[/C][C]1529173.7967[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]45[/C][C]0.0525[/C][C]-0.002[/C][C]0.0558[/C][C]1055.556[/C][C]765114.6763[/C][C]874.7083[/C][/ROW]
[ROW][C]46[/C][C]0.0687[/C][C]0.1142[/C][C]0.0752[/C][C]2707276.6764[/C][C]1412502.0097[/C][C]1188.4873[/C][/ROW]
[ROW][C]47[/C][C]0.0899[/C][C]0.3163[/C][C]0.1355[/C][C]14797790.5395[/C][C]4758824.1422[/C][C]2181.4729[/C][/ROW]
[ROW][C]48[/C][C]0.1113[/C][C]0.475[/C][C]0.2034[/C][C]25909743.3798[/C][C]8989007.9897[/C][C]2998.1674[/C][/ROW]
[ROW][C]49[/C][C]0.1289[/C][C]0.5235[/C][C]0.2568[/C][C]27133613.9602[/C][C]12013108.9848[/C][C]3465.9932[/C][/ROW]
[ROW][C]50[/C][C]0.1378[/C][C]0.5807[/C][C]0.303[/C][C]33233289.639[/C][C]15044563.3639[/C][C]3878.7322[/C][/ROW]
[ROW][C]51[/C][C]0.1141[/C][C]0.4908[/C][C]0.3265[/C][C]38758046.7473[/C][C]18008748.7869[/C][C]4243.6716[/C][/ROW]
[ROW][C]52[/C][C]0.1691[/C][C]0.8842[/C][C]0.3885[/C][C]63417264.8736[/C][C]23054139.4632[/C][C]4801.4726[/C][/ROW]
[ROW][C]53[/C][C]0.1552[/C][C]0.6543[/C][C]0.4151[/C][C]45199478.8179[/C][C]25268673.3986[/C][C]5026.7955[/C][/ROW]
[ROW][C]54[/C][C]0.141[/C][C]0.6832[/C][C]0.4394[/C][C]64973429.6139[/C][C]28878196.6909[/C][C]5373.8438[/C][/ROW]
[ROW][C]55[/C][C]0.1662[/C][C]0.6993[/C][C]0.4611[/C][C]52940837.0454[/C][C]30883416.7205[/C][C]5557.285[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105897&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105897&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
440.06770.109601529173.796700
450.0525-0.0020.05581055.556765114.6763874.7083
460.06870.11420.07522707276.67641412502.00971188.4873
470.08990.31630.135514797790.53954758824.14222181.4729
480.11130.4750.203425909743.37988989007.98972998.1674
490.12890.52350.256827133613.960212013108.98483465.9932
500.13780.58070.30333233289.63915044563.36393878.7322
510.11410.49080.326538758046.747318008748.78694243.6716
520.16910.88420.388563417264.873623054139.46324801.4726
530.15520.65430.415145199478.817925268673.39865026.7955
540.1410.68320.439464973429.613928878196.69095373.8438
550.16620.69930.461152940837.045430883416.72055557.285



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