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 computationFri, 16 Dec 2011 16:25:21 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/16/t1324070794vj2kalaggwkkupb.htm/, Retrieved Sun, 05 May 2024 15:07:31 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=156135, Retrieved Sun, 05 May 2024 15:07:31 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact114
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 R PD      [ARIMA Forecasting] [Forecast] [2010-12-02 21:01:45] [97ad38b1c3b35a5feca8b85f7bc7b3ff]
- R P         [ARIMA Forecasting] [] [2011-12-04 15:35:56] [9401a40688cf36283be626153bc5a38b]
- R             [ARIMA Forecasting] [WS9.7] [2011-12-06 20:46:35] [246430c28552f7bc561843533d7ec653]
- R P             [ARIMA Forecasting] [WS 9 ARIMA Foreca...] [2011-12-16 18:46:50] [f5fdea4413921432bb019d1f20c4f2ec]
- R  D                [ARIMA Forecasting] [WS 9 ARIMA Foreca...] [2011-12-16 21:25:21] [6140f0163e532fc168d2f211324acd0a] [Current]
Feedback Forum

Post a new message
Dataseries X:
1015407
1039210
1258049
1469445
1552346
1549144
1785895
1662335
1629440
1467430
1202209
1076982
1039367
1063449
1335135
1491602
1591972
1641248
1898849
1798580
1762444
1622044
1368955
1262973
1195650
1269530
1479279
1607819
1712466
1721766
1949843
1821326
1757802
1590367
1260647
1149235
1016367
1027885
1262159
1520854
1544144
1564709
1821776
1741365
1623386
1498658
1241822
1136029
1035030
1078521
1279431
1171023
1573377
1589514
1859878
1783191
1689849
1619868
1323443
1177481




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net

\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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=156135&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=156135&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=156135&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 time1 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







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[48])
361149235-------
371016367-------
381027885-------
391262159-------
401520854-------
411544144-------
421564709-------
431821776-------
441741365-------
451623386-------
461498658-------
471241822-------
481136029-------
4910350301035837.1417957207.28611114466.99740.4920.00630.68630.0063
5010785211079792.7398977270.33541182315.14420.49030.80390.83950.1412
5112794311301310.05961179494.49161423125.62760.36240.99980.73560.9961
5211710231492304.92841353859.19241630750.664400.99870.3431
5315733771557912.77691404630.64811711194.90570.421610.56991
5415895141572618.28651405814.20911739422.36380.42130.49640.5371
5518598781814606.13621635296.93561993915.33680.31030.99310.46881
5617831911709172.79731518175.47111900170.12360.22380.0610.37061
5716898491619518.56891417508.25271821528.88510.24750.05610.4851
5816198681472576.52031260123.33241685029.70820.08710.02250.40490.999
5913234431177829.9032955423.63921400236.16720.099700.28640.6437
6011774811069114.18837181.57031301046.78970.17990.01580.28590.2859

\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[48]) \tabularnewline
36 & 1149235 & - & - & - & - & - & - & - \tabularnewline
37 & 1016367 & - & - & - & - & - & - & - \tabularnewline
38 & 1027885 & - & - & - & - & - & - & - \tabularnewline
39 & 1262159 & - & - & - & - & - & - & - \tabularnewline
40 & 1520854 & - & - & - & - & - & - & - \tabularnewline
41 & 1544144 & - & - & - & - & - & - & - \tabularnewline
42 & 1564709 & - & - & - & - & - & - & - \tabularnewline
43 & 1821776 & - & - & - & - & - & - & - \tabularnewline
44 & 1741365 & - & - & - & - & - & - & - \tabularnewline
45 & 1623386 & - & - & - & - & - & - & - \tabularnewline
46 & 1498658 & - & - & - & - & - & - & - \tabularnewline
47 & 1241822 & - & - & - & - & - & - & - \tabularnewline
48 & 1136029 & - & - & - & - & - & - & - \tabularnewline
49 & 1035030 & 1035837.1417 & 957207.2861 & 1114466.9974 & 0.492 & 0.0063 & 0.6863 & 0.0063 \tabularnewline
50 & 1078521 & 1079792.7398 & 977270.3354 & 1182315.1442 & 0.4903 & 0.8039 & 0.8395 & 0.1412 \tabularnewline
51 & 1279431 & 1301310.0596 & 1179494.4916 & 1423125.6276 & 0.3624 & 0.9998 & 0.7356 & 0.9961 \tabularnewline
52 & 1171023 & 1492304.9284 & 1353859.1924 & 1630750.6644 & 0 & 0.9987 & 0.343 & 1 \tabularnewline
53 & 1573377 & 1557912.7769 & 1404630.6481 & 1711194.9057 & 0.4216 & 1 & 0.5699 & 1 \tabularnewline
54 & 1589514 & 1572618.2865 & 1405814.2091 & 1739422.3638 & 0.4213 & 0.4964 & 0.537 & 1 \tabularnewline
55 & 1859878 & 1814606.1362 & 1635296.9356 & 1993915.3368 & 0.3103 & 0.9931 & 0.4688 & 1 \tabularnewline
56 & 1783191 & 1709172.7973 & 1518175.4711 & 1900170.1236 & 0.2238 & 0.061 & 0.3706 & 1 \tabularnewline
57 & 1689849 & 1619518.5689 & 1417508.2527 & 1821528.8851 & 0.2475 & 0.0561 & 0.485 & 1 \tabularnewline
58 & 1619868 & 1472576.5203 & 1260123.3324 & 1685029.7082 & 0.0871 & 0.0225 & 0.4049 & 0.999 \tabularnewline
59 & 1323443 & 1177829.9032 & 955423.6392 & 1400236.1672 & 0.0997 & 0 & 0.2864 & 0.6437 \tabularnewline
60 & 1177481 & 1069114.18 & 837181.5703 & 1301046.7897 & 0.1799 & 0.0158 & 0.2859 & 0.2859 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=156135&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[48])[/C][/ROW]
[ROW][C]36[/C][C]1149235[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]1016367[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]1027885[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]1262159[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]1520854[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]1544144[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]1564709[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]1821776[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]1741365[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]1623386[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]1498658[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]1241822[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]1136029[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1035030[/C][C]1035837.1417[/C][C]957207.2861[/C][C]1114466.9974[/C][C]0.492[/C][C]0.0063[/C][C]0.6863[/C][C]0.0063[/C][/ROW]
[ROW][C]50[/C][C]1078521[/C][C]1079792.7398[/C][C]977270.3354[/C][C]1182315.1442[/C][C]0.4903[/C][C]0.8039[/C][C]0.8395[/C][C]0.1412[/C][/ROW]
[ROW][C]51[/C][C]1279431[/C][C]1301310.0596[/C][C]1179494.4916[/C][C]1423125.6276[/C][C]0.3624[/C][C]0.9998[/C][C]0.7356[/C][C]0.9961[/C][/ROW]
[ROW][C]52[/C][C]1171023[/C][C]1492304.9284[/C][C]1353859.1924[/C][C]1630750.6644[/C][C]0[/C][C]0.9987[/C][C]0.343[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]1573377[/C][C]1557912.7769[/C][C]1404630.6481[/C][C]1711194.9057[/C][C]0.4216[/C][C]1[/C][C]0.5699[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]1589514[/C][C]1572618.2865[/C][C]1405814.2091[/C][C]1739422.3638[/C][C]0.4213[/C][C]0.4964[/C][C]0.537[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]1859878[/C][C]1814606.1362[/C][C]1635296.9356[/C][C]1993915.3368[/C][C]0.3103[/C][C]0.9931[/C][C]0.4688[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]1783191[/C][C]1709172.7973[/C][C]1518175.4711[/C][C]1900170.1236[/C][C]0.2238[/C][C]0.061[/C][C]0.3706[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]1689849[/C][C]1619518.5689[/C][C]1417508.2527[/C][C]1821528.8851[/C][C]0.2475[/C][C]0.0561[/C][C]0.485[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]1619868[/C][C]1472576.5203[/C][C]1260123.3324[/C][C]1685029.7082[/C][C]0.0871[/C][C]0.0225[/C][C]0.4049[/C][C]0.999[/C][/ROW]
[ROW][C]59[/C][C]1323443[/C][C]1177829.9032[/C][C]955423.6392[/C][C]1400236.1672[/C][C]0.0997[/C][C]0[/C][C]0.2864[/C][C]0.6437[/C][/ROW]
[ROW][C]60[/C][C]1177481[/C][C]1069114.18[/C][C]837181.5703[/C][C]1301046.7897[/C][C]0.1799[/C][C]0.0158[/C][C]0.2859[/C][C]0.2859[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=156135&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=156135&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[48])
361149235-------
371016367-------
381027885-------
391262159-------
401520854-------
411544144-------
421564709-------
431821776-------
441741365-------
451623386-------
461498658-------
471241822-------
481136029-------
4910350301035837.1417957207.28611114466.99740.4920.00630.68630.0063
5010785211079792.7398977270.33541182315.14420.49030.80390.83950.1412
5112794311301310.05961179494.49161423125.62760.36240.99980.73560.9961
5211710231492304.92841353859.19241630750.664400.99870.3431
5315733771557912.77691404630.64811711194.90570.421610.56991
5415895141572618.28651405814.20911739422.36380.42130.49640.5371
5518598781814606.13621635296.93561993915.33680.31030.99310.46881
5617831911709172.79731518175.47111900170.12360.22380.0610.37061
5716898491619518.56891417508.25271821528.88510.24750.05610.4851
5816198681472576.52031260123.33241685029.70820.08710.02250.40490.999
5913234431177829.9032955423.63921400236.16720.099700.28640.6437
6011774811069114.18837181.57031301046.78970.17990.01580.28590.2859







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0387-8e-040651477.75400
500.0484-0.00120.0011617322.20691134399.98051065.0821
510.0478-0.01680.0063478693248.2763160320682.745712661.7804
520.0473-0.21530.0585103222077496.97125925759886.302161014.7816
530.05020.00990.0488239142196.149620788436348.2715144181.9557
540.05410.01070.0425285465136.071217371274479.5715131800.1308
550.05040.02490.042049541653.305815182455504.3907123217.1072
560.0570.04330.04045478694324.846113969485356.9476118192.5774
570.06360.04340.04074946369535.44112966916932.3357113872.3712
580.07360.10.046621694780003.99513839703239.5017117642.2681
590.09630.12360.053621203173959.615614509109668.6029120453.7657
600.11070.10140.057611743367675.521814278631169.1795119493.2265

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0387 & -8e-04 & 0 & 651477.754 & 0 & 0 \tabularnewline
50 & 0.0484 & -0.0012 & 0.001 & 1617322.2069 & 1134399.9805 & 1065.0821 \tabularnewline
51 & 0.0478 & -0.0168 & 0.0063 & 478693248.2763 & 160320682.7457 & 12661.7804 \tabularnewline
52 & 0.0473 & -0.2153 & 0.0585 & 103222077496.971 & 25925759886.302 & 161014.7816 \tabularnewline
53 & 0.0502 & 0.0099 & 0.0488 & 239142196.1496 & 20788436348.2715 & 144181.9557 \tabularnewline
54 & 0.0541 & 0.0107 & 0.0425 & 285465136.0712 & 17371274479.5715 & 131800.1308 \tabularnewline
55 & 0.0504 & 0.0249 & 0.04 & 2049541653.3058 & 15182455504.3907 & 123217.1072 \tabularnewline
56 & 0.057 & 0.0433 & 0.0404 & 5478694324.8461 & 13969485356.9476 & 118192.5774 \tabularnewline
57 & 0.0636 & 0.0434 & 0.0407 & 4946369535.441 & 12966916932.3357 & 113872.3712 \tabularnewline
58 & 0.0736 & 0.1 & 0.0466 & 21694780003.995 & 13839703239.5017 & 117642.2681 \tabularnewline
59 & 0.0963 & 0.1236 & 0.0536 & 21203173959.6156 & 14509109668.6029 & 120453.7657 \tabularnewline
60 & 0.1107 & 0.1014 & 0.0576 & 11743367675.5218 & 14278631169.1795 & 119493.2265 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=156135&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]49[/C][C]0.0387[/C][C]-8e-04[/C][C]0[/C][C]651477.754[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0484[/C][C]-0.0012[/C][C]0.001[/C][C]1617322.2069[/C][C]1134399.9805[/C][C]1065.0821[/C][/ROW]
[ROW][C]51[/C][C]0.0478[/C][C]-0.0168[/C][C]0.0063[/C][C]478693248.2763[/C][C]160320682.7457[/C][C]12661.7804[/C][/ROW]
[ROW][C]52[/C][C]0.0473[/C][C]-0.2153[/C][C]0.0585[/C][C]103222077496.971[/C][C]25925759886.302[/C][C]161014.7816[/C][/ROW]
[ROW][C]53[/C][C]0.0502[/C][C]0.0099[/C][C]0.0488[/C][C]239142196.1496[/C][C]20788436348.2715[/C][C]144181.9557[/C][/ROW]
[ROW][C]54[/C][C]0.0541[/C][C]0.0107[/C][C]0.0425[/C][C]285465136.0712[/C][C]17371274479.5715[/C][C]131800.1308[/C][/ROW]
[ROW][C]55[/C][C]0.0504[/C][C]0.0249[/C][C]0.04[/C][C]2049541653.3058[/C][C]15182455504.3907[/C][C]123217.1072[/C][/ROW]
[ROW][C]56[/C][C]0.057[/C][C]0.0433[/C][C]0.0404[/C][C]5478694324.8461[/C][C]13969485356.9476[/C][C]118192.5774[/C][/ROW]
[ROW][C]57[/C][C]0.0636[/C][C]0.0434[/C][C]0.0407[/C][C]4946369535.441[/C][C]12966916932.3357[/C][C]113872.3712[/C][/ROW]
[ROW][C]58[/C][C]0.0736[/C][C]0.1[/C][C]0.0466[/C][C]21694780003.995[/C][C]13839703239.5017[/C][C]117642.2681[/C][/ROW]
[ROW][C]59[/C][C]0.0963[/C][C]0.1236[/C][C]0.0536[/C][C]21203173959.6156[/C][C]14509109668.6029[/C][C]120453.7657[/C][/ROW]
[ROW][C]60[/C][C]0.1107[/C][C]0.1014[/C][C]0.0576[/C][C]11743367675.5218[/C][C]14278631169.1795[/C][C]119493.2265[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=156135&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=156135&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
490.0387-8e-040651477.75400
500.0484-0.00120.0011617322.20691134399.98051065.0821
510.0478-0.01680.0063478693248.2763160320682.745712661.7804
520.0473-0.21530.0585103222077496.97125925759886.302161014.7816
530.05020.00990.0488239142196.149620788436348.2715144181.9557
540.05410.01070.0425285465136.071217371274479.5715131800.1308
550.05040.02490.042049541653.305815182455504.3907123217.1072
560.0570.04330.04045478694324.846113969485356.9476118192.5774
570.06360.04340.04074946369535.44112966916932.3357113872.3712
580.07360.10.046621694780003.99513839703239.5017117642.2681
590.09630.12360.053621203173959.615614509109668.6029120453.7657
600.11070.10140.057611743367675.521814278631169.1795119493.2265



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