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 computationWed, 02 Dec 2009 14:21: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/02/t1259788999hczcuxs0h9l3tch.htm/, Retrieved Sat, 27 Apr 2024 14:02:38 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=62596, Retrieved Sat, 27 Apr 2024 14:02:38 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact154
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   [ARIMA Backward Selection] [] [2009-11-27 14:53:14] [b98453cac15ba1066b407e146608df68]
-   PD    [ARIMA Backward Selection] [WS09 - Problem if...] [2009-12-02 16:23:55] [df6326eec97a6ca984a853b142930499]
-           [ARIMA Backward Selection] [WS09 - Backward A...] [2009-12-02 20:17:40] [df6326eec97a6ca984a853b142930499]
- RM            [ARIMA Forecasting] [WS10 - Voorspelling] [2009-12-02 21:21:36] [0cc924834281808eda7297686c82928f] [Current]
-    D            [ARIMA Forecasting] [CaseStatistiek - ...] [2009-12-30 23:46:48] [df6326eec97a6ca984a853b142930499]
Feedback Forum

Post a new message
Dataseries X:
423.4
404.1
500
472.6
496.1
562
434.8
538.2
577.6
518.1
625.2
561.2
523.3
536.1
607.3
637.3
606.9
652.9
617.2
670.4
729.9
677.2
710
844.3
748.2
653.9
742.6
854.2
808.4
1819
1936.5
1966.1
2083.1
1620.1
1527.6
1795
1685.1
1851.8
2164.4
1981.8
1726.5
2144.6
1758.2
1672.9
1837.3
1596.1
1446
1898.4
1964.1
1755.9
2255.3
1881.2
2117.9
1656.5
1544.1
2098.9
2133.3
1963.5
1801.2
2365.4
1936.5
1667.6
1983.5
2058.6
2448.3
1858.1
1625.4
2130.6
2515.7
2230.2
2086.9
2235
2100.2
2288.6
2490
2573.7
2543.8
2004.7
2390
2338.4
2724.5
2292.5
2386
2477.9
2337
2605.1
2560.8
2839.3
2407.2
2085.2
2735.6
2798.7
3053.2
2405
2471.9
2727.3
2790.7
2385.4
3206.6
2705.6
3518.4
1954.9
2584.3
2535.8
2685.9
2866
2236.6
2934.9
2668.6
2371.2
3165.9
2887.2
3112.2
2671.2
2432.6
2812.3
3095.7
2862.9
2607.3
2862.5




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 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 & 4 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=62596&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]4 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=62596&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=62596&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 time4 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[108])
962727.3-------
972790.7-------
982385.4-------
993206.6-------
1002705.6-------
1013518.4-------
1021954.9-------
1032584.3-------
1042535.8-------
1052685.9-------
1062866-------
1072236.6-------
1082934.9-------
1092668.62737.75482196.24863279.26110.40120.23770.4240.2377
1102371.22623.56832042.23083204.90580.19740.43970.7890.1469
1113165.93186.70732538.89163834.5230.47490.99320.4760.7769
1122887.22943.092266.08463620.09550.43570.25940.75410.5095
1133112.23455.43082751.81374159.0480.16950.94330.43040.9265
1142671.22365.74031644.40683087.07380.20330.02130.86790.061
1152432.62782.74722046.82543518.66890.17550.61680.70140.3427
1162812.32817.45692070.16693564.74680.49460.84360.770.379
1173095.73063.02452306.19713819.85190.46630.74190.83560.63
1182862.93013.05032248.1663777.93460.35020.41610.64680.5794
1192607.32667.80491895.87133439.73860.4390.31020.86320.2488
1202862.53121.98482343.77543900.19430.25670.90260.68120.6812

\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[108]) \tabularnewline
96 & 2727.3 & - & - & - & - & - & - & - \tabularnewline
97 & 2790.7 & - & - & - & - & - & - & - \tabularnewline
98 & 2385.4 & - & - & - & - & - & - & - \tabularnewline
99 & 3206.6 & - & - & - & - & - & - & - \tabularnewline
100 & 2705.6 & - & - & - & - & - & - & - \tabularnewline
101 & 3518.4 & - & - & - & - & - & - & - \tabularnewline
102 & 1954.9 & - & - & - & - & - & - & - \tabularnewline
103 & 2584.3 & - & - & - & - & - & - & - \tabularnewline
104 & 2535.8 & - & - & - & - & - & - & - \tabularnewline
105 & 2685.9 & - & - & - & - & - & - & - \tabularnewline
106 & 2866 & - & - & - & - & - & - & - \tabularnewline
107 & 2236.6 & - & - & - & - & - & - & - \tabularnewline
108 & 2934.9 & - & - & - & - & - & - & - \tabularnewline
109 & 2668.6 & 2737.7548 & 2196.2486 & 3279.2611 & 0.4012 & 0.2377 & 0.424 & 0.2377 \tabularnewline
110 & 2371.2 & 2623.5683 & 2042.2308 & 3204.9058 & 0.1974 & 0.4397 & 0.789 & 0.1469 \tabularnewline
111 & 3165.9 & 3186.7073 & 2538.8916 & 3834.523 & 0.4749 & 0.9932 & 0.476 & 0.7769 \tabularnewline
112 & 2887.2 & 2943.09 & 2266.0846 & 3620.0955 & 0.4357 & 0.2594 & 0.7541 & 0.5095 \tabularnewline
113 & 3112.2 & 3455.4308 & 2751.8137 & 4159.048 & 0.1695 & 0.9433 & 0.4304 & 0.9265 \tabularnewline
114 & 2671.2 & 2365.7403 & 1644.4068 & 3087.0738 & 0.2033 & 0.0213 & 0.8679 & 0.061 \tabularnewline
115 & 2432.6 & 2782.7472 & 2046.8254 & 3518.6689 & 0.1755 & 0.6168 & 0.7014 & 0.3427 \tabularnewline
116 & 2812.3 & 2817.4569 & 2070.1669 & 3564.7468 & 0.4946 & 0.8436 & 0.77 & 0.379 \tabularnewline
117 & 3095.7 & 3063.0245 & 2306.1971 & 3819.8519 & 0.4663 & 0.7419 & 0.8356 & 0.63 \tabularnewline
118 & 2862.9 & 3013.0503 & 2248.166 & 3777.9346 & 0.3502 & 0.4161 & 0.6468 & 0.5794 \tabularnewline
119 & 2607.3 & 2667.8049 & 1895.8713 & 3439.7386 & 0.439 & 0.3102 & 0.8632 & 0.2488 \tabularnewline
120 & 2862.5 & 3121.9848 & 2343.7754 & 3900.1943 & 0.2567 & 0.9026 & 0.6812 & 0.6812 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=62596&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[108])[/C][/ROW]
[ROW][C]96[/C][C]2727.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]2790.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]2385.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]3206.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]2705.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]3518.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]1954.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]2584.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]2535.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]2685.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]2866[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]2236.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]2934.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]2668.6[/C][C]2737.7548[/C][C]2196.2486[/C][C]3279.2611[/C][C]0.4012[/C][C]0.2377[/C][C]0.424[/C][C]0.2377[/C][/ROW]
[ROW][C]110[/C][C]2371.2[/C][C]2623.5683[/C][C]2042.2308[/C][C]3204.9058[/C][C]0.1974[/C][C]0.4397[/C][C]0.789[/C][C]0.1469[/C][/ROW]
[ROW][C]111[/C][C]3165.9[/C][C]3186.7073[/C][C]2538.8916[/C][C]3834.523[/C][C]0.4749[/C][C]0.9932[/C][C]0.476[/C][C]0.7769[/C][/ROW]
[ROW][C]112[/C][C]2887.2[/C][C]2943.09[/C][C]2266.0846[/C][C]3620.0955[/C][C]0.4357[/C][C]0.2594[/C][C]0.7541[/C][C]0.5095[/C][/ROW]
[ROW][C]113[/C][C]3112.2[/C][C]3455.4308[/C][C]2751.8137[/C][C]4159.048[/C][C]0.1695[/C][C]0.9433[/C][C]0.4304[/C][C]0.9265[/C][/ROW]
[ROW][C]114[/C][C]2671.2[/C][C]2365.7403[/C][C]1644.4068[/C][C]3087.0738[/C][C]0.2033[/C][C]0.0213[/C][C]0.8679[/C][C]0.061[/C][/ROW]
[ROW][C]115[/C][C]2432.6[/C][C]2782.7472[/C][C]2046.8254[/C][C]3518.6689[/C][C]0.1755[/C][C]0.6168[/C][C]0.7014[/C][C]0.3427[/C][/ROW]
[ROW][C]116[/C][C]2812.3[/C][C]2817.4569[/C][C]2070.1669[/C][C]3564.7468[/C][C]0.4946[/C][C]0.8436[/C][C]0.77[/C][C]0.379[/C][/ROW]
[ROW][C]117[/C][C]3095.7[/C][C]3063.0245[/C][C]2306.1971[/C][C]3819.8519[/C][C]0.4663[/C][C]0.7419[/C][C]0.8356[/C][C]0.63[/C][/ROW]
[ROW][C]118[/C][C]2862.9[/C][C]3013.0503[/C][C]2248.166[/C][C]3777.9346[/C][C]0.3502[/C][C]0.4161[/C][C]0.6468[/C][C]0.5794[/C][/ROW]
[ROW][C]119[/C][C]2607.3[/C][C]2667.8049[/C][C]1895.8713[/C][C]3439.7386[/C][C]0.439[/C][C]0.3102[/C][C]0.8632[/C][C]0.2488[/C][/ROW]
[ROW][C]120[/C][C]2862.5[/C][C]3121.9848[/C][C]2343.7754[/C][C]3900.1943[/C][C]0.2567[/C][C]0.9026[/C][C]0.6812[/C][C]0.6812[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=62596&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=62596&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[108])
962727.3-------
972790.7-------
982385.4-------
993206.6-------
1002705.6-------
1013518.4-------
1021954.9-------
1032584.3-------
1042535.8-------
1052685.9-------
1062866-------
1072236.6-------
1082934.9-------
1092668.62737.75482196.24863279.26110.40120.23770.4240.2377
1102371.22623.56832042.23083204.90580.19740.43970.7890.1469
1113165.93186.70732538.89163834.5230.47490.99320.4760.7769
1122887.22943.092266.08463620.09550.43570.25940.75410.5095
1133112.23455.43082751.81374159.0480.16950.94330.43040.9265
1142671.22365.74031644.40683087.07380.20330.02130.86790.061
1152432.62782.74722046.82543518.66890.17550.61680.70140.3427
1162812.32817.45692070.16693564.74680.49460.84360.770.379
1173095.73063.02452306.19713819.85190.46630.74190.83560.63
1182862.93013.05032248.1663777.93460.35020.41610.64680.5794
1192607.32667.80491895.87133439.73860.4390.31020.86320.2488
1202862.53121.98482343.77543900.19430.25670.90260.68120.6812







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1090.1009-0.02530.00214782.3928398.532719.9633
1100.1131-0.09620.00863689.75465307.479572.8525
1110.1037-0.00655e-04432.942536.07856.0065
1120.1174-0.0190.00163123.6944260.307916.1341
1130.1039-0.09930.0083117807.40319817.283699.0822
1140.15560.12910.010893305.62547775.468888.1786
1150.1349-0.12580.0105122603.034510216.9195101.0788
1160.1353-0.00182e-0426.59342.21611.4887
1170.12610.01079e-041067.688588.9749.4326
1180.1295-0.04980.004222545.11351878.759543.3447
1190.1476-0.02270.00193660.8444305.070417.4663
1200.1272-0.08310.006967332.36985611.030874.9068

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
109 & 0.1009 & -0.0253 & 0.0021 & 4782.3928 & 398.5327 & 19.9633 \tabularnewline
110 & 0.1131 & -0.0962 & 0.008 & 63689.7546 & 5307.4795 & 72.8525 \tabularnewline
111 & 0.1037 & -0.0065 & 5e-04 & 432.9425 & 36.0785 & 6.0065 \tabularnewline
112 & 0.1174 & -0.019 & 0.0016 & 3123.6944 & 260.3079 & 16.1341 \tabularnewline
113 & 0.1039 & -0.0993 & 0.0083 & 117807.4031 & 9817.2836 & 99.0822 \tabularnewline
114 & 0.1556 & 0.1291 & 0.0108 & 93305.6254 & 7775.4688 & 88.1786 \tabularnewline
115 & 0.1349 & -0.1258 & 0.0105 & 122603.0345 & 10216.9195 & 101.0788 \tabularnewline
116 & 0.1353 & -0.0018 & 2e-04 & 26.5934 & 2.2161 & 1.4887 \tabularnewline
117 & 0.1261 & 0.0107 & 9e-04 & 1067.6885 & 88.974 & 9.4326 \tabularnewline
118 & 0.1295 & -0.0498 & 0.0042 & 22545.1135 & 1878.7595 & 43.3447 \tabularnewline
119 & 0.1476 & -0.0227 & 0.0019 & 3660.8444 & 305.0704 & 17.4663 \tabularnewline
120 & 0.1272 & -0.0831 & 0.0069 & 67332.3698 & 5611.0308 & 74.9068 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=62596&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]109[/C][C]0.1009[/C][C]-0.0253[/C][C]0.0021[/C][C]4782.3928[/C][C]398.5327[/C][C]19.9633[/C][/ROW]
[ROW][C]110[/C][C]0.1131[/C][C]-0.0962[/C][C]0.008[/C][C]63689.7546[/C][C]5307.4795[/C][C]72.8525[/C][/ROW]
[ROW][C]111[/C][C]0.1037[/C][C]-0.0065[/C][C]5e-04[/C][C]432.9425[/C][C]36.0785[/C][C]6.0065[/C][/ROW]
[ROW][C]112[/C][C]0.1174[/C][C]-0.019[/C][C]0.0016[/C][C]3123.6944[/C][C]260.3079[/C][C]16.1341[/C][/ROW]
[ROW][C]113[/C][C]0.1039[/C][C]-0.0993[/C][C]0.0083[/C][C]117807.4031[/C][C]9817.2836[/C][C]99.0822[/C][/ROW]
[ROW][C]114[/C][C]0.1556[/C][C]0.1291[/C][C]0.0108[/C][C]93305.6254[/C][C]7775.4688[/C][C]88.1786[/C][/ROW]
[ROW][C]115[/C][C]0.1349[/C][C]-0.1258[/C][C]0.0105[/C][C]122603.0345[/C][C]10216.9195[/C][C]101.0788[/C][/ROW]
[ROW][C]116[/C][C]0.1353[/C][C]-0.0018[/C][C]2e-04[/C][C]26.5934[/C][C]2.2161[/C][C]1.4887[/C][/ROW]
[ROW][C]117[/C][C]0.1261[/C][C]0.0107[/C][C]9e-04[/C][C]1067.6885[/C][C]88.974[/C][C]9.4326[/C][/ROW]
[ROW][C]118[/C][C]0.1295[/C][C]-0.0498[/C][C]0.0042[/C][C]22545.1135[/C][C]1878.7595[/C][C]43.3447[/C][/ROW]
[ROW][C]119[/C][C]0.1476[/C][C]-0.0227[/C][C]0.0019[/C][C]3660.8444[/C][C]305.0704[/C][C]17.4663[/C][/ROW]
[ROW][C]120[/C][C]0.1272[/C][C]-0.0831[/C][C]0.0069[/C][C]67332.3698[/C][C]5611.0308[/C][C]74.9068[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=62596&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=62596&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
1090.1009-0.02530.00214782.3928398.532719.9633
1100.1131-0.09620.00863689.75465307.479572.8525
1110.1037-0.00655e-04432.942536.07856.0065
1120.1174-0.0190.00163123.6944260.307916.1341
1130.1039-0.09930.0083117807.40319817.283699.0822
1140.15560.12910.010893305.62547775.468888.1786
1150.1349-0.12580.0105122603.034510216.9195101.0788
1160.1353-0.00182e-0426.59342.21611.4887
1170.12610.01079e-041067.688588.9749.4326
1180.1295-0.04980.004222545.11351878.759543.3447
1190.1476-0.02270.00193660.8444305.070417.4663
1200.1272-0.08310.006967332.36985611.030874.9068



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