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, 06 Dec 2011 15:13:55 -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/06/t1323202465m5r7524i8ziusxy.htm/, Retrieved Mon, 29 Apr 2024 07:46:28 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=151879, Retrieved Mon, 29 Apr 2024 07:46:28 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact83
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]
- R PD        [ARIMA Forecasting] [Ws9 - Forecasting...] [2011-12-06 20:13:55] [8aedcf735e397266388b06f47fe45218] [Current]
-   P           [ARIMA Forecasting] [Forecasting arma ...] [2011-12-23 21:28:16] [7156a20ff7d97880b6dc50f7239ba03b]
Feedback Forum

Post a new message
Dataseries X:
1657
1418
1501
1315
1621
2308
3554
3318
3252
2921
2133
2040
1858
1833
2094
2173
2366
2074
2522
1822
1952
2232
1755
1791
2075
1850
2137
2467
2154
2289
2628
2074
2798
2194
2442
2565
2063
2070
2539
1898
2139
2408
2725
2201
2311
2548
2276
2351
2280
2057
2479
2379
2295
2456
2546
2844
2260
2981
2678
3440
2842
2450
2669
2570
2540
2318
2930
2947
2799
2695
2498
2260
2160
2058
2533
2150
2172
2155
3016
2333
2355
2825
2214
2360
2299
1746
2069
2267
1878
2266
2282
2085
2277
2251
1828
1954
1851
1570
1852
2187
1855
2218
2253
2028
2169
1997
2034
1791
1627
1631
2319
1707
1747
2397
2059
2251
2558
2406
2049
2074
1734
1983
2121
1905
2126
2363
2173
2710
2137
2742
2419
2194
2660
2189
2310
2349
2540
2434
2916
2446
2375
3032
2218
1920
2039
1889
2014
2105
2153
2309
2955
2225
2160
2386
1653
1099
5010
2672
2729
2955
2409
3086
3384
2458
2913
2448
2215
2179
2461
2098
2621
2703
2388
3880
3310
3093
3237
3002
2670
2311
2062
2059
2465
2213
2028
2322
2825
2687
2373
2889
2708
2542
2477
2419
2977
3001
3075
2870
3756
3443
2948
3560
3257
2600
2741
2349
2783
2845
2987
2696
3874
2912
2743
3857
2660
2226
2942
2420
2516
2421
2631
2887
3328
2587
2695
3669
2773
2527
2750
2014
2763
2726
1826
2713
3040
2405
2526
2526
2529
2474
2576
2219
2900
2274
2184
2629
2739
2933
3144
3354
3357
3329




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151879&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'Herman Ole Andreas Wold' @ wold.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[240])
2282527-------
2292750-------
2302014-------
2312763-------
2322726-------
2331826-------
2342713-------
2353040-------
2362405-------
2372526-------
2382526-------
2392529-------
2402474-------
24125762508.49371871.28183362.690.43850.53150.28970.5315
24222192155.19771582.95662934.30480.43620.14490.63880.2113
24329002512.57481821.95353464.97980.21260.72710.30320.5316
24422742445.87181755.83023407.09990.3630.17720.28390.4771
24521842326.42551656.81533266.66190.38330.54350.85160.3792
24626292640.63241868.66053731.51740.49170.7940.44830.6177
24727393026.60092130.90814298.78370.32880.72990.49180.8027
24829332605.61891827.01453716.0350.28170.40690.63840.5919
24931442590.27371810.27293706.35720.16540.27360.54490.5809
25033542854.33221989.51324095.07820.2150.32360.6980.726
25133572421.97711684.52953482.2620.0420.04250.42160.4617
25233292226.83831546.11833207.26350.01380.01190.31060.3106

\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[240]) \tabularnewline
228 & 2527 & - & - & - & - & - & - & - \tabularnewline
229 & 2750 & - & - & - & - & - & - & - \tabularnewline
230 & 2014 & - & - & - & - & - & - & - \tabularnewline
231 & 2763 & - & - & - & - & - & - & - \tabularnewline
232 & 2726 & - & - & - & - & - & - & - \tabularnewline
233 & 1826 & - & - & - & - & - & - & - \tabularnewline
234 & 2713 & - & - & - & - & - & - & - \tabularnewline
235 & 3040 & - & - & - & - & - & - & - \tabularnewline
236 & 2405 & - & - & - & - & - & - & - \tabularnewline
237 & 2526 & - & - & - & - & - & - & - \tabularnewline
238 & 2526 & - & - & - & - & - & - & - \tabularnewline
239 & 2529 & - & - & - & - & - & - & - \tabularnewline
240 & 2474 & - & - & - & - & - & - & - \tabularnewline
241 & 2576 & 2508.4937 & 1871.2818 & 3362.69 & 0.4385 & 0.5315 & 0.2897 & 0.5315 \tabularnewline
242 & 2219 & 2155.1977 & 1582.9566 & 2934.3048 & 0.4362 & 0.1449 & 0.6388 & 0.2113 \tabularnewline
243 & 2900 & 2512.5748 & 1821.9535 & 3464.9798 & 0.2126 & 0.7271 & 0.3032 & 0.5316 \tabularnewline
244 & 2274 & 2445.8718 & 1755.8302 & 3407.0999 & 0.363 & 0.1772 & 0.2839 & 0.4771 \tabularnewline
245 & 2184 & 2326.4255 & 1656.8153 & 3266.6619 & 0.3833 & 0.5435 & 0.8516 & 0.3792 \tabularnewline
246 & 2629 & 2640.6324 & 1868.6605 & 3731.5174 & 0.4917 & 0.794 & 0.4483 & 0.6177 \tabularnewline
247 & 2739 & 3026.6009 & 2130.9081 & 4298.7837 & 0.3288 & 0.7299 & 0.4918 & 0.8027 \tabularnewline
248 & 2933 & 2605.6189 & 1827.0145 & 3716.035 & 0.2817 & 0.4069 & 0.6384 & 0.5919 \tabularnewline
249 & 3144 & 2590.2737 & 1810.2729 & 3706.3572 & 0.1654 & 0.2736 & 0.5449 & 0.5809 \tabularnewline
250 & 3354 & 2854.3322 & 1989.5132 & 4095.0782 & 0.215 & 0.3236 & 0.698 & 0.726 \tabularnewline
251 & 3357 & 2421.9771 & 1684.5295 & 3482.262 & 0.042 & 0.0425 & 0.4216 & 0.4617 \tabularnewline
252 & 3329 & 2226.8383 & 1546.1183 & 3207.2635 & 0.0138 & 0.0119 & 0.3106 & 0.3106 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151879&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[240])[/C][/ROW]
[ROW][C]228[/C][C]2527[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]229[/C][C]2750[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]230[/C][C]2014[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]231[/C][C]2763[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]232[/C][C]2726[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]233[/C][C]1826[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]234[/C][C]2713[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]235[/C][C]3040[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]236[/C][C]2405[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]237[/C][C]2526[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]238[/C][C]2526[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]239[/C][C]2529[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]240[/C][C]2474[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]241[/C][C]2576[/C][C]2508.4937[/C][C]1871.2818[/C][C]3362.69[/C][C]0.4385[/C][C]0.5315[/C][C]0.2897[/C][C]0.5315[/C][/ROW]
[ROW][C]242[/C][C]2219[/C][C]2155.1977[/C][C]1582.9566[/C][C]2934.3048[/C][C]0.4362[/C][C]0.1449[/C][C]0.6388[/C][C]0.2113[/C][/ROW]
[ROW][C]243[/C][C]2900[/C][C]2512.5748[/C][C]1821.9535[/C][C]3464.9798[/C][C]0.2126[/C][C]0.7271[/C][C]0.3032[/C][C]0.5316[/C][/ROW]
[ROW][C]244[/C][C]2274[/C][C]2445.8718[/C][C]1755.8302[/C][C]3407.0999[/C][C]0.363[/C][C]0.1772[/C][C]0.2839[/C][C]0.4771[/C][/ROW]
[ROW][C]245[/C][C]2184[/C][C]2326.4255[/C][C]1656.8153[/C][C]3266.6619[/C][C]0.3833[/C][C]0.5435[/C][C]0.8516[/C][C]0.3792[/C][/ROW]
[ROW][C]246[/C][C]2629[/C][C]2640.6324[/C][C]1868.6605[/C][C]3731.5174[/C][C]0.4917[/C][C]0.794[/C][C]0.4483[/C][C]0.6177[/C][/ROW]
[ROW][C]247[/C][C]2739[/C][C]3026.6009[/C][C]2130.9081[/C][C]4298.7837[/C][C]0.3288[/C][C]0.7299[/C][C]0.4918[/C][C]0.8027[/C][/ROW]
[ROW][C]248[/C][C]2933[/C][C]2605.6189[/C][C]1827.0145[/C][C]3716.035[/C][C]0.2817[/C][C]0.4069[/C][C]0.6384[/C][C]0.5919[/C][/ROW]
[ROW][C]249[/C][C]3144[/C][C]2590.2737[/C][C]1810.2729[/C][C]3706.3572[/C][C]0.1654[/C][C]0.2736[/C][C]0.5449[/C][C]0.5809[/C][/ROW]
[ROW][C]250[/C][C]3354[/C][C]2854.3322[/C][C]1989.5132[/C][C]4095.0782[/C][C]0.215[/C][C]0.3236[/C][C]0.698[/C][C]0.726[/C][/ROW]
[ROW][C]251[/C][C]3357[/C][C]2421.9771[/C][C]1684.5295[/C][C]3482.262[/C][C]0.042[/C][C]0.0425[/C][C]0.4216[/C][C]0.4617[/C][/ROW]
[ROW][C]252[/C][C]3329[/C][C]2226.8383[/C][C]1546.1183[/C][C]3207.2635[/C][C]0.0138[/C][C]0.0119[/C][C]0.3106[/C][C]0.3106[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151879&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151879&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[240])
2282527-------
2292750-------
2302014-------
2312763-------
2322726-------
2331826-------
2342713-------
2353040-------
2362405-------
2372526-------
2382526-------
2392529-------
2402474-------
24125762508.49371871.28183362.690.43850.53150.28970.5315
24222192155.19771582.95662934.30480.43620.14490.63880.2113
24329002512.57481821.95353464.97980.21260.72710.30320.5316
24422742445.87181755.83023407.09990.3630.17720.28390.4771
24521842326.42551656.81533266.66190.38330.54350.85160.3792
24626292640.63241868.66053731.51740.49170.7940.44830.6177
24727393026.60092130.90814298.78370.32880.72990.49180.8027
24829332605.61891827.01453716.0350.28170.40690.63840.5919
24931442590.27371810.27293706.35720.16540.27360.54490.5809
25033542854.33221989.51324095.07820.2150.32360.6980.726
25133572421.97711684.52953482.2620.0420.04250.42160.4617
25233292226.83831546.11833207.26350.01380.01190.31060.3106







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
2410.17370.026904557.104700
2420.18440.02960.02834070.7314313.917965.6804
2430.19340.15420.0702150098.30452908.7133230.0189
2440.2005-0.07030.070229539.909347066.5123216.9482
2450.2062-0.06120.068420285.016741710.2132204.2308
2460.2108-0.00440.0578135.312234781.063186.4968
2470.2145-0.0950.063182714.268141628.6637204.031
2480.21740.12560.0709107178.385749822.379223.2093
2490.21980.21380.0868306612.793378354.6472279.919
2500.22180.17510.0956249667.927395485.9753309.0081
2510.22340.38610.122874267.7829166284.3214407.7797
2520.22460.49490.15311214760.3439253657.3233503.644

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
241 & 0.1737 & 0.0269 & 0 & 4557.1047 & 0 & 0 \tabularnewline
242 & 0.1844 & 0.0296 & 0.0283 & 4070.731 & 4313.9179 & 65.6804 \tabularnewline
243 & 0.1934 & 0.1542 & 0.0702 & 150098.304 & 52908.7133 & 230.0189 \tabularnewline
244 & 0.2005 & -0.0703 & 0.0702 & 29539.9093 & 47066.5123 & 216.9482 \tabularnewline
245 & 0.2062 & -0.0612 & 0.0684 & 20285.0167 & 41710.2132 & 204.2308 \tabularnewline
246 & 0.2108 & -0.0044 & 0.0578 & 135.3122 & 34781.063 & 186.4968 \tabularnewline
247 & 0.2145 & -0.095 & 0.0631 & 82714.2681 & 41628.6637 & 204.031 \tabularnewline
248 & 0.2174 & 0.1256 & 0.0709 & 107178.3857 & 49822.379 & 223.2093 \tabularnewline
249 & 0.2198 & 0.2138 & 0.0868 & 306612.7933 & 78354.6472 & 279.919 \tabularnewline
250 & 0.2218 & 0.1751 & 0.0956 & 249667.9273 & 95485.9753 & 309.0081 \tabularnewline
251 & 0.2234 & 0.3861 & 0.122 & 874267.7829 & 166284.3214 & 407.7797 \tabularnewline
252 & 0.2246 & 0.4949 & 0.1531 & 1214760.3439 & 253657.3233 & 503.644 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151879&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]241[/C][C]0.1737[/C][C]0.0269[/C][C]0[/C][C]4557.1047[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]242[/C][C]0.1844[/C][C]0.0296[/C][C]0.0283[/C][C]4070.731[/C][C]4313.9179[/C][C]65.6804[/C][/ROW]
[ROW][C]243[/C][C]0.1934[/C][C]0.1542[/C][C]0.0702[/C][C]150098.304[/C][C]52908.7133[/C][C]230.0189[/C][/ROW]
[ROW][C]244[/C][C]0.2005[/C][C]-0.0703[/C][C]0.0702[/C][C]29539.9093[/C][C]47066.5123[/C][C]216.9482[/C][/ROW]
[ROW][C]245[/C][C]0.2062[/C][C]-0.0612[/C][C]0.0684[/C][C]20285.0167[/C][C]41710.2132[/C][C]204.2308[/C][/ROW]
[ROW][C]246[/C][C]0.2108[/C][C]-0.0044[/C][C]0.0578[/C][C]135.3122[/C][C]34781.063[/C][C]186.4968[/C][/ROW]
[ROW][C]247[/C][C]0.2145[/C][C]-0.095[/C][C]0.0631[/C][C]82714.2681[/C][C]41628.6637[/C][C]204.031[/C][/ROW]
[ROW][C]248[/C][C]0.2174[/C][C]0.1256[/C][C]0.0709[/C][C]107178.3857[/C][C]49822.379[/C][C]223.2093[/C][/ROW]
[ROW][C]249[/C][C]0.2198[/C][C]0.2138[/C][C]0.0868[/C][C]306612.7933[/C][C]78354.6472[/C][C]279.919[/C][/ROW]
[ROW][C]250[/C][C]0.2218[/C][C]0.1751[/C][C]0.0956[/C][C]249667.9273[/C][C]95485.9753[/C][C]309.0081[/C][/ROW]
[ROW][C]251[/C][C]0.2234[/C][C]0.3861[/C][C]0.122[/C][C]874267.7829[/C][C]166284.3214[/C][C]407.7797[/C][/ROW]
[ROW][C]252[/C][C]0.2246[/C][C]0.4949[/C][C]0.1531[/C][C]1214760.3439[/C][C]253657.3233[/C][C]503.644[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151879&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151879&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
2410.17370.026904557.104700
2420.18440.02960.02834070.7314313.917965.6804
2430.19340.15420.0702150098.30452908.7133230.0189
2440.2005-0.07030.070229539.909347066.5123216.9482
2450.2062-0.06120.068420285.016741710.2132204.2308
2460.2108-0.00440.0578135.312234781.063186.4968
2470.2145-0.0950.063182714.268141628.6637204.031
2480.21740.12560.0709107178.385749822.379223.2093
2490.21980.21380.0868306612.793378354.6472279.919
2500.22180.17510.0956249667.927395485.9753309.0081
2510.22340.38610.122874267.7829166284.3214407.7797
2520.22460.49490.15311214760.3439253657.3233503.644



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