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 computationSun, 19 Dec 2010 20:46:40 +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/19/t1292791554qy1w4myn0xd62n7.htm/, Retrieved Sun, 05 May 2024 06:16:52 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=112739, Retrieved Sun, 05 May 2024 06:16:52 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact143
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] [ARIMA Forecasting...] [2010-12-06 13:02:50] [f4dc4aa51d65be851b8508203d9f6001]
-   PD          [ARIMA Forecasting] [ARIMA Forecasting...] [2010-12-19 20:46:40] [7a87ed98a7b21a29d6a45388a9b7b229] [Current]
-    D            [ARIMA Forecasting] [ARIMA FORECAST] [2010-12-25 16:51:28] [f9eaed74daea918f73b9f505c5b1f19e]
-    D              [ARIMA Forecasting] [Arima forecasting...] [2010-12-25 18:15:26] [f9eaed74daea918f73b9f505c5b1f19e]
-   P                 [ARIMA Forecasting] [Arima forecasting...] [2010-12-25 18:35:08] [f9eaed74daea918f73b9f505c5b1f19e]
-   P               [ARIMA Forecasting] [Arima forecasting...] [2010-12-25 18:36:08] [f9eaed74daea918f73b9f505c5b1f19e]
Feedback Forum

Post a new message
Dataseries X:
989236
1008380
1207763
1368839
1469798
1498721
1761769
1653214
1599104
1421179
1163995
1037735
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




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112739&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112739&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112739&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'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[48])
361262973-------
371195650-------
381269530-------
391479279-------
401607819-------
411712466-------
421721766-------
431949843-------
441821326-------
451757802-------
461590367-------
471260647-------
481149235-------
4910163671105566.30551053254.46211157878.14884e-040.05094e-040.0509
5010278851142448.3721070678.5681214218.1769e-040.99973e-040.4265
5112621591367687.33491280537.92861454836.74130.008810.0061
5215208541530462.33241430292.0551630632.60980.425410.06511
5315441441628013.60691516326.52851739700.68540.07050.970.06921
5415647091648997.23411526875.25931771119.20890.08810.95380.12141
5518217761894654.49811762921.53562026387.46060.139110.20581
5617413651779068.01241638379.1231919756.90180.29970.27590.2781
5716233861731933.26311582825.3871881041.13930.07680.45070.36691
5814986581570245.74421413169.59061727321.89790.18590.25360.40091
5912418221291945.32691127285.4461456605.20790.27540.00690.64530.9553
6011360291175211.58241003305.66461347117.50010.32750.22380.61650.6165

\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 & 1262973 & - & - & - & - & - & - & - \tabularnewline
37 & 1195650 & - & - & - & - & - & - & - \tabularnewline
38 & 1269530 & - & - & - & - & - & - & - \tabularnewline
39 & 1479279 & - & - & - & - & - & - & - \tabularnewline
40 & 1607819 & - & - & - & - & - & - & - \tabularnewline
41 & 1712466 & - & - & - & - & - & - & - \tabularnewline
42 & 1721766 & - & - & - & - & - & - & - \tabularnewline
43 & 1949843 & - & - & - & - & - & - & - \tabularnewline
44 & 1821326 & - & - & - & - & - & - & - \tabularnewline
45 & 1757802 & - & - & - & - & - & - & - \tabularnewline
46 & 1590367 & - & - & - & - & - & - & - \tabularnewline
47 & 1260647 & - & - & - & - & - & - & - \tabularnewline
48 & 1149235 & - & - & - & - & - & - & - \tabularnewline
49 & 1016367 & 1105566.3055 & 1053254.4621 & 1157878.1488 & 4e-04 & 0.0509 & 4e-04 & 0.0509 \tabularnewline
50 & 1027885 & 1142448.372 & 1070678.568 & 1214218.176 & 9e-04 & 0.9997 & 3e-04 & 0.4265 \tabularnewline
51 & 1262159 & 1367687.3349 & 1280537.9286 & 1454836.7413 & 0.0088 & 1 & 0.006 & 1 \tabularnewline
52 & 1520854 & 1530462.3324 & 1430292.055 & 1630632.6098 & 0.4254 & 1 & 0.0651 & 1 \tabularnewline
53 & 1544144 & 1628013.6069 & 1516326.5285 & 1739700.6854 & 0.0705 & 0.97 & 0.0692 & 1 \tabularnewline
54 & 1564709 & 1648997.2341 & 1526875.2593 & 1771119.2089 & 0.0881 & 0.9538 & 0.1214 & 1 \tabularnewline
55 & 1821776 & 1894654.4981 & 1762921.5356 & 2026387.4606 & 0.1391 & 1 & 0.2058 & 1 \tabularnewline
56 & 1741365 & 1779068.0124 & 1638379.123 & 1919756.9018 & 0.2997 & 0.2759 & 0.278 & 1 \tabularnewline
57 & 1623386 & 1731933.2631 & 1582825.387 & 1881041.1393 & 0.0768 & 0.4507 & 0.3669 & 1 \tabularnewline
58 & 1498658 & 1570245.7442 & 1413169.5906 & 1727321.8979 & 0.1859 & 0.2536 & 0.4009 & 1 \tabularnewline
59 & 1241822 & 1291945.3269 & 1127285.446 & 1456605.2079 & 0.2754 & 0.0069 & 0.6453 & 0.9553 \tabularnewline
60 & 1136029 & 1175211.5824 & 1003305.6646 & 1347117.5001 & 0.3275 & 0.2238 & 0.6165 & 0.6165 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112739&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]1262973[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]1195650[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]1269530[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]1479279[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]1607819[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]1712466[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]1721766[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]1949843[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]1821326[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]1757802[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]1590367[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]1260647[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]1149235[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1016367[/C][C]1105566.3055[/C][C]1053254.4621[/C][C]1157878.1488[/C][C]4e-04[/C][C]0.0509[/C][C]4e-04[/C][C]0.0509[/C][/ROW]
[ROW][C]50[/C][C]1027885[/C][C]1142448.372[/C][C]1070678.568[/C][C]1214218.176[/C][C]9e-04[/C][C]0.9997[/C][C]3e-04[/C][C]0.4265[/C][/ROW]
[ROW][C]51[/C][C]1262159[/C][C]1367687.3349[/C][C]1280537.9286[/C][C]1454836.7413[/C][C]0.0088[/C][C]1[/C][C]0.006[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]1520854[/C][C]1530462.3324[/C][C]1430292.055[/C][C]1630632.6098[/C][C]0.4254[/C][C]1[/C][C]0.0651[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]1544144[/C][C]1628013.6069[/C][C]1516326.5285[/C][C]1739700.6854[/C][C]0.0705[/C][C]0.97[/C][C]0.0692[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]1564709[/C][C]1648997.2341[/C][C]1526875.2593[/C][C]1771119.2089[/C][C]0.0881[/C][C]0.9538[/C][C]0.1214[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]1821776[/C][C]1894654.4981[/C][C]1762921.5356[/C][C]2026387.4606[/C][C]0.1391[/C][C]1[/C][C]0.2058[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]1741365[/C][C]1779068.0124[/C][C]1638379.123[/C][C]1919756.9018[/C][C]0.2997[/C][C]0.2759[/C][C]0.278[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]1623386[/C][C]1731933.2631[/C][C]1582825.387[/C][C]1881041.1393[/C][C]0.0768[/C][C]0.4507[/C][C]0.3669[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]1498658[/C][C]1570245.7442[/C][C]1413169.5906[/C][C]1727321.8979[/C][C]0.1859[/C][C]0.2536[/C][C]0.4009[/C][C]1[/C][/ROW]
[ROW][C]59[/C][C]1241822[/C][C]1291945.3269[/C][C]1127285.446[/C][C]1456605.2079[/C][C]0.2754[/C][C]0.0069[/C][C]0.6453[/C][C]0.9553[/C][/ROW]
[ROW][C]60[/C][C]1136029[/C][C]1175211.5824[/C][C]1003305.6646[/C][C]1347117.5001[/C][C]0.3275[/C][C]0.2238[/C][C]0.6165[/C][C]0.6165[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112739&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112739&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])
361262973-------
371195650-------
381269530-------
391479279-------
401607819-------
411712466-------
421721766-------
431949843-------
441821326-------
451757802-------
461590367-------
471260647-------
481149235-------
4910163671105566.30551053254.46211157878.14884e-040.05094e-040.0509
5010278851142448.3721070678.5681214218.1769e-040.99973e-040.4265
5112621591367687.33491280537.92861454836.74130.008810.0061
5215208541530462.33241430292.0551630632.60980.425410.06511
5315441441628013.60691516326.52851739700.68540.07050.970.06921
5415647091648997.23411526875.25931771119.20890.08810.95380.12141
5518217761894654.49811762921.53562026387.46060.139110.20581
5617413651779068.01241638379.1231919756.90180.29970.27590.2781
5716233861731933.26311582825.3871881041.13930.07680.45070.36691
5814986581570245.74421413169.59061727321.89790.18590.25360.40091
5912418221291945.32691127285.4461456605.20790.27540.00690.64530.9553
6011360291175211.58241003305.66461347117.50010.32750.22380.61650.6165







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0241-0.080707956516095.455800
500.0321-0.10030.090513124766197.967710540641146.7118102667.6246
510.0325-0.07720.08611136229476.572110739170589.9985103629.9696
520.0334-0.00630.066192320051.8068077457955.450489874.6792
530.035-0.05150.06327034110968.11067868788557.982588706.1923
540.0378-0.05110.06127104506407.22877741408199.523587985.2726
550.0355-0.03850.05795311275483.72747394246382.981285989.8039
560.0403-0.02120.05331421517144.05836647655228.115881533.1542
570.0439-0.06270.054411782508329.92577218194461.650384959.958
580.051-0.04560.05355124805120.08317008855527.493683718.9078
590.065-0.03880.05222512347902.62846600082107.051381240.8894
600.0746-0.03330.05061535274762.14196178014828.308878600.3488

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0241 & -0.0807 & 0 & 7956516095.4558 & 0 & 0 \tabularnewline
50 & 0.0321 & -0.1003 & 0.0905 & 13124766197.9677 & 10540641146.7118 & 102667.6246 \tabularnewline
51 & 0.0325 & -0.0772 & 0.086 & 11136229476.5721 & 10739170589.9985 & 103629.9696 \tabularnewline
52 & 0.0334 & -0.0063 & 0.0661 & 92320051.806 & 8077457955.4504 & 89874.6792 \tabularnewline
53 & 0.035 & -0.0515 & 0.0632 & 7034110968.1106 & 7868788557.9825 & 88706.1923 \tabularnewline
54 & 0.0378 & -0.0511 & 0.0612 & 7104506407.2287 & 7741408199.5235 & 87985.2726 \tabularnewline
55 & 0.0355 & -0.0385 & 0.0579 & 5311275483.7274 & 7394246382.9812 & 85989.8039 \tabularnewline
56 & 0.0403 & -0.0212 & 0.0533 & 1421517144.0583 & 6647655228.1158 & 81533.1542 \tabularnewline
57 & 0.0439 & -0.0627 & 0.0544 & 11782508329.9257 & 7218194461.6503 & 84959.958 \tabularnewline
58 & 0.051 & -0.0456 & 0.0535 & 5124805120.0831 & 7008855527.4936 & 83718.9078 \tabularnewline
59 & 0.065 & -0.0388 & 0.0522 & 2512347902.6284 & 6600082107.0513 & 81240.8894 \tabularnewline
60 & 0.0746 & -0.0333 & 0.0506 & 1535274762.1419 & 6178014828.3088 & 78600.3488 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112739&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.0241[/C][C]-0.0807[/C][C]0[/C][C]7956516095.4558[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0321[/C][C]-0.1003[/C][C]0.0905[/C][C]13124766197.9677[/C][C]10540641146.7118[/C][C]102667.6246[/C][/ROW]
[ROW][C]51[/C][C]0.0325[/C][C]-0.0772[/C][C]0.086[/C][C]11136229476.5721[/C][C]10739170589.9985[/C][C]103629.9696[/C][/ROW]
[ROW][C]52[/C][C]0.0334[/C][C]-0.0063[/C][C]0.0661[/C][C]92320051.806[/C][C]8077457955.4504[/C][C]89874.6792[/C][/ROW]
[ROW][C]53[/C][C]0.035[/C][C]-0.0515[/C][C]0.0632[/C][C]7034110968.1106[/C][C]7868788557.9825[/C][C]88706.1923[/C][/ROW]
[ROW][C]54[/C][C]0.0378[/C][C]-0.0511[/C][C]0.0612[/C][C]7104506407.2287[/C][C]7741408199.5235[/C][C]87985.2726[/C][/ROW]
[ROW][C]55[/C][C]0.0355[/C][C]-0.0385[/C][C]0.0579[/C][C]5311275483.7274[/C][C]7394246382.9812[/C][C]85989.8039[/C][/ROW]
[ROW][C]56[/C][C]0.0403[/C][C]-0.0212[/C][C]0.0533[/C][C]1421517144.0583[/C][C]6647655228.1158[/C][C]81533.1542[/C][/ROW]
[ROW][C]57[/C][C]0.0439[/C][C]-0.0627[/C][C]0.0544[/C][C]11782508329.9257[/C][C]7218194461.6503[/C][C]84959.958[/C][/ROW]
[ROW][C]58[/C][C]0.051[/C][C]-0.0456[/C][C]0.0535[/C][C]5124805120.0831[/C][C]7008855527.4936[/C][C]83718.9078[/C][/ROW]
[ROW][C]59[/C][C]0.065[/C][C]-0.0388[/C][C]0.0522[/C][C]2512347902.6284[/C][C]6600082107.0513[/C][C]81240.8894[/C][/ROW]
[ROW][C]60[/C][C]0.0746[/C][C]-0.0333[/C][C]0.0506[/C][C]1535274762.1419[/C][C]6178014828.3088[/C][C]78600.3488[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112739&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112739&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.0241-0.080707956516095.455800
500.0321-0.10030.090513124766197.967710540641146.7118102667.6246
510.0325-0.07720.08611136229476.572110739170589.9985103629.9696
520.0334-0.00630.066192320051.8068077457955.450489874.6792
530.035-0.05150.06327034110968.11067868788557.982588706.1923
540.0378-0.05110.06127104506407.22877741408199.523587985.2726
550.0355-0.03850.05795311275483.72747394246382.981285989.8039
560.0403-0.02120.05331421517144.05836647655228.115881533.1542
570.0439-0.06270.054411782508329.92577218194461.650384959.958
580.051-0.04560.05355124805120.08317008855527.493683718.9078
590.065-0.03880.05222512347902.62846600082107.051381240.8894
600.0746-0.03330.05061535274762.14196178014828.308878600.3488



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