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 computationThu, 11 Dec 2008 09:07:50 -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/11/t1229011773rk16p6ix1ize67k.htm/, Retrieved Fri, 17 May 2024 01:42:27 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=32325, Retrieved Fri, 17 May 2024 01:42:27 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact181
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] [5d823194959040fa9b19b8c8302177e6] [Current]
-   P         [ARIMA Forecasting] [forecasting Nethe...] [2008-12-16 16:38:02] [988ab43f527fc78aae41c84649095267]
-   P         [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-16 16:40:55] [988ab43f527fc78aae41c84649095267]
-   PD          [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-16 18:42:50] [988ab43f527fc78aae41c84649095267]
-   PD          [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-16 18:45:50] [988ab43f527fc78aae41c84649095267]
-    D          [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-16 18:47:50] [988ab43f527fc78aae41c84649095267]
-   PD          [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-16 18:49:00] [988ab43f527fc78aae41c84649095267]
-   PD          [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-16 18:51:34] [988ab43f527fc78aae41c84649095267]
-   PD          [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-16 18:52:54] [988ab43f527fc78aae41c84649095267]
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 time1 seconds
R Server'George Udny Yule' @ 72.249.76.132

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

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







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.22880.76692520.66283240.87110.18390.79130.89260.7913
502834.82748.1242370.37423125.87390.32650.0610.67590.5337
513292.83500.04883122.2993877.79870.14110.99970.94781
522946.12831.1242453.37423208.87390.27540.00830.61630.6968
533196.93452.09893074.34913829.84880.09270.99570.93640.9999
543284.23519.42393141.67413897.17380.11110.95290.92311
5530032894.84912517.09923272.59890.28730.02170.8830.8012
5629792968.17412590.42433345.9240.47760.42830.77780.89
573137.43028.7742651.02413406.52390.28650.60190.59310.9383
583630.23283.02392905.2743660.77370.03580.77510.8570.9979
593270.73053.62412675.87423431.3740.130.00140.55940.9525
602942.32795.56072418.50083172.62060.22280.00680.62980.6298

\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 & 2880.7669 & 2520.6628 & 3240.8711 & 0.1839 & 0.7913 & 0.8926 & 0.7913 \tabularnewline
50 & 2834.8 & 2748.124 & 2370.3742 & 3125.8739 & 0.3265 & 0.061 & 0.6759 & 0.5337 \tabularnewline
51 & 3292.8 & 3500.0488 & 3122.299 & 3877.7987 & 0.1411 & 0.9997 & 0.9478 & 1 \tabularnewline
52 & 2946.1 & 2831.124 & 2453.3742 & 3208.8739 & 0.2754 & 0.0083 & 0.6163 & 0.6968 \tabularnewline
53 & 3196.9 & 3452.0989 & 3074.3491 & 3829.8488 & 0.0927 & 0.9957 & 0.9364 & 0.9999 \tabularnewline
54 & 3284.2 & 3519.4239 & 3141.6741 & 3897.1738 & 0.1111 & 0.9529 & 0.9231 & 1 \tabularnewline
55 & 3003 & 2894.8491 & 2517.0992 & 3272.5989 & 0.2873 & 0.0217 & 0.883 & 0.8012 \tabularnewline
56 & 2979 & 2968.1741 & 2590.4243 & 3345.924 & 0.4776 & 0.4283 & 0.7778 & 0.89 \tabularnewline
57 & 3137.4 & 3028.774 & 2651.0241 & 3406.5239 & 0.2865 & 0.6019 & 0.5931 & 0.9383 \tabularnewline
58 & 3630.2 & 3283.0239 & 2905.274 & 3660.7737 & 0.0358 & 0.7751 & 0.857 & 0.9979 \tabularnewline
59 & 3270.7 & 3053.6241 & 2675.8742 & 3431.374 & 0.13 & 0.0014 & 0.5594 & 0.9525 \tabularnewline
60 & 2942.3 & 2795.5607 & 2418.5008 & 3172.6206 & 0.2228 & 0.0068 & 0.6298 & 0.6298 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32325&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]2880.7669[/C][C]2520.6628[/C][C]3240.8711[/C][C]0.1839[/C][C]0.7913[/C][C]0.8926[/C][C]0.7913[/C][/ROW]
[ROW][C]50[/C][C]2834.8[/C][C]2748.124[/C][C]2370.3742[/C][C]3125.8739[/C][C]0.3265[/C][C]0.061[/C][C]0.6759[/C][C]0.5337[/C][/ROW]
[ROW][C]51[/C][C]3292.8[/C][C]3500.0488[/C][C]3122.299[/C][C]3877.7987[/C][C]0.1411[/C][C]0.9997[/C][C]0.9478[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]2946.1[/C][C]2831.124[/C][C]2453.3742[/C][C]3208.8739[/C][C]0.2754[/C][C]0.0083[/C][C]0.6163[/C][C]0.6968[/C][/ROW]
[ROW][C]53[/C][C]3196.9[/C][C]3452.0989[/C][C]3074.3491[/C][C]3829.8488[/C][C]0.0927[/C][C]0.9957[/C][C]0.9364[/C][C]0.9999[/C][/ROW]
[ROW][C]54[/C][C]3284.2[/C][C]3519.4239[/C][C]3141.6741[/C][C]3897.1738[/C][C]0.1111[/C][C]0.9529[/C][C]0.9231[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]3003[/C][C]2894.8491[/C][C]2517.0992[/C][C]3272.5989[/C][C]0.2873[/C][C]0.0217[/C][C]0.883[/C][C]0.8012[/C][/ROW]
[ROW][C]56[/C][C]2979[/C][C]2968.1741[/C][C]2590.4243[/C][C]3345.924[/C][C]0.4776[/C][C]0.4283[/C][C]0.7778[/C][C]0.89[/C][/ROW]
[ROW][C]57[/C][C]3137.4[/C][C]3028.774[/C][C]2651.0241[/C][C]3406.5239[/C][C]0.2865[/C][C]0.6019[/C][C]0.5931[/C][C]0.9383[/C][/ROW]
[ROW][C]58[/C][C]3630.2[/C][C]3283.0239[/C][C]2905.274[/C][C]3660.7737[/C][C]0.0358[/C][C]0.7751[/C][C]0.857[/C][C]0.9979[/C][/ROW]
[ROW][C]59[/C][C]3270.7[/C][C]3053.6241[/C][C]2675.8742[/C][C]3431.374[/C][C]0.13[/C][C]0.0014[/C][C]0.5594[/C][C]0.9525[/C][/ROW]
[ROW][C]60[/C][C]2942.3[/C][C]2795.5607[/C][C]2418.5008[/C][C]3172.6206[/C][C]0.2228[/C][C]0.0068[/C][C]0.6298[/C][C]0.6298[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32325&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32325&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.22880.76692520.66283240.87110.18390.79130.89260.7913
502834.82748.1242370.37423125.87390.32650.0610.67590.5337
513292.83500.04883122.2993877.79870.14110.99970.94781
522946.12831.1242453.37423208.87390.27540.00830.61630.6968
533196.93452.09893074.34913829.84880.09270.99570.93640.9999
543284.23519.42393141.67413897.17380.11110.95290.92311
5530032894.84912517.09923272.59890.28730.02170.8830.8012
5629792968.17412590.42433345.9240.47760.42830.77780.89
573137.43028.7742651.02413406.52390.28650.60190.59310.9383
583630.23283.02392905.2743660.77370.03580.77510.8570.9979
593270.73053.62412675.87423431.3740.130.00140.55940.9525
602942.32795.56072418.50083172.62060.22280.00680.62980.6298







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.06380.05740.004827368.10662280.675647.7564
500.07010.03150.00267512.7211626.060125.0212
510.0551-0.05920.004942952.08043579.3459.8276
520.06810.04060.003413219.4751101.622933.1907
530.0558-0.07390.006265126.49975427.208373.6696
540.0548-0.06680.005655330.2974610.858167.9033
550.06660.03740.003111696.6277974.71931.2205
560.06490.00363e-04117.19929.76663.1252
570.06360.03590.00311799.6123983.30131.3576
580.05870.10570.0088120531.264910044.2721100.2211
590.06310.07110.005947121.94863926.829162.6644
600.06880.05250.004421532.42661794.368942.36

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0638 & 0.0574 & 0.0048 & 27368.1066 & 2280.6756 & 47.7564 \tabularnewline
50 & 0.0701 & 0.0315 & 0.0026 & 7512.7211 & 626.0601 & 25.0212 \tabularnewline
51 & 0.0551 & -0.0592 & 0.0049 & 42952.0804 & 3579.34 & 59.8276 \tabularnewline
52 & 0.0681 & 0.0406 & 0.0034 & 13219.475 & 1101.6229 & 33.1907 \tabularnewline
53 & 0.0558 & -0.0739 & 0.0062 & 65126.4997 & 5427.2083 & 73.6696 \tabularnewline
54 & 0.0548 & -0.0668 & 0.0056 & 55330.297 & 4610.8581 & 67.9033 \tabularnewline
55 & 0.0666 & 0.0374 & 0.0031 & 11696.6277 & 974.719 & 31.2205 \tabularnewline
56 & 0.0649 & 0.0036 & 3e-04 & 117.1992 & 9.7666 & 3.1252 \tabularnewline
57 & 0.0636 & 0.0359 & 0.003 & 11799.6123 & 983.301 & 31.3576 \tabularnewline
58 & 0.0587 & 0.1057 & 0.0088 & 120531.2649 & 10044.2721 & 100.2211 \tabularnewline
59 & 0.0631 & 0.0711 & 0.0059 & 47121.9486 & 3926.8291 & 62.6644 \tabularnewline
60 & 0.0688 & 0.0525 & 0.0044 & 21532.4266 & 1794.3689 & 42.36 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32325&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.0638[/C][C]0.0574[/C][C]0.0048[/C][C]27368.1066[/C][C]2280.6756[/C][C]47.7564[/C][/ROW]
[ROW][C]50[/C][C]0.0701[/C][C]0.0315[/C][C]0.0026[/C][C]7512.7211[/C][C]626.0601[/C][C]25.0212[/C][/ROW]
[ROW][C]51[/C][C]0.0551[/C][C]-0.0592[/C][C]0.0049[/C][C]42952.0804[/C][C]3579.34[/C][C]59.8276[/C][/ROW]
[ROW][C]52[/C][C]0.0681[/C][C]0.0406[/C][C]0.0034[/C][C]13219.475[/C][C]1101.6229[/C][C]33.1907[/C][/ROW]
[ROW][C]53[/C][C]0.0558[/C][C]-0.0739[/C][C]0.0062[/C][C]65126.4997[/C][C]5427.2083[/C][C]73.6696[/C][/ROW]
[ROW][C]54[/C][C]0.0548[/C][C]-0.0668[/C][C]0.0056[/C][C]55330.297[/C][C]4610.8581[/C][C]67.9033[/C][/ROW]
[ROW][C]55[/C][C]0.0666[/C][C]0.0374[/C][C]0.0031[/C][C]11696.6277[/C][C]974.719[/C][C]31.2205[/C][/ROW]
[ROW][C]56[/C][C]0.0649[/C][C]0.0036[/C][C]3e-04[/C][C]117.1992[/C][C]9.7666[/C][C]3.1252[/C][/ROW]
[ROW][C]57[/C][C]0.0636[/C][C]0.0359[/C][C]0.003[/C][C]11799.6123[/C][C]983.301[/C][C]31.3576[/C][/ROW]
[ROW][C]58[/C][C]0.0587[/C][C]0.1057[/C][C]0.0088[/C][C]120531.2649[/C][C]10044.2721[/C][C]100.2211[/C][/ROW]
[ROW][C]59[/C][C]0.0631[/C][C]0.0711[/C][C]0.0059[/C][C]47121.9486[/C][C]3926.8291[/C][C]62.6644[/C][/ROW]
[ROW][C]60[/C][C]0.0688[/C][C]0.0525[/C][C]0.0044[/C][C]21532.4266[/C][C]1794.3689[/C][C]42.36[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32325&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32325&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.06380.05740.004827368.10662280.675647.7564
500.07010.03150.00267512.7211626.060125.0212
510.0551-0.05920.004942952.08043579.3459.8276
520.06810.04060.003413219.4751101.622933.1907
530.0558-0.07390.006265126.49975427.208373.6696
540.0548-0.06680.005655330.2974610.858167.9033
550.06660.03740.003111696.6277974.71931.2205
560.06490.00363e-04117.19929.76663.1252
570.06360.03590.00311799.6123983.30131.3576
580.05870.10570.0088120531.264910044.2721100.2211
590.06310.07110.005947121.94863926.829162.6644
600.06880.05250.004421532.42661794.368942.36



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