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 11:42: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/16/t1229453015deeleafvmtqzzgg.htm/, Retrieved Wed, 15 May 2024 15:04:07 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34096, Retrieved Wed, 15 May 2024 15:04:07 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact184
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] [ARIMA Forecasting...] [2008-12-16 16:40:55] [988ab43f527fc78aae41c84649095267]
-   PD          [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-16 18:42:50] [5d823194959040fa9b19b8c8302177e6] [Current]
Feedback Forum

Post a new message
Dataseries X:
13807.9
14101.7
16010.3
14633.1
14478.5
15327.3
14179.5
11398.2
16111.5
15887.4
14529.3
13923.1
13960.2
14807.8
17511.5
15845.9
14594.2
17252.2
14832.8
13132.1
17665.9
16913
17318.8
16224.2
15469.6
16557.5
19414.8
17335
16525.2
18160.4
15553.8
15262.2
18581
17564.1
18948.6
17187.8
17564.8
17668.4
20811.7
17257.8
18984.2
20532.6
17082.3
16894.9
20274.9
20078.6
19900.9
17012.2
19642.9
19024
21691
18835.9
19873.4
21468.2
19406.8
18385.3
20739.3
22268.3
21569
17514.8




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time12 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 & 12 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=34096&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]12 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=34096&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34096&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 time12 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])
3617187.8-------
3717564.8-------
3817668.4-------
3920811.7-------
4017257.8-------
4118984.2-------
4220532.6-------
4317082.3-------
4416894.9-------
4520274.9-------
4620078.6-------
4719900.9-------
4817012.2-------
4919642.919282.40618004.153420560.65870.29020.99980.99580.9998
501902419113.687217837.890320389.48420.44520.20810.98680.9994
512169121452.416720158.609122746.22430.35890.99990.83411
5218835.919049.351417644.688420454.01440.38291e-040.99380.9978
5319873.419919.197418483.873621354.52130.47510.93050.89921
5421468.221367.758619899.928722835.58840.44670.9770.86761
5519406.818771.396817251.695320291.09820.20633e-040.98530.9884
5618385.317484.946215927.435819042.45670.12860.00780.77110.724
5720739.321482.707219889.800723075.61360.18020.99990.93141
5822268.321313.438419679.881222946.99550.1260.75450.93081
592156920650.575318981.232922319.91760.14040.02880.81061
6017514.818603.563916904.232120302.89560.10463e-040.96680.9668

\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 & 17187.8 & - & - & - & - & - & - & - \tabularnewline
37 & 17564.8 & - & - & - & - & - & - & - \tabularnewline
38 & 17668.4 & - & - & - & - & - & - & - \tabularnewline
39 & 20811.7 & - & - & - & - & - & - & - \tabularnewline
40 & 17257.8 & - & - & - & - & - & - & - \tabularnewline
41 & 18984.2 & - & - & - & - & - & - & - \tabularnewline
42 & 20532.6 & - & - & - & - & - & - & - \tabularnewline
43 & 17082.3 & - & - & - & - & - & - & - \tabularnewline
44 & 16894.9 & - & - & - & - & - & - & - \tabularnewline
45 & 20274.9 & - & - & - & - & - & - & - \tabularnewline
46 & 20078.6 & - & - & - & - & - & - & - \tabularnewline
47 & 19900.9 & - & - & - & - & - & - & - \tabularnewline
48 & 17012.2 & - & - & - & - & - & - & - \tabularnewline
49 & 19642.9 & 19282.406 & 18004.1534 & 20560.6587 & 0.2902 & 0.9998 & 0.9958 & 0.9998 \tabularnewline
50 & 19024 & 19113.6872 & 17837.8903 & 20389.4842 & 0.4452 & 0.2081 & 0.9868 & 0.9994 \tabularnewline
51 & 21691 & 21452.4167 & 20158.6091 & 22746.2243 & 0.3589 & 0.9999 & 0.8341 & 1 \tabularnewline
52 & 18835.9 & 19049.3514 & 17644.6884 & 20454.0144 & 0.3829 & 1e-04 & 0.9938 & 0.9978 \tabularnewline
53 & 19873.4 & 19919.1974 & 18483.8736 & 21354.5213 & 0.4751 & 0.9305 & 0.8992 & 1 \tabularnewline
54 & 21468.2 & 21367.7586 & 19899.9287 & 22835.5884 & 0.4467 & 0.977 & 0.8676 & 1 \tabularnewline
55 & 19406.8 & 18771.3968 & 17251.6953 & 20291.0982 & 0.2063 & 3e-04 & 0.9853 & 0.9884 \tabularnewline
56 & 18385.3 & 17484.9462 & 15927.4358 & 19042.4567 & 0.1286 & 0.0078 & 0.7711 & 0.724 \tabularnewline
57 & 20739.3 & 21482.7072 & 19889.8007 & 23075.6136 & 0.1802 & 0.9999 & 0.9314 & 1 \tabularnewline
58 & 22268.3 & 21313.4384 & 19679.8812 & 22946.9955 & 0.126 & 0.7545 & 0.9308 & 1 \tabularnewline
59 & 21569 & 20650.5753 & 18981.2329 & 22319.9176 & 0.1404 & 0.0288 & 0.8106 & 1 \tabularnewline
60 & 17514.8 & 18603.5639 & 16904.2321 & 20302.8956 & 0.1046 & 3e-04 & 0.9668 & 0.9668 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34096&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]17187.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]17564.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]17668.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]20811.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]17257.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]18984.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]20532.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]17082.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]16894.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]20274.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]20078.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]19900.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]17012.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]19642.9[/C][C]19282.406[/C][C]18004.1534[/C][C]20560.6587[/C][C]0.2902[/C][C]0.9998[/C][C]0.9958[/C][C]0.9998[/C][/ROW]
[ROW][C]50[/C][C]19024[/C][C]19113.6872[/C][C]17837.8903[/C][C]20389.4842[/C][C]0.4452[/C][C]0.2081[/C][C]0.9868[/C][C]0.9994[/C][/ROW]
[ROW][C]51[/C][C]21691[/C][C]21452.4167[/C][C]20158.6091[/C][C]22746.2243[/C][C]0.3589[/C][C]0.9999[/C][C]0.8341[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]18835.9[/C][C]19049.3514[/C][C]17644.6884[/C][C]20454.0144[/C][C]0.3829[/C][C]1e-04[/C][C]0.9938[/C][C]0.9978[/C][/ROW]
[ROW][C]53[/C][C]19873.4[/C][C]19919.1974[/C][C]18483.8736[/C][C]21354.5213[/C][C]0.4751[/C][C]0.9305[/C][C]0.8992[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]21468.2[/C][C]21367.7586[/C][C]19899.9287[/C][C]22835.5884[/C][C]0.4467[/C][C]0.977[/C][C]0.8676[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]19406.8[/C][C]18771.3968[/C][C]17251.6953[/C][C]20291.0982[/C][C]0.2063[/C][C]3e-04[/C][C]0.9853[/C][C]0.9884[/C][/ROW]
[ROW][C]56[/C][C]18385.3[/C][C]17484.9462[/C][C]15927.4358[/C][C]19042.4567[/C][C]0.1286[/C][C]0.0078[/C][C]0.7711[/C][C]0.724[/C][/ROW]
[ROW][C]57[/C][C]20739.3[/C][C]21482.7072[/C][C]19889.8007[/C][C]23075.6136[/C][C]0.1802[/C][C]0.9999[/C][C]0.9314[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]22268.3[/C][C]21313.4384[/C][C]19679.8812[/C][C]22946.9955[/C][C]0.126[/C][C]0.7545[/C][C]0.9308[/C][C]1[/C][/ROW]
[ROW][C]59[/C][C]21569[/C][C]20650.5753[/C][C]18981.2329[/C][C]22319.9176[/C][C]0.1404[/C][C]0.0288[/C][C]0.8106[/C][C]1[/C][/ROW]
[ROW][C]60[/C][C]17514.8[/C][C]18603.5639[/C][C]16904.2321[/C][C]20302.8956[/C][C]0.1046[/C][C]3e-04[/C][C]0.9668[/C][C]0.9668[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34096&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34096&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])
3617187.8-------
3717564.8-------
3817668.4-------
3920811.7-------
4017257.8-------
4118984.2-------
4220532.6-------
4317082.3-------
4416894.9-------
4520274.9-------
4620078.6-------
4719900.9-------
4817012.2-------
4919642.919282.40618004.153420560.65870.29020.99980.99580.9998
501902419113.687217837.890320389.48420.44520.20810.98680.9994
512169121452.416720158.609122746.22430.35890.99990.83411
5218835.919049.351417644.688420454.01440.38291e-040.99380.9978
5319873.419919.197418483.873621354.52130.47510.93050.89921
5421468.221367.758619899.928722835.58840.44670.9770.86761
5519406.818771.396817251.695320291.09820.20633e-040.98530.9884
5618385.317484.946215927.435819042.45670.12860.00780.77110.724
5720739.321482.707219889.800723075.61360.18020.99990.93141
5822268.321313.438419679.881222946.99550.1260.75450.93081
592156920650.575318981.232922319.91760.14040.02880.81061
6017514.818603.563916904.232120302.89560.10463e-040.96680.9668







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.03380.01870.0016129955.892210829.6577104.0656
500.0341-0.00474e-048043.797670.316425.8905
510.03080.01119e-0456921.9774743.498168.8731
520.0376-0.01129e-0445561.49673796.791461.6181
530.0368-0.00232e-042097.4041174.783713.2206
540.0350.00474e-0410088.4807840.706728.9949
550.04130.03380.0028403737.274633644.7729183.4251
560.04540.05150.0043810636.928767553.0774259.9097
570.0378-0.03460.0029552654.259946054.5217214.6032
580.03910.04480.0037911760.764175980.0637275.6448
590.04120.04450.0037843503.989970291.9992265.1264
600.0466-0.05850.00491185406.789698783.8991314.2991

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0338 & 0.0187 & 0.0016 & 129955.8922 & 10829.6577 & 104.0656 \tabularnewline
50 & 0.0341 & -0.0047 & 4e-04 & 8043.797 & 670.3164 & 25.8905 \tabularnewline
51 & 0.0308 & 0.0111 & 9e-04 & 56921.977 & 4743.4981 & 68.8731 \tabularnewline
52 & 0.0376 & -0.0112 & 9e-04 & 45561.4967 & 3796.7914 & 61.6181 \tabularnewline
53 & 0.0368 & -0.0023 & 2e-04 & 2097.4041 & 174.7837 & 13.2206 \tabularnewline
54 & 0.035 & 0.0047 & 4e-04 & 10088.4807 & 840.7067 & 28.9949 \tabularnewline
55 & 0.0413 & 0.0338 & 0.0028 & 403737.2746 & 33644.7729 & 183.4251 \tabularnewline
56 & 0.0454 & 0.0515 & 0.0043 & 810636.9287 & 67553.0774 & 259.9097 \tabularnewline
57 & 0.0378 & -0.0346 & 0.0029 & 552654.2599 & 46054.5217 & 214.6032 \tabularnewline
58 & 0.0391 & 0.0448 & 0.0037 & 911760.7641 & 75980.0637 & 275.6448 \tabularnewline
59 & 0.0412 & 0.0445 & 0.0037 & 843503.9899 & 70291.9992 & 265.1264 \tabularnewline
60 & 0.0466 & -0.0585 & 0.0049 & 1185406.7896 & 98783.8991 & 314.2991 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34096&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.0338[/C][C]0.0187[/C][C]0.0016[/C][C]129955.8922[/C][C]10829.6577[/C][C]104.0656[/C][/ROW]
[ROW][C]50[/C][C]0.0341[/C][C]-0.0047[/C][C]4e-04[/C][C]8043.797[/C][C]670.3164[/C][C]25.8905[/C][/ROW]
[ROW][C]51[/C][C]0.0308[/C][C]0.0111[/C][C]9e-04[/C][C]56921.977[/C][C]4743.4981[/C][C]68.8731[/C][/ROW]
[ROW][C]52[/C][C]0.0376[/C][C]-0.0112[/C][C]9e-04[/C][C]45561.4967[/C][C]3796.7914[/C][C]61.6181[/C][/ROW]
[ROW][C]53[/C][C]0.0368[/C][C]-0.0023[/C][C]2e-04[/C][C]2097.4041[/C][C]174.7837[/C][C]13.2206[/C][/ROW]
[ROW][C]54[/C][C]0.035[/C][C]0.0047[/C][C]4e-04[/C][C]10088.4807[/C][C]840.7067[/C][C]28.9949[/C][/ROW]
[ROW][C]55[/C][C]0.0413[/C][C]0.0338[/C][C]0.0028[/C][C]403737.2746[/C][C]33644.7729[/C][C]183.4251[/C][/ROW]
[ROW][C]56[/C][C]0.0454[/C][C]0.0515[/C][C]0.0043[/C][C]810636.9287[/C][C]67553.0774[/C][C]259.9097[/C][/ROW]
[ROW][C]57[/C][C]0.0378[/C][C]-0.0346[/C][C]0.0029[/C][C]552654.2599[/C][C]46054.5217[/C][C]214.6032[/C][/ROW]
[ROW][C]58[/C][C]0.0391[/C][C]0.0448[/C][C]0.0037[/C][C]911760.7641[/C][C]75980.0637[/C][C]275.6448[/C][/ROW]
[ROW][C]59[/C][C]0.0412[/C][C]0.0445[/C][C]0.0037[/C][C]843503.9899[/C][C]70291.9992[/C][C]265.1264[/C][/ROW]
[ROW][C]60[/C][C]0.0466[/C][C]-0.0585[/C][C]0.0049[/C][C]1185406.7896[/C][C]98783.8991[/C][C]314.2991[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34096&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34096&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.03380.01870.0016129955.892210829.6577104.0656
500.0341-0.00474e-048043.797670.316425.8905
510.03080.01119e-0456921.9774743.498168.8731
520.0376-0.01129e-0445561.49673796.791461.6181
530.0368-0.00232e-042097.4041174.783713.2206
540.0350.00474e-0410088.4807840.706728.9949
550.04130.03380.0028403737.274633644.7729183.4251
560.04540.05150.0043810636.928767553.0774259.9097
570.0378-0.03460.0029552654.259946054.5217214.6032
580.03910.04480.0037911760.764175980.0637275.6448
590.04120.04450.0037843503.989970291.9992265.1264
600.0466-0.05850.00491185406.789698783.8991314.2991



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