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 computationTue, 21 Dec 2010 20:48:19 +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/21/t1292964380r1ryjol9krpuxh0.htm/, Retrieved Sun, 19 May 2024 21:16:35 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113970, Retrieved Sun, 19 May 2024 21:16:35 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact108
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]
-    D      [ARIMA Forecasting] [Forecasting ARIMA] [2010-12-07 22:34:52] [608064602fec1c42028cf50c6f981c88]
-   P         [ARIMA Forecasting] [Forecasting ARIMA...] [2010-12-07 22:38:21] [608064602fec1c42028cf50c6f981c88]
-   PD            [ARIMA Forecasting] [Forecasting ARIMA...] [2010-12-21 20:48:19] [8bf9de033bd61652831a8b7489bc3566] [Current]
Feedback Forum

Post a new message
Dataseries X:
8.1
9.9
11.5
23.4
25.4
27.9
26.1
18.8
14.1
11.5
15.8
12.4
4.5
-2.2
-4.2
-9.4
-14.5
-17.9
-15.1
-15.2
-15.7
-18
-18.1
-13.5
-9.9
-4.8
-1.7
-0.1
2.2
10.2
7.6
10.8
3.8
11
10.8
20.1
14.9
13
10.9
9.6
4
-1.1
-7.7
-8.9
-8
-7.1
-5.3
-2.5
-2.4
-2.9
-4.8
-7.2
1.7
2.2
13.4
12.3
13.7
4.4
-2.5




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113970&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'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[47])
3510.8-------
3620.1-------
3714.9-------
3813-------
3910.9-------
409.6-------
414-------
42-1.1-------
43-7.7-------
44-8.9-------
45-8-------
46-7.1-------
47-5.3-------
48-2.5-14.6371-27.0253-2.24880.02740.069800.0698
49-2.4-14.7468-27.1351-2.35860.02540.026300.0675
50-2.9-14.8513-27.2395-2.46310.02930.024400.0654
51-4.8-12.5029-24.8911-0.11460.11150.06431e-040.1272
52-7.2-14.6831-27.0713-2.29480.11820.0591e-040.0688
531.7-13.2291-25.6174-0.84090.00910.17010.00320.1048
542.2-5.8922-18.28046.49610.10020.11480.22420.4627
5513.4-1.1488-13.537111.23940.01070.29810.850.7443
5612.32.2779-10.110314.66620.05640.03920.96150.8847
5713.7-4.6407-17.02897.74760.00190.00370.70250.5415
584.4-1.1731-13.561311.21520.1890.00930.82580.7431
59-2.5-2.6657-15.05399.72250.48950.13180.66160.6616

\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[47]) \tabularnewline
35 & 10.8 & - & - & - & - & - & - & - \tabularnewline
36 & 20.1 & - & - & - & - & - & - & - \tabularnewline
37 & 14.9 & - & - & - & - & - & - & - \tabularnewline
38 & 13 & - & - & - & - & - & - & - \tabularnewline
39 & 10.9 & - & - & - & - & - & - & - \tabularnewline
40 & 9.6 & - & - & - & - & - & - & - \tabularnewline
41 & 4 & - & - & - & - & - & - & - \tabularnewline
42 & -1.1 & - & - & - & - & - & - & - \tabularnewline
43 & -7.7 & - & - & - & - & - & - & - \tabularnewline
44 & -8.9 & - & - & - & - & - & - & - \tabularnewline
45 & -8 & - & - & - & - & - & - & - \tabularnewline
46 & -7.1 & - & - & - & - & - & - & - \tabularnewline
47 & -5.3 & - & - & - & - & - & - & - \tabularnewline
48 & -2.5 & -14.6371 & -27.0253 & -2.2488 & 0.0274 & 0.0698 & 0 & 0.0698 \tabularnewline
49 & -2.4 & -14.7468 & -27.1351 & -2.3586 & 0.0254 & 0.0263 & 0 & 0.0675 \tabularnewline
50 & -2.9 & -14.8513 & -27.2395 & -2.4631 & 0.0293 & 0.0244 & 0 & 0.0654 \tabularnewline
51 & -4.8 & -12.5029 & -24.8911 & -0.1146 & 0.1115 & 0.0643 & 1e-04 & 0.1272 \tabularnewline
52 & -7.2 & -14.6831 & -27.0713 & -2.2948 & 0.1182 & 0.059 & 1e-04 & 0.0688 \tabularnewline
53 & 1.7 & -13.2291 & -25.6174 & -0.8409 & 0.0091 & 0.1701 & 0.0032 & 0.1048 \tabularnewline
54 & 2.2 & -5.8922 & -18.2804 & 6.4961 & 0.1002 & 0.1148 & 0.2242 & 0.4627 \tabularnewline
55 & 13.4 & -1.1488 & -13.5371 & 11.2394 & 0.0107 & 0.2981 & 0.85 & 0.7443 \tabularnewline
56 & 12.3 & 2.2779 & -10.1103 & 14.6662 & 0.0564 & 0.0392 & 0.9615 & 0.8847 \tabularnewline
57 & 13.7 & -4.6407 & -17.0289 & 7.7476 & 0.0019 & 0.0037 & 0.7025 & 0.5415 \tabularnewline
58 & 4.4 & -1.1731 & -13.5613 & 11.2152 & 0.189 & 0.0093 & 0.8258 & 0.7431 \tabularnewline
59 & -2.5 & -2.6657 & -15.0539 & 9.7225 & 0.4895 & 0.1318 & 0.6616 & 0.6616 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113970&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[47])[/C][/ROW]
[ROW][C]35[/C][C]10.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]20.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]14.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]10.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]9.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]-1.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]-7.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]-8.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]-8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]-7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]-5.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]-2.5[/C][C]-14.6371[/C][C]-27.0253[/C][C]-2.2488[/C][C]0.0274[/C][C]0.0698[/C][C]0[/C][C]0.0698[/C][/ROW]
[ROW][C]49[/C][C]-2.4[/C][C]-14.7468[/C][C]-27.1351[/C][C]-2.3586[/C][C]0.0254[/C][C]0.0263[/C][C]0[/C][C]0.0675[/C][/ROW]
[ROW][C]50[/C][C]-2.9[/C][C]-14.8513[/C][C]-27.2395[/C][C]-2.4631[/C][C]0.0293[/C][C]0.0244[/C][C]0[/C][C]0.0654[/C][/ROW]
[ROW][C]51[/C][C]-4.8[/C][C]-12.5029[/C][C]-24.8911[/C][C]-0.1146[/C][C]0.1115[/C][C]0.0643[/C][C]1e-04[/C][C]0.1272[/C][/ROW]
[ROW][C]52[/C][C]-7.2[/C][C]-14.6831[/C][C]-27.0713[/C][C]-2.2948[/C][C]0.1182[/C][C]0.059[/C][C]1e-04[/C][C]0.0688[/C][/ROW]
[ROW][C]53[/C][C]1.7[/C][C]-13.2291[/C][C]-25.6174[/C][C]-0.8409[/C][C]0.0091[/C][C]0.1701[/C][C]0.0032[/C][C]0.1048[/C][/ROW]
[ROW][C]54[/C][C]2.2[/C][C]-5.8922[/C][C]-18.2804[/C][C]6.4961[/C][C]0.1002[/C][C]0.1148[/C][C]0.2242[/C][C]0.4627[/C][/ROW]
[ROW][C]55[/C][C]13.4[/C][C]-1.1488[/C][C]-13.5371[/C][C]11.2394[/C][C]0.0107[/C][C]0.2981[/C][C]0.85[/C][C]0.7443[/C][/ROW]
[ROW][C]56[/C][C]12.3[/C][C]2.2779[/C][C]-10.1103[/C][C]14.6662[/C][C]0.0564[/C][C]0.0392[/C][C]0.9615[/C][C]0.8847[/C][/ROW]
[ROW][C]57[/C][C]13.7[/C][C]-4.6407[/C][C]-17.0289[/C][C]7.7476[/C][C]0.0019[/C][C]0.0037[/C][C]0.7025[/C][C]0.5415[/C][/ROW]
[ROW][C]58[/C][C]4.4[/C][C]-1.1731[/C][C]-13.5613[/C][C]11.2152[/C][C]0.189[/C][C]0.0093[/C][C]0.8258[/C][C]0.7431[/C][/ROW]
[ROW][C]59[/C][C]-2.5[/C][C]-2.6657[/C][C]-15.0539[/C][C]9.7225[/C][C]0.4895[/C][C]0.1318[/C][C]0.6616[/C][C]0.6616[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113970&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113970&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[47])
3510.8-------
3620.1-------
3714.9-------
3813-------
3910.9-------
409.6-------
414-------
42-1.1-------
43-7.7-------
44-8.9-------
45-8-------
46-7.1-------
47-5.3-------
48-2.5-14.6371-27.0253-2.24880.02740.069800.0698
49-2.4-14.7468-27.1351-2.35860.02540.026300.0675
50-2.9-14.8513-27.2395-2.46310.02930.024400.0654
51-4.8-12.5029-24.8911-0.11460.11150.06431e-040.1272
52-7.2-14.6831-27.0713-2.29480.11820.0591e-040.0688
531.7-13.2291-25.6174-0.84090.00910.17010.00320.1048
542.2-5.8922-18.28046.49610.10020.11480.22420.4627
5513.4-1.1488-13.537111.23940.01070.29810.850.7443
5612.32.2779-10.110314.66620.05640.03920.96150.8847
5713.7-4.6407-17.02897.74760.00190.00370.70250.5415
584.4-1.1731-13.561311.21520.1890.00930.82580.7431
59-2.5-2.6657-15.05399.72250.48950.13180.66160.6616







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
48-0.4318-0.82920147.308200
49-0.4286-0.83730.8332152.444149.876112.2424
50-0.4256-0.80470.8237142.8335147.528612.1461
51-0.5055-0.61610.771859.3342125.4811.2018
52-0.4305-0.50960.719455.9964111.583310.5633
53-0.4778-1.12850.7876222.8792130.132611.4076
54-1.0727-1.37340.871365.4829120.896910.9953
55-5.5017-12.6642.3453211.6686132.243411.4997
562.77474.39962.5736100.4415128.709911.345
57-1.362-3.95222.7115336.3805149.476912.2261
58-5.3879-4.75082.896831.0593138.711711.7776
59-2.3711-0.06222.66060.0275127.154711.2763

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
48 & -0.4318 & -0.8292 & 0 & 147.3082 & 0 & 0 \tabularnewline
49 & -0.4286 & -0.8373 & 0.8332 & 152.444 & 149.8761 & 12.2424 \tabularnewline
50 & -0.4256 & -0.8047 & 0.8237 & 142.8335 & 147.5286 & 12.1461 \tabularnewline
51 & -0.5055 & -0.6161 & 0.7718 & 59.3342 & 125.48 & 11.2018 \tabularnewline
52 & -0.4305 & -0.5096 & 0.7194 & 55.9964 & 111.5833 & 10.5633 \tabularnewline
53 & -0.4778 & -1.1285 & 0.7876 & 222.8792 & 130.1326 & 11.4076 \tabularnewline
54 & -1.0727 & -1.3734 & 0.8713 & 65.4829 & 120.8969 & 10.9953 \tabularnewline
55 & -5.5017 & -12.664 & 2.3453 & 211.6686 & 132.2434 & 11.4997 \tabularnewline
56 & 2.7747 & 4.3996 & 2.5736 & 100.4415 & 128.7099 & 11.345 \tabularnewline
57 & -1.362 & -3.9522 & 2.7115 & 336.3805 & 149.4769 & 12.2261 \tabularnewline
58 & -5.3879 & -4.7508 & 2.8968 & 31.0593 & 138.7117 & 11.7776 \tabularnewline
59 & -2.3711 & -0.0622 & 2.6606 & 0.0275 & 127.1547 & 11.2763 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113970&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]48[/C][C]-0.4318[/C][C]-0.8292[/C][C]0[/C][C]147.3082[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]49[/C][C]-0.4286[/C][C]-0.8373[/C][C]0.8332[/C][C]152.444[/C][C]149.8761[/C][C]12.2424[/C][/ROW]
[ROW][C]50[/C][C]-0.4256[/C][C]-0.8047[/C][C]0.8237[/C][C]142.8335[/C][C]147.5286[/C][C]12.1461[/C][/ROW]
[ROW][C]51[/C][C]-0.5055[/C][C]-0.6161[/C][C]0.7718[/C][C]59.3342[/C][C]125.48[/C][C]11.2018[/C][/ROW]
[ROW][C]52[/C][C]-0.4305[/C][C]-0.5096[/C][C]0.7194[/C][C]55.9964[/C][C]111.5833[/C][C]10.5633[/C][/ROW]
[ROW][C]53[/C][C]-0.4778[/C][C]-1.1285[/C][C]0.7876[/C][C]222.8792[/C][C]130.1326[/C][C]11.4076[/C][/ROW]
[ROW][C]54[/C][C]-1.0727[/C][C]-1.3734[/C][C]0.8713[/C][C]65.4829[/C][C]120.8969[/C][C]10.9953[/C][/ROW]
[ROW][C]55[/C][C]-5.5017[/C][C]-12.664[/C][C]2.3453[/C][C]211.6686[/C][C]132.2434[/C][C]11.4997[/C][/ROW]
[ROW][C]56[/C][C]2.7747[/C][C]4.3996[/C][C]2.5736[/C][C]100.4415[/C][C]128.7099[/C][C]11.345[/C][/ROW]
[ROW][C]57[/C][C]-1.362[/C][C]-3.9522[/C][C]2.7115[/C][C]336.3805[/C][C]149.4769[/C][C]12.2261[/C][/ROW]
[ROW][C]58[/C][C]-5.3879[/C][C]-4.7508[/C][C]2.8968[/C][C]31.0593[/C][C]138.7117[/C][C]11.7776[/C][/ROW]
[ROW][C]59[/C][C]-2.3711[/C][C]-0.0622[/C][C]2.6606[/C][C]0.0275[/C][C]127.1547[/C][C]11.2763[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113970&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113970&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
48-0.4318-0.82920147.308200
49-0.4286-0.83730.8332152.444149.876112.2424
50-0.4256-0.80470.8237142.8335147.528612.1461
51-0.5055-0.61610.771859.3342125.4811.2018
52-0.4305-0.50960.719455.9964111.583310.5633
53-0.4778-1.12850.7876222.8792130.132611.4076
54-1.0727-1.37340.871365.4829120.896910.9953
55-5.5017-12.6642.3453211.6686132.243411.4997
562.77474.39962.5736100.4415128.709911.345
57-1.362-3.95222.7115336.3805149.476912.2261
58-5.3879-4.75082.896831.0593138.711711.7776
59-2.3711-0.06222.66060.0275127.154711.2763



Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; 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')