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, 15 Dec 2009 13:49:36 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2009/Dec/15/t1260910313odh6vzogc2pdjdv.htm/, Retrieved Wed, 08 May 2024 13:50:01 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=68143, Retrieved Wed, 08 May 2024 13:50:01 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact126
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Paper - Arima For...] [2008-12-14 14:14:00] [7a664918911e34206ce9d0436dd7c1c8]
-   P   [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-15 14:52:51] [12d343c4448a5f9e527bb31caeac580b]
-  MPD      [ARIMA Forecasting] [univariate arima ...] [2009-12-15 20:49:36] [244731fa3e7e6c85774b8c0902c58f85] [Current]
-   PD        [ARIMA Forecasting] [arima] [2009-12-24 18:21:27] [ba905ddf7cdf9ecb063c35348c4dab2e]
Feedback Forum

Post a new message
Dataseries X:
2058,00
2160,00
2260,00
2498,00
2695,00
2799,00
2947,00
2930,00
2318,00
2540,00
2570,00
2669,00
2450,00
2842,00
3440,00
2678,00
2981,00
2260,00
2844,00
2546,00
2456,00
2295,00
2379,00
2479,00
2057,00
2280,00
2351,00
2276,00
2548,00
2311,00
2201,00
2725,00
2408,00
2139,00
1898,00
2537,00
2069,00
2063,00
2526,00
2440,00
2191,00
2797,00
2074,00
2628,00
2287,00
2146,00
2430,00
2141,00
1827,00
2082,00
1788,00
1743,00
2245,00
1963,00
1828,00
2527,00
2114,00
2424,00




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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68143&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' @ 72.249.127.135







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[46])
342139-------
351898-------
362537-------
372069-------
382063-------
392526-------
402440-------
412191-------
422797-------
432074-------
442628-------
452287-------
462146-------
4724302133.01411824.56172640.11640.12550.480.81820.48
4821412418.69312002.0123201.32980.24340.48870.38350.7527
4918272085.67771781.84852587.58090.15620.41450.5260.4069
5020822224.19321858.97222882.72240.33610.88140.68430.592
5117882490.07352011.42213492.97080.0850.78740.4720.7493
5217432407.30461958.77393315.93680.07590.90920.47190.7135
5322452472.12721992.21753488.92880.33080.92010.70610.7352
5419632478.91521993.81133516.27530.16480.67070.27390.7353
5518282347.25631917.49293202.39480.1170.81080.73440.6777
5625272646.16082081.02223999.22170.43150.8820.51050.7656
5721142329.67031905.70423168.17180.30710.32230.53970.6662
5824242218.08411839.3522923.86680.28370.61370.57930.5793

\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[46]) \tabularnewline
34 & 2139 & - & - & - & - & - & - & - \tabularnewline
35 & 1898 & - & - & - & - & - & - & - \tabularnewline
36 & 2537 & - & - & - & - & - & - & - \tabularnewline
37 & 2069 & - & - & - & - & - & - & - \tabularnewline
38 & 2063 & - & - & - & - & - & - & - \tabularnewline
39 & 2526 & - & - & - & - & - & - & - \tabularnewline
40 & 2440 & - & - & - & - & - & - & - \tabularnewline
41 & 2191 & - & - & - & - & - & - & - \tabularnewline
42 & 2797 & - & - & - & - & - & - & - \tabularnewline
43 & 2074 & - & - & - & - & - & - & - \tabularnewline
44 & 2628 & - & - & - & - & - & - & - \tabularnewline
45 & 2287 & - & - & - & - & - & - & - \tabularnewline
46 & 2146 & - & - & - & - & - & - & - \tabularnewline
47 & 2430 & 2133.0141 & 1824.5617 & 2640.1164 & 0.1255 & 0.48 & 0.8182 & 0.48 \tabularnewline
48 & 2141 & 2418.6931 & 2002.012 & 3201.3298 & 0.2434 & 0.4887 & 0.3835 & 0.7527 \tabularnewline
49 & 1827 & 2085.6777 & 1781.8485 & 2587.5809 & 0.1562 & 0.4145 & 0.526 & 0.4069 \tabularnewline
50 & 2082 & 2224.1932 & 1858.9722 & 2882.7224 & 0.3361 & 0.8814 & 0.6843 & 0.592 \tabularnewline
51 & 1788 & 2490.0735 & 2011.4221 & 3492.9708 & 0.085 & 0.7874 & 0.472 & 0.7493 \tabularnewline
52 & 1743 & 2407.3046 & 1958.7739 & 3315.9368 & 0.0759 & 0.9092 & 0.4719 & 0.7135 \tabularnewline
53 & 2245 & 2472.1272 & 1992.2175 & 3488.9288 & 0.3308 & 0.9201 & 0.7061 & 0.7352 \tabularnewline
54 & 1963 & 2478.9152 & 1993.8113 & 3516.2753 & 0.1648 & 0.6707 & 0.2739 & 0.7353 \tabularnewline
55 & 1828 & 2347.2563 & 1917.4929 & 3202.3948 & 0.117 & 0.8108 & 0.7344 & 0.6777 \tabularnewline
56 & 2527 & 2646.1608 & 2081.0222 & 3999.2217 & 0.4315 & 0.882 & 0.5105 & 0.7656 \tabularnewline
57 & 2114 & 2329.6703 & 1905.7042 & 3168.1718 & 0.3071 & 0.3223 & 0.5397 & 0.6662 \tabularnewline
58 & 2424 & 2218.0841 & 1839.352 & 2923.8668 & 0.2837 & 0.6137 & 0.5793 & 0.5793 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68143&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[46])[/C][/ROW]
[ROW][C]34[/C][C]2139[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]1898[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]2537[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]2069[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]2063[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]2526[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]2440[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]2191[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]2797[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]2074[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]2628[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]2287[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]2146[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]2430[/C][C]2133.0141[/C][C]1824.5617[/C][C]2640.1164[/C][C]0.1255[/C][C]0.48[/C][C]0.8182[/C][C]0.48[/C][/ROW]
[ROW][C]48[/C][C]2141[/C][C]2418.6931[/C][C]2002.012[/C][C]3201.3298[/C][C]0.2434[/C][C]0.4887[/C][C]0.3835[/C][C]0.7527[/C][/ROW]
[ROW][C]49[/C][C]1827[/C][C]2085.6777[/C][C]1781.8485[/C][C]2587.5809[/C][C]0.1562[/C][C]0.4145[/C][C]0.526[/C][C]0.4069[/C][/ROW]
[ROW][C]50[/C][C]2082[/C][C]2224.1932[/C][C]1858.9722[/C][C]2882.7224[/C][C]0.3361[/C][C]0.8814[/C][C]0.6843[/C][C]0.592[/C][/ROW]
[ROW][C]51[/C][C]1788[/C][C]2490.0735[/C][C]2011.4221[/C][C]3492.9708[/C][C]0.085[/C][C]0.7874[/C][C]0.472[/C][C]0.7493[/C][/ROW]
[ROW][C]52[/C][C]1743[/C][C]2407.3046[/C][C]1958.7739[/C][C]3315.9368[/C][C]0.0759[/C][C]0.9092[/C][C]0.4719[/C][C]0.7135[/C][/ROW]
[ROW][C]53[/C][C]2245[/C][C]2472.1272[/C][C]1992.2175[/C][C]3488.9288[/C][C]0.3308[/C][C]0.9201[/C][C]0.7061[/C][C]0.7352[/C][/ROW]
[ROW][C]54[/C][C]1963[/C][C]2478.9152[/C][C]1993.8113[/C][C]3516.2753[/C][C]0.1648[/C][C]0.6707[/C][C]0.2739[/C][C]0.7353[/C][/ROW]
[ROW][C]55[/C][C]1828[/C][C]2347.2563[/C][C]1917.4929[/C][C]3202.3948[/C][C]0.117[/C][C]0.8108[/C][C]0.7344[/C][C]0.6777[/C][/ROW]
[ROW][C]56[/C][C]2527[/C][C]2646.1608[/C][C]2081.0222[/C][C]3999.2217[/C][C]0.4315[/C][C]0.882[/C][C]0.5105[/C][C]0.7656[/C][/ROW]
[ROW][C]57[/C][C]2114[/C][C]2329.6703[/C][C]1905.7042[/C][C]3168.1718[/C][C]0.3071[/C][C]0.3223[/C][C]0.5397[/C][C]0.6662[/C][/ROW]
[ROW][C]58[/C][C]2424[/C][C]2218.0841[/C][C]1839.352[/C][C]2923.8668[/C][C]0.2837[/C][C]0.6137[/C][C]0.5793[/C][C]0.5793[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68143&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68143&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[46])
342139-------
351898-------
362537-------
372069-------
382063-------
392526-------
402440-------
412191-------
422797-------
432074-------
442628-------
452287-------
462146-------
4724302133.01411824.56172640.11640.12550.480.81820.48
4821412418.69312002.0123201.32980.24340.48870.38350.7527
4918272085.67771781.84852587.58090.15620.41450.5260.4069
5020822224.19321858.97222882.72240.33610.88140.68430.592
5117882490.07352011.42213492.97080.0850.78740.4720.7493
5217432407.30461958.77393315.93680.07590.90920.47190.7135
5322452472.12721992.21753488.92880.33080.92010.70610.7352
5419632478.91521993.81133516.27530.16480.67070.27390.7353
5518282347.25631917.49293202.39480.1170.81080.73440.6777
5625272646.16082081.02223999.22170.43150.8820.51050.7656
5721142329.67031905.70423168.17180.30710.32230.53970.6662
5824242218.08411839.3522923.86680.28370.61370.57930.5793







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
470.12130.13920.011688200.6147350.051285.7324
480.1651-0.11480.009677113.48556426.123880.1631
490.1228-0.1240.010366914.13615576.17874.6738
500.1511-0.06390.005320218.90181684.908541.0476
510.2055-0.28190.0235492907.252241075.6043202.6712
520.1926-0.2760.023441300.559336775.0466191.7682
530.2099-0.09190.007751586.7494298.895765.566
540.2135-0.20810.0173266168.471622180.706148.9319
550.1859-0.22120.0184269627.067522468.9223149.8964
560.2609-0.0450.003814199.29131183.274334.3988
570.1836-0.09260.007746513.69713876.141462.2587
580.16230.09280.007742401.36453533.44759.4428

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
47 & 0.1213 & 0.1392 & 0.0116 & 88200.614 & 7350.0512 & 85.7324 \tabularnewline
48 & 0.1651 & -0.1148 & 0.0096 & 77113.4855 & 6426.1238 & 80.1631 \tabularnewline
49 & 0.1228 & -0.124 & 0.0103 & 66914.1361 & 5576.178 & 74.6738 \tabularnewline
50 & 0.1511 & -0.0639 & 0.0053 & 20218.9018 & 1684.9085 & 41.0476 \tabularnewline
51 & 0.2055 & -0.2819 & 0.0235 & 492907.2522 & 41075.6043 & 202.6712 \tabularnewline
52 & 0.1926 & -0.276 & 0.023 & 441300.5593 & 36775.0466 & 191.7682 \tabularnewline
53 & 0.2099 & -0.0919 & 0.0077 & 51586.749 & 4298.8957 & 65.566 \tabularnewline
54 & 0.2135 & -0.2081 & 0.0173 & 266168.4716 & 22180.706 & 148.9319 \tabularnewline
55 & 0.1859 & -0.2212 & 0.0184 & 269627.0675 & 22468.9223 & 149.8964 \tabularnewline
56 & 0.2609 & -0.045 & 0.0038 & 14199.2913 & 1183.2743 & 34.3988 \tabularnewline
57 & 0.1836 & -0.0926 & 0.0077 & 46513.6971 & 3876.1414 & 62.2587 \tabularnewline
58 & 0.1623 & 0.0928 & 0.0077 & 42401.3645 & 3533.447 & 59.4428 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68143&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]47[/C][C]0.1213[/C][C]0.1392[/C][C]0.0116[/C][C]88200.614[/C][C]7350.0512[/C][C]85.7324[/C][/ROW]
[ROW][C]48[/C][C]0.1651[/C][C]-0.1148[/C][C]0.0096[/C][C]77113.4855[/C][C]6426.1238[/C][C]80.1631[/C][/ROW]
[ROW][C]49[/C][C]0.1228[/C][C]-0.124[/C][C]0.0103[/C][C]66914.1361[/C][C]5576.178[/C][C]74.6738[/C][/ROW]
[ROW][C]50[/C][C]0.1511[/C][C]-0.0639[/C][C]0.0053[/C][C]20218.9018[/C][C]1684.9085[/C][C]41.0476[/C][/ROW]
[ROW][C]51[/C][C]0.2055[/C][C]-0.2819[/C][C]0.0235[/C][C]492907.2522[/C][C]41075.6043[/C][C]202.6712[/C][/ROW]
[ROW][C]52[/C][C]0.1926[/C][C]-0.276[/C][C]0.023[/C][C]441300.5593[/C][C]36775.0466[/C][C]191.7682[/C][/ROW]
[ROW][C]53[/C][C]0.2099[/C][C]-0.0919[/C][C]0.0077[/C][C]51586.749[/C][C]4298.8957[/C][C]65.566[/C][/ROW]
[ROW][C]54[/C][C]0.2135[/C][C]-0.2081[/C][C]0.0173[/C][C]266168.4716[/C][C]22180.706[/C][C]148.9319[/C][/ROW]
[ROW][C]55[/C][C]0.1859[/C][C]-0.2212[/C][C]0.0184[/C][C]269627.0675[/C][C]22468.9223[/C][C]149.8964[/C][/ROW]
[ROW][C]56[/C][C]0.2609[/C][C]-0.045[/C][C]0.0038[/C][C]14199.2913[/C][C]1183.2743[/C][C]34.3988[/C][/ROW]
[ROW][C]57[/C][C]0.1836[/C][C]-0.0926[/C][C]0.0077[/C][C]46513.6971[/C][C]3876.1414[/C][C]62.2587[/C][/ROW]
[ROW][C]58[/C][C]0.1623[/C][C]0.0928[/C][C]0.0077[/C][C]42401.3645[/C][C]3533.447[/C][C]59.4428[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68143&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68143&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
470.12130.13920.011688200.6147350.051285.7324
480.1651-0.11480.009677113.48556426.123880.1631
490.1228-0.1240.010366914.13615576.17874.6738
500.1511-0.06390.005320218.90181684.908541.0476
510.2055-0.28190.0235492907.252241075.6043202.6712
520.1926-0.2760.023441300.559336775.0466191.7682
530.2099-0.09190.007751586.7494298.895765.566
540.2135-0.20810.0173266168.471622180.706148.9319
550.1859-0.22120.0184269627.067522468.9223149.8964
560.2609-0.0450.003814199.29131183.274334.3988
570.1836-0.09260.007746513.69713876.141462.2587
580.16230.09280.007742401.36453533.44759.4428



Parameters (Session):
par1 = 12 ; par2 = -1.7 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = -1.7 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; 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,fx))
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')