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, 29 Dec 2010 13:42:38 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/29/t129363001280xoo2qysvbobar.htm/, Retrieved Fri, 03 May 2024 06:30:19 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116826, Retrieved Fri, 03 May 2024 06:30:19 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact146
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [] [2010-12-26 12:20:32] [a2638725f7f7c6bd63902ba17eba666b]
-   PD  [ARIMA Backward Selection] [paper arima backw...] [2010-12-28 09:54:05] [df61ce38492c371f14c407a12b3bb2eb]
- RMP     [ARIMA Forecasting] [paper arima forec...] [2010-12-29 07:40:32] [df61ce38492c371f14c407a12b3bb2eb]
- R           [ARIMA Forecasting] [ARIMA Forecast] [2010-12-29 13:42:38] [46438e6f3f2a44df4f74f36960f4a09a] [Current]
Feedback Forum

Post a new message
Dataseries X:
16896.20
16698.00
19691.60
15930.70
17444.60
17699.40
15189.80
15672.70
17180.80
17664.90
17862.90
16162.30
17463.60
16772.10
19106.90
16721.30
18161.30
18509.90
17802.70
16409.90
17967.70
20286.60
19537.30
18021.90
20194.30
19049.60
20244.70
21473.30
19673.60
21053.20
20159.50
18203.60
21289.50
20432.30
17180.40
15816.80
15076.60
14531.60
15761.30
14345.50
13916.80
15496.80
14285.60
13597.30
16263.10
16773.30
15986.90
16842.60
16014.60
15878.60
18664.90
17690.50
17107.60
19165.70
17203.60
16579.00
18885.10




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116826&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116826&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116826&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[45])
3321289.5-------
3420432.3-------
3517180.4-------
3615816.8-------
3715076.6-------
3814531.6-------
3915761.3-------
4014345.5-------
4113916.8-------
4215496.8-------
4314285.6-------
4413597.3-------
4516263.1-------
4616773.315503.68213084.522317922.84180.15180.269200.2692
4715986.912805.54159921.599215689.48390.01530.00350.00150.0094
4816842.611049.17657498.53614599.81697e-040.00320.00420.002
4916014.610541.43795884.305615198.57020.01060.0040.02820.008
5015878.610154.17394956.822415351.52530.01540.01360.04940.0106
5118664.911154.8775212.500117097.2540.00660.05960.06430.046
5217690.59947.02463252.197216641.85210.01170.00540.09890.0322
5317107.69503.66752279.91216727.4230.01950.01320.11560.0333
5419165.710993.66273116.020418871.3050.0210.06410.13130.0949
5517203.69915.08771463.864318366.31110.04550.0160.15540.0705
56165799165.4662216.45218114.48040.05220.03920.16590.06
5718885.111819.66812319.634721319.70150.07250.16310.17960.1796

\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[45]) \tabularnewline
33 & 21289.5 & - & - & - & - & - & - & - \tabularnewline
34 & 20432.3 & - & - & - & - & - & - & - \tabularnewline
35 & 17180.4 & - & - & - & - & - & - & - \tabularnewline
36 & 15816.8 & - & - & - & - & - & - & - \tabularnewline
37 & 15076.6 & - & - & - & - & - & - & - \tabularnewline
38 & 14531.6 & - & - & - & - & - & - & - \tabularnewline
39 & 15761.3 & - & - & - & - & - & - & - \tabularnewline
40 & 14345.5 & - & - & - & - & - & - & - \tabularnewline
41 & 13916.8 & - & - & - & - & - & - & - \tabularnewline
42 & 15496.8 & - & - & - & - & - & - & - \tabularnewline
43 & 14285.6 & - & - & - & - & - & - & - \tabularnewline
44 & 13597.3 & - & - & - & - & - & - & - \tabularnewline
45 & 16263.1 & - & - & - & - & - & - & - \tabularnewline
46 & 16773.3 & 15503.682 & 13084.5223 & 17922.8418 & 0.1518 & 0.2692 & 0 & 0.2692 \tabularnewline
47 & 15986.9 & 12805.5415 & 9921.5992 & 15689.4839 & 0.0153 & 0.0035 & 0.0015 & 0.0094 \tabularnewline
48 & 16842.6 & 11049.1765 & 7498.536 & 14599.8169 & 7e-04 & 0.0032 & 0.0042 & 0.002 \tabularnewline
49 & 16014.6 & 10541.4379 & 5884.3056 & 15198.5702 & 0.0106 & 0.004 & 0.0282 & 0.008 \tabularnewline
50 & 15878.6 & 10154.1739 & 4956.8224 & 15351.5253 & 0.0154 & 0.0136 & 0.0494 & 0.0106 \tabularnewline
51 & 18664.9 & 11154.877 & 5212.5001 & 17097.254 & 0.0066 & 0.0596 & 0.0643 & 0.046 \tabularnewline
52 & 17690.5 & 9947.0246 & 3252.1972 & 16641.8521 & 0.0117 & 0.0054 & 0.0989 & 0.0322 \tabularnewline
53 & 17107.6 & 9503.6675 & 2279.912 & 16727.423 & 0.0195 & 0.0132 & 0.1156 & 0.0333 \tabularnewline
54 & 19165.7 & 10993.6627 & 3116.0204 & 18871.305 & 0.021 & 0.0641 & 0.1313 & 0.0949 \tabularnewline
55 & 17203.6 & 9915.0877 & 1463.8643 & 18366.3111 & 0.0455 & 0.016 & 0.1554 & 0.0705 \tabularnewline
56 & 16579 & 9165.4662 & 216.452 & 18114.4804 & 0.0522 & 0.0392 & 0.1659 & 0.06 \tabularnewline
57 & 18885.1 & 11819.6681 & 2319.6347 & 21319.7015 & 0.0725 & 0.1631 & 0.1796 & 0.1796 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116826&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[45])[/C][/ROW]
[ROW][C]33[/C][C]21289.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]20432.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]17180.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]15816.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]15076.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]14531.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]15761.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]14345.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]13916.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]15496.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]14285.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]13597.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]16263.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]16773.3[/C][C]15503.682[/C][C]13084.5223[/C][C]17922.8418[/C][C]0.1518[/C][C]0.2692[/C][C]0[/C][C]0.2692[/C][/ROW]
[ROW][C]47[/C][C]15986.9[/C][C]12805.5415[/C][C]9921.5992[/C][C]15689.4839[/C][C]0.0153[/C][C]0.0035[/C][C]0.0015[/C][C]0.0094[/C][/ROW]
[ROW][C]48[/C][C]16842.6[/C][C]11049.1765[/C][C]7498.536[/C][C]14599.8169[/C][C]7e-04[/C][C]0.0032[/C][C]0.0042[/C][C]0.002[/C][/ROW]
[ROW][C]49[/C][C]16014.6[/C][C]10541.4379[/C][C]5884.3056[/C][C]15198.5702[/C][C]0.0106[/C][C]0.004[/C][C]0.0282[/C][C]0.008[/C][/ROW]
[ROW][C]50[/C][C]15878.6[/C][C]10154.1739[/C][C]4956.8224[/C][C]15351.5253[/C][C]0.0154[/C][C]0.0136[/C][C]0.0494[/C][C]0.0106[/C][/ROW]
[ROW][C]51[/C][C]18664.9[/C][C]11154.877[/C][C]5212.5001[/C][C]17097.254[/C][C]0.0066[/C][C]0.0596[/C][C]0.0643[/C][C]0.046[/C][/ROW]
[ROW][C]52[/C][C]17690.5[/C][C]9947.0246[/C][C]3252.1972[/C][C]16641.8521[/C][C]0.0117[/C][C]0.0054[/C][C]0.0989[/C][C]0.0322[/C][/ROW]
[ROW][C]53[/C][C]17107.6[/C][C]9503.6675[/C][C]2279.912[/C][C]16727.423[/C][C]0.0195[/C][C]0.0132[/C][C]0.1156[/C][C]0.0333[/C][/ROW]
[ROW][C]54[/C][C]19165.7[/C][C]10993.6627[/C][C]3116.0204[/C][C]18871.305[/C][C]0.021[/C][C]0.0641[/C][C]0.1313[/C][C]0.0949[/C][/ROW]
[ROW][C]55[/C][C]17203.6[/C][C]9915.0877[/C][C]1463.8643[/C][C]18366.3111[/C][C]0.0455[/C][C]0.016[/C][C]0.1554[/C][C]0.0705[/C][/ROW]
[ROW][C]56[/C][C]16579[/C][C]9165.4662[/C][C]216.452[/C][C]18114.4804[/C][C]0.0522[/C][C]0.0392[/C][C]0.1659[/C][C]0.06[/C][/ROW]
[ROW][C]57[/C][C]18885.1[/C][C]11819.6681[/C][C]2319.6347[/C][C]21319.7015[/C][C]0.0725[/C][C]0.1631[/C][C]0.1796[/C][C]0.1796[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116826&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116826&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[45])
3321289.5-------
3420432.3-------
3517180.4-------
3615816.8-------
3715076.6-------
3814531.6-------
3915761.3-------
4014345.5-------
4113916.8-------
4215496.8-------
4314285.6-------
4413597.3-------
4516263.1-------
4616773.315503.68213084.522317922.84180.15180.269200.2692
4715986.912805.54159921.599215689.48390.01530.00350.00150.0094
4816842.611049.17657498.53614599.81697e-040.00320.00420.002
4916014.610541.43795884.305615198.57020.01060.0040.02820.008
5015878.610154.17394956.822415351.52530.01540.01360.04940.0106
5118664.911154.8775212.500117097.2540.00660.05960.06430.046
5217690.59947.02463252.197216641.85210.01170.00540.09890.0322
5317107.69503.66752279.91216727.4230.01950.01320.11560.0333
5419165.710993.66273116.020418871.3050.0210.06410.13130.0949
5517203.69915.08771463.864318366.31110.04550.0160.15540.0705
56165799165.4662216.45218114.48040.05220.03920.16590.06
5718885.111819.66812319.634721319.70150.07250.16310.17960.1796







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
460.07960.081901611929.762300
470.11490.24840.165210121041.67415866485.71822422.0829
480.1640.52430.284933563756.245615098909.22733885.7315
490.22540.51920.343529955503.060718813057.68574337.4022
500.26110.56380.387532769054.6221604257.07254648.038
510.27180.67330.435156400445.166127403621.75485234.8469
520.34340.77850.484259961411.123232054734.52175661.6901
530.38780.80010.523757819789.398735275366.38135939.3069
540.36560.74330.548166782194.066338776125.0136227.0479
550.43490.73510.566853122411.28140210753.63986341.195
560.49820.80890.588854960483.5241551638.17436446.056
570.41010.59780.589549920328.354442249029.02276499.9253

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
46 & 0.0796 & 0.0819 & 0 & 1611929.7623 & 0 & 0 \tabularnewline
47 & 0.1149 & 0.2484 & 0.1652 & 10121041.6741 & 5866485.7182 & 2422.0829 \tabularnewline
48 & 0.164 & 0.5243 & 0.2849 & 33563756.2456 & 15098909.2273 & 3885.7315 \tabularnewline
49 & 0.2254 & 0.5192 & 0.3435 & 29955503.0607 & 18813057.6857 & 4337.4022 \tabularnewline
50 & 0.2611 & 0.5638 & 0.3875 & 32769054.62 & 21604257.0725 & 4648.038 \tabularnewline
51 & 0.2718 & 0.6733 & 0.4351 & 56400445.1661 & 27403621.7548 & 5234.8469 \tabularnewline
52 & 0.3434 & 0.7785 & 0.4842 & 59961411.1232 & 32054734.5217 & 5661.6901 \tabularnewline
53 & 0.3878 & 0.8001 & 0.5237 & 57819789.3987 & 35275366.3813 & 5939.3069 \tabularnewline
54 & 0.3656 & 0.7433 & 0.5481 & 66782194.0663 & 38776125.013 & 6227.0479 \tabularnewline
55 & 0.4349 & 0.7351 & 0.5668 & 53122411.281 & 40210753.6398 & 6341.195 \tabularnewline
56 & 0.4982 & 0.8089 & 0.5888 & 54960483.52 & 41551638.1743 & 6446.056 \tabularnewline
57 & 0.4101 & 0.5978 & 0.5895 & 49920328.3544 & 42249029.0227 & 6499.9253 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116826&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]46[/C][C]0.0796[/C][C]0.0819[/C][C]0[/C][C]1611929.7623[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]47[/C][C]0.1149[/C][C]0.2484[/C][C]0.1652[/C][C]10121041.6741[/C][C]5866485.7182[/C][C]2422.0829[/C][/ROW]
[ROW][C]48[/C][C]0.164[/C][C]0.5243[/C][C]0.2849[/C][C]33563756.2456[/C][C]15098909.2273[/C][C]3885.7315[/C][/ROW]
[ROW][C]49[/C][C]0.2254[/C][C]0.5192[/C][C]0.3435[/C][C]29955503.0607[/C][C]18813057.6857[/C][C]4337.4022[/C][/ROW]
[ROW][C]50[/C][C]0.2611[/C][C]0.5638[/C][C]0.3875[/C][C]32769054.62[/C][C]21604257.0725[/C][C]4648.038[/C][/ROW]
[ROW][C]51[/C][C]0.2718[/C][C]0.6733[/C][C]0.4351[/C][C]56400445.1661[/C][C]27403621.7548[/C][C]5234.8469[/C][/ROW]
[ROW][C]52[/C][C]0.3434[/C][C]0.7785[/C][C]0.4842[/C][C]59961411.1232[/C][C]32054734.5217[/C][C]5661.6901[/C][/ROW]
[ROW][C]53[/C][C]0.3878[/C][C]0.8001[/C][C]0.5237[/C][C]57819789.3987[/C][C]35275366.3813[/C][C]5939.3069[/C][/ROW]
[ROW][C]54[/C][C]0.3656[/C][C]0.7433[/C][C]0.5481[/C][C]66782194.0663[/C][C]38776125.013[/C][C]6227.0479[/C][/ROW]
[ROW][C]55[/C][C]0.4349[/C][C]0.7351[/C][C]0.5668[/C][C]53122411.281[/C][C]40210753.6398[/C][C]6341.195[/C][/ROW]
[ROW][C]56[/C][C]0.4982[/C][C]0.8089[/C][C]0.5888[/C][C]54960483.52[/C][C]41551638.1743[/C][C]6446.056[/C][/ROW]
[ROW][C]57[/C][C]0.4101[/C][C]0.5978[/C][C]0.5895[/C][C]49920328.3544[/C][C]42249029.0227[/C][C]6499.9253[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116826&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116826&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
460.07960.081901611929.762300
470.11490.24840.165210121041.67415866485.71822422.0829
480.1640.52430.284933563756.245615098909.22733885.7315
490.22540.51920.343529955503.060718813057.68574337.4022
500.26110.56380.387532769054.6221604257.07254648.038
510.27180.67330.435156400445.166127403621.75485234.8469
520.34340.77850.484259961411.123232054734.52175661.6901
530.38780.80010.523757819789.398735275366.38135939.3069
540.36560.74330.548166782194.066338776125.0136227.0479
550.43490.73510.566853122411.28140210753.63986341.195
560.49820.80890.588854960483.5241551638.17436446.056
570.41010.59780.589549920328.354442249029.02276499.9253



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