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, 16 Dec 2008 09:38:02 -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/2008/Dec/16/t1229445631w36rexk7tlhzma6.htm/, Retrieved Thu, 16 May 2024 01:24:59 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34025, Retrieved Thu, 16 May 2024 01:24:59 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact198
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [Uitvoer.Nederland] [2008-12-03 15:11:10] [988ab43f527fc78aae41c84649095267]
-   P   [Univariate Data Series] [Export From Belgi...] [2008-12-03 15:52:29] [988ab43f527fc78aae41c84649095267]
- RMP     [ARIMA Forecasting] [ARIMA Forecasting] [2008-12-11 16:07:50] [988ab43f527fc78aae41c84649095267]
-   P         [ARIMA Forecasting] [forecasting Nethe...] [2008-12-16 16:38:02] [5d823194959040fa9b19b8c8302177e6] [Current]
Feedback Forum

Post a new message
Dataseries X:
2236
2084.9
2409.5
2199.3
2203.5
2254.1
1975.8
1742.2
2520.6
2438.1
2126.3
2267.5
2201.1
2128.5
2596
2458.2
2210.5
2621.2
2231.4
2103.6
2685.8
2539.3
2462.4
2693.3
2307.7
2385.9
2737.6
2653.9
2545.4
2848.8
2359.5
2488.3
2861.1
2717.9
2844
2749
2652.9
2660.2
3187.1
2774.1
3158.2
3244.6
2665.5
2820.8
2983.4
3077.4
3024.8
2731.8
3046.2
2834.8
3292.8
2946.1
3196.9
3284.2
3003
2979
3137.4
3630.2
3270.7
2942.3




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34025&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34025&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34025&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 time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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])
362749-------
372652.9-------
382660.2-------
393187.1-------
402774.1-------
413158.2-------
423244.6-------
432665.5-------
442820.8-------
452983.4-------
463077.4-------
473024.8-------
482731.8-------
493046.22867.90142579.58413156.21860.11270.82260.92810.8226
502834.82743.98022454.53613033.42430.26930.02040.71480.5329
513292.83275.45762962.13963588.77560.45680.99710.70980.9997
522946.12901.47312560.11473242.83150.39890.01230.76770.835
533196.93238.80232890.11973587.4850.40690.950.67480.9978
543284.23338.80782973.41813704.19750.38480.77670.69330.9994
5530032757.30682380.39663134.21710.10070.00310.68350.5528
5629792899.38142513.86673284.89620.34280.29920.65520.8029
573137.43065.23192669.73863460.72520.36030.66540.65750.9508
583630.23153.16742750.13513556.19970.01020.53060.64370.9798
593270.73096.10742686.14533506.06950.20190.00530.63340.9592
602942.32801.52732385.05283218.00190.25380.01360.62860.6286

\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 & 2749 & - & - & - & - & - & - & - \tabularnewline
37 & 2652.9 & - & - & - & - & - & - & - \tabularnewline
38 & 2660.2 & - & - & - & - & - & - & - \tabularnewline
39 & 3187.1 & - & - & - & - & - & - & - \tabularnewline
40 & 2774.1 & - & - & - & - & - & - & - \tabularnewline
41 & 3158.2 & - & - & - & - & - & - & - \tabularnewline
42 & 3244.6 & - & - & - & - & - & - & - \tabularnewline
43 & 2665.5 & - & - & - & - & - & - & - \tabularnewline
44 & 2820.8 & - & - & - & - & - & - & - \tabularnewline
45 & 2983.4 & - & - & - & - & - & - & - \tabularnewline
46 & 3077.4 & - & - & - & - & - & - & - \tabularnewline
47 & 3024.8 & - & - & - & - & - & - & - \tabularnewline
48 & 2731.8 & - & - & - & - & - & - & - \tabularnewline
49 & 3046.2 & 2867.9014 & 2579.5841 & 3156.2186 & 0.1127 & 0.8226 & 0.9281 & 0.8226 \tabularnewline
50 & 2834.8 & 2743.9802 & 2454.5361 & 3033.4243 & 0.2693 & 0.0204 & 0.7148 & 0.5329 \tabularnewline
51 & 3292.8 & 3275.4576 & 2962.1396 & 3588.7756 & 0.4568 & 0.9971 & 0.7098 & 0.9997 \tabularnewline
52 & 2946.1 & 2901.4731 & 2560.1147 & 3242.8315 & 0.3989 & 0.0123 & 0.7677 & 0.835 \tabularnewline
53 & 3196.9 & 3238.8023 & 2890.1197 & 3587.485 & 0.4069 & 0.95 & 0.6748 & 0.9978 \tabularnewline
54 & 3284.2 & 3338.8078 & 2973.4181 & 3704.1975 & 0.3848 & 0.7767 & 0.6933 & 0.9994 \tabularnewline
55 & 3003 & 2757.3068 & 2380.3966 & 3134.2171 & 0.1007 & 0.0031 & 0.6835 & 0.5528 \tabularnewline
56 & 2979 & 2899.3814 & 2513.8667 & 3284.8962 & 0.3428 & 0.2992 & 0.6552 & 0.8029 \tabularnewline
57 & 3137.4 & 3065.2319 & 2669.7386 & 3460.7252 & 0.3603 & 0.6654 & 0.6575 & 0.9508 \tabularnewline
58 & 3630.2 & 3153.1674 & 2750.1351 & 3556.1997 & 0.0102 & 0.5306 & 0.6437 & 0.9798 \tabularnewline
59 & 3270.7 & 3096.1074 & 2686.1453 & 3506.0695 & 0.2019 & 0.0053 & 0.6334 & 0.9592 \tabularnewline
60 & 2942.3 & 2801.5273 & 2385.0528 & 3218.0019 & 0.2538 & 0.0136 & 0.6286 & 0.6286 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34025&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]2749[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]2652.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]2660.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]3187.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]2774.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]3158.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]3244.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]2665.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]2820.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]2983.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]3077.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]3024.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]2731.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]3046.2[/C][C]2867.9014[/C][C]2579.5841[/C][C]3156.2186[/C][C]0.1127[/C][C]0.8226[/C][C]0.9281[/C][C]0.8226[/C][/ROW]
[ROW][C]50[/C][C]2834.8[/C][C]2743.9802[/C][C]2454.5361[/C][C]3033.4243[/C][C]0.2693[/C][C]0.0204[/C][C]0.7148[/C][C]0.5329[/C][/ROW]
[ROW][C]51[/C][C]3292.8[/C][C]3275.4576[/C][C]2962.1396[/C][C]3588.7756[/C][C]0.4568[/C][C]0.9971[/C][C]0.7098[/C][C]0.9997[/C][/ROW]
[ROW][C]52[/C][C]2946.1[/C][C]2901.4731[/C][C]2560.1147[/C][C]3242.8315[/C][C]0.3989[/C][C]0.0123[/C][C]0.7677[/C][C]0.835[/C][/ROW]
[ROW][C]53[/C][C]3196.9[/C][C]3238.8023[/C][C]2890.1197[/C][C]3587.485[/C][C]0.4069[/C][C]0.95[/C][C]0.6748[/C][C]0.9978[/C][/ROW]
[ROW][C]54[/C][C]3284.2[/C][C]3338.8078[/C][C]2973.4181[/C][C]3704.1975[/C][C]0.3848[/C][C]0.7767[/C][C]0.6933[/C][C]0.9994[/C][/ROW]
[ROW][C]55[/C][C]3003[/C][C]2757.3068[/C][C]2380.3966[/C][C]3134.2171[/C][C]0.1007[/C][C]0.0031[/C][C]0.6835[/C][C]0.5528[/C][/ROW]
[ROW][C]56[/C][C]2979[/C][C]2899.3814[/C][C]2513.8667[/C][C]3284.8962[/C][C]0.3428[/C][C]0.2992[/C][C]0.6552[/C][C]0.8029[/C][/ROW]
[ROW][C]57[/C][C]3137.4[/C][C]3065.2319[/C][C]2669.7386[/C][C]3460.7252[/C][C]0.3603[/C][C]0.6654[/C][C]0.6575[/C][C]0.9508[/C][/ROW]
[ROW][C]58[/C][C]3630.2[/C][C]3153.1674[/C][C]2750.1351[/C][C]3556.1997[/C][C]0.0102[/C][C]0.5306[/C][C]0.6437[/C][C]0.9798[/C][/ROW]
[ROW][C]59[/C][C]3270.7[/C][C]3096.1074[/C][C]2686.1453[/C][C]3506.0695[/C][C]0.2019[/C][C]0.0053[/C][C]0.6334[/C][C]0.9592[/C][/ROW]
[ROW][C]60[/C][C]2942.3[/C][C]2801.5273[/C][C]2385.0528[/C][C]3218.0019[/C][C]0.2538[/C][C]0.0136[/C][C]0.6286[/C][C]0.6286[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34025&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34025&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])
362749-------
372652.9-------
382660.2-------
393187.1-------
402774.1-------
413158.2-------
423244.6-------
432665.5-------
442820.8-------
452983.4-------
463077.4-------
473024.8-------
482731.8-------
493046.22867.90142579.58413156.21860.11270.82260.92810.8226
502834.82743.98022454.53613033.42430.26930.02040.71480.5329
513292.83275.45762962.13963588.77560.45680.99710.70980.9997
522946.12901.47312560.11473242.83150.39890.01230.76770.835
533196.93238.80232890.11973587.4850.40690.950.67480.9978
543284.23338.80782973.41813704.19750.38480.77670.69330.9994
5530032757.30682380.39663134.21710.10070.00310.68350.5528
5629792899.38142513.86673284.89620.34280.29920.65520.8029
573137.43065.23192669.73863460.72520.36030.66540.65750.9508
583630.23153.16742750.13513556.19970.01020.53060.64370.9798
593270.73096.10742686.14533506.06950.20190.00530.63340.9592
602942.32801.52732385.05283218.00190.25380.01360.62860.6286







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.05130.06220.005231790.40252649.200251.4704
500.05380.03310.00288248.2425687.353526.2174
510.04880.00534e-04300.759225.06335.0063
520.060.01540.00131991.5589165.963212.8827
530.0549-0.01290.00111755.8059146.317212.0962
540.0558-0.01640.00142982.0092248.500815.7639
550.06970.08910.007460365.14475030.428770.9255
560.06780.02750.00236339.1166528.259722.9839
570.06580.02350.0025208.2313434.019320.8331
580.06520.15130.0126227560.110618963.3425137.7075
590.06760.05640.004730482.56872540.214150.4005
600.07580.05020.004219816.94141651.411840.6376

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0513 & 0.0622 & 0.0052 & 31790.4025 & 2649.2002 & 51.4704 \tabularnewline
50 & 0.0538 & 0.0331 & 0.0028 & 8248.2425 & 687.3535 & 26.2174 \tabularnewline
51 & 0.0488 & 0.0053 & 4e-04 & 300.7592 & 25.0633 & 5.0063 \tabularnewline
52 & 0.06 & 0.0154 & 0.0013 & 1991.5589 & 165.9632 & 12.8827 \tabularnewline
53 & 0.0549 & -0.0129 & 0.0011 & 1755.8059 & 146.3172 & 12.0962 \tabularnewline
54 & 0.0558 & -0.0164 & 0.0014 & 2982.0092 & 248.5008 & 15.7639 \tabularnewline
55 & 0.0697 & 0.0891 & 0.0074 & 60365.1447 & 5030.4287 & 70.9255 \tabularnewline
56 & 0.0678 & 0.0275 & 0.0023 & 6339.1166 & 528.2597 & 22.9839 \tabularnewline
57 & 0.0658 & 0.0235 & 0.002 & 5208.2313 & 434.0193 & 20.8331 \tabularnewline
58 & 0.0652 & 0.1513 & 0.0126 & 227560.1106 & 18963.3425 & 137.7075 \tabularnewline
59 & 0.0676 & 0.0564 & 0.0047 & 30482.5687 & 2540.2141 & 50.4005 \tabularnewline
60 & 0.0758 & 0.0502 & 0.0042 & 19816.9414 & 1651.4118 & 40.6376 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34025&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.0513[/C][C]0.0622[/C][C]0.0052[/C][C]31790.4025[/C][C]2649.2002[/C][C]51.4704[/C][/ROW]
[ROW][C]50[/C][C]0.0538[/C][C]0.0331[/C][C]0.0028[/C][C]8248.2425[/C][C]687.3535[/C][C]26.2174[/C][/ROW]
[ROW][C]51[/C][C]0.0488[/C][C]0.0053[/C][C]4e-04[/C][C]300.7592[/C][C]25.0633[/C][C]5.0063[/C][/ROW]
[ROW][C]52[/C][C]0.06[/C][C]0.0154[/C][C]0.0013[/C][C]1991.5589[/C][C]165.9632[/C][C]12.8827[/C][/ROW]
[ROW][C]53[/C][C]0.0549[/C][C]-0.0129[/C][C]0.0011[/C][C]1755.8059[/C][C]146.3172[/C][C]12.0962[/C][/ROW]
[ROW][C]54[/C][C]0.0558[/C][C]-0.0164[/C][C]0.0014[/C][C]2982.0092[/C][C]248.5008[/C][C]15.7639[/C][/ROW]
[ROW][C]55[/C][C]0.0697[/C][C]0.0891[/C][C]0.0074[/C][C]60365.1447[/C][C]5030.4287[/C][C]70.9255[/C][/ROW]
[ROW][C]56[/C][C]0.0678[/C][C]0.0275[/C][C]0.0023[/C][C]6339.1166[/C][C]528.2597[/C][C]22.9839[/C][/ROW]
[ROW][C]57[/C][C]0.0658[/C][C]0.0235[/C][C]0.002[/C][C]5208.2313[/C][C]434.0193[/C][C]20.8331[/C][/ROW]
[ROW][C]58[/C][C]0.0652[/C][C]0.1513[/C][C]0.0126[/C][C]227560.1106[/C][C]18963.3425[/C][C]137.7075[/C][/ROW]
[ROW][C]59[/C][C]0.0676[/C][C]0.0564[/C][C]0.0047[/C][C]30482.5687[/C][C]2540.2141[/C][C]50.4005[/C][/ROW]
[ROW][C]60[/C][C]0.0758[/C][C]0.0502[/C][C]0.0042[/C][C]19816.9414[/C][C]1651.4118[/C][C]40.6376[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34025&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34025&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.05130.06220.005231790.40252649.200251.4704
500.05380.03310.00288248.2425687.353526.2174
510.04880.00534e-04300.759225.06335.0063
520.060.01540.00131991.5589165.963212.8827
530.0549-0.01290.00111755.8059146.317212.0962
540.0558-0.01640.00142982.0092248.500815.7639
550.06970.08910.007460365.14475030.428770.9255
560.06780.02750.00236339.1166528.259722.9839
570.06580.02350.0025208.2313434.019320.8331
580.06520.15130.0126227560.110618963.3425137.7075
590.06760.05640.004730482.56872540.214150.4005
600.07580.05020.004219816.94141651.411840.6376



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