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, 10 Dec 2008 13:34:08 -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/10/t12289415704b6rmc35ex6pu22.htm/, Retrieved Fri, 17 May 2024 05:45:01 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=32105, Retrieved Fri, 17 May 2024 05:45:01 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact187
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2008-12-10 20:34:08] [19ef54504342c1b076371d395a2ab19f] [Current]
Feedback Forum

Post a new message
Dataseries X:
12300.00
12092.80
12380.80
12196.90
9455.00
13168.00
13427.90
11980.50
11884.80
11691.70
12233.80
14341.40
13130.70
12421.10
14285.80
12864.60
11160.20
14316.20
14388.70
14013.90
13419.00
12769.60
13315.50
15332.90
14243.00
13824.40
14962.90
13202.90
12199.00
15508.90
14199.80
15169.60
14058.00
13786.20
14147.90
16541.70
13587.50
15582.40
15802.80
14130.50
12923.20
15612.20
16033.70
16036.60
14037.80
15330.60
15038.30
17401.80
14992.50
16043.70
16929.60
15921.30
14417.20
15961.00
17851.90
16483.90
14215.50
17429.70
17839.50
17629.20




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32105&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'Gwilym Jenkins' @ 72.249.127.135







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])
3616541.7-------
3713587.5-------
3815582.4-------
3915802.8-------
4014130.5-------
4112923.2-------
4215612.2-------
4316033.7-------
4416036.6-------
4514037.8-------
4615330.6-------
4715038.3-------
4817401.8-------
4914992.514414.666812696.940116132.39350.25483e-040.82743e-04
5016043.716293.773713864.541318723.00610.420.85310.7170.1857
5116929.616776.18313800.993119751.37290.45970.68530.73930.3401
5215921.315223.395411787.94218658.84880.34530.16520.73350.107
5314417.213769.10919928.155417610.06280.37040.1360.6670.0319
541596116406.888812199.334920614.44280.41770.8230.64440.3215
5517851.917308.501312763.823621853.1790.40740.71940.70880.484
5616483.916840.358511981.893721698.82330.44280.34160.62710.4104
5714215.515029.21679876.036520182.39680.37850.290.64690.1834
5817429.716180.039510748.110721611.96830.3260.76080.62040.3297
5917839.515956.421610259.366721653.47660.25850.30610.62390.3095
6017629.218186.791212236.411424137.17110.42710.54550.6020.602

\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 & 16541.7 & - & - & - & - & - & - & - \tabularnewline
37 & 13587.5 & - & - & - & - & - & - & - \tabularnewline
38 & 15582.4 & - & - & - & - & - & - & - \tabularnewline
39 & 15802.8 & - & - & - & - & - & - & - \tabularnewline
40 & 14130.5 & - & - & - & - & - & - & - \tabularnewline
41 & 12923.2 & - & - & - & - & - & - & - \tabularnewline
42 & 15612.2 & - & - & - & - & - & - & - \tabularnewline
43 & 16033.7 & - & - & - & - & - & - & - \tabularnewline
44 & 16036.6 & - & - & - & - & - & - & - \tabularnewline
45 & 14037.8 & - & - & - & - & - & - & - \tabularnewline
46 & 15330.6 & - & - & - & - & - & - & - \tabularnewline
47 & 15038.3 & - & - & - & - & - & - & - \tabularnewline
48 & 17401.8 & - & - & - & - & - & - & - \tabularnewline
49 & 14992.5 & 14414.6668 & 12696.9401 & 16132.3935 & 0.2548 & 3e-04 & 0.8274 & 3e-04 \tabularnewline
50 & 16043.7 & 16293.7737 & 13864.5413 & 18723.0061 & 0.42 & 0.8531 & 0.717 & 0.1857 \tabularnewline
51 & 16929.6 & 16776.183 & 13800.9931 & 19751.3729 & 0.4597 & 0.6853 & 0.7393 & 0.3401 \tabularnewline
52 & 15921.3 & 15223.3954 & 11787.942 & 18658.8488 & 0.3453 & 0.1652 & 0.7335 & 0.107 \tabularnewline
53 & 14417.2 & 13769.1091 & 9928.1554 & 17610.0628 & 0.3704 & 0.136 & 0.667 & 0.0319 \tabularnewline
54 & 15961 & 16406.8888 & 12199.3349 & 20614.4428 & 0.4177 & 0.823 & 0.6444 & 0.3215 \tabularnewline
55 & 17851.9 & 17308.5013 & 12763.8236 & 21853.179 & 0.4074 & 0.7194 & 0.7088 & 0.484 \tabularnewline
56 & 16483.9 & 16840.3585 & 11981.8937 & 21698.8233 & 0.4428 & 0.3416 & 0.6271 & 0.4104 \tabularnewline
57 & 14215.5 & 15029.2167 & 9876.0365 & 20182.3968 & 0.3785 & 0.29 & 0.6469 & 0.1834 \tabularnewline
58 & 17429.7 & 16180.0395 & 10748.1107 & 21611.9683 & 0.326 & 0.7608 & 0.6204 & 0.3297 \tabularnewline
59 & 17839.5 & 15956.4216 & 10259.3667 & 21653.4766 & 0.2585 & 0.3061 & 0.6239 & 0.3095 \tabularnewline
60 & 17629.2 & 18186.7912 & 12236.4114 & 24137.1711 & 0.4271 & 0.5455 & 0.602 & 0.602 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32105&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]16541.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]13587.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]15582.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]15802.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]14130.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]12923.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]15612.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]16033.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]16036.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]14037.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]15330.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]15038.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]17401.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]14992.5[/C][C]14414.6668[/C][C]12696.9401[/C][C]16132.3935[/C][C]0.2548[/C][C]3e-04[/C][C]0.8274[/C][C]3e-04[/C][/ROW]
[ROW][C]50[/C][C]16043.7[/C][C]16293.7737[/C][C]13864.5413[/C][C]18723.0061[/C][C]0.42[/C][C]0.8531[/C][C]0.717[/C][C]0.1857[/C][/ROW]
[ROW][C]51[/C][C]16929.6[/C][C]16776.183[/C][C]13800.9931[/C][C]19751.3729[/C][C]0.4597[/C][C]0.6853[/C][C]0.7393[/C][C]0.3401[/C][/ROW]
[ROW][C]52[/C][C]15921.3[/C][C]15223.3954[/C][C]11787.942[/C][C]18658.8488[/C][C]0.3453[/C][C]0.1652[/C][C]0.7335[/C][C]0.107[/C][/ROW]
[ROW][C]53[/C][C]14417.2[/C][C]13769.1091[/C][C]9928.1554[/C][C]17610.0628[/C][C]0.3704[/C][C]0.136[/C][C]0.667[/C][C]0.0319[/C][/ROW]
[ROW][C]54[/C][C]15961[/C][C]16406.8888[/C][C]12199.3349[/C][C]20614.4428[/C][C]0.4177[/C][C]0.823[/C][C]0.6444[/C][C]0.3215[/C][/ROW]
[ROW][C]55[/C][C]17851.9[/C][C]17308.5013[/C][C]12763.8236[/C][C]21853.179[/C][C]0.4074[/C][C]0.7194[/C][C]0.7088[/C][C]0.484[/C][/ROW]
[ROW][C]56[/C][C]16483.9[/C][C]16840.3585[/C][C]11981.8937[/C][C]21698.8233[/C][C]0.4428[/C][C]0.3416[/C][C]0.6271[/C][C]0.4104[/C][/ROW]
[ROW][C]57[/C][C]14215.5[/C][C]15029.2167[/C][C]9876.0365[/C][C]20182.3968[/C][C]0.3785[/C][C]0.29[/C][C]0.6469[/C][C]0.1834[/C][/ROW]
[ROW][C]58[/C][C]17429.7[/C][C]16180.0395[/C][C]10748.1107[/C][C]21611.9683[/C][C]0.326[/C][C]0.7608[/C][C]0.6204[/C][C]0.3297[/C][/ROW]
[ROW][C]59[/C][C]17839.5[/C][C]15956.4216[/C][C]10259.3667[/C][C]21653.4766[/C][C]0.2585[/C][C]0.3061[/C][C]0.6239[/C][C]0.3095[/C][/ROW]
[ROW][C]60[/C][C]17629.2[/C][C]18186.7912[/C][C]12236.4114[/C][C]24137.1711[/C][C]0.4271[/C][C]0.5455[/C][C]0.602[/C][C]0.602[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32105&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32105&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])
3616541.7-------
3713587.5-------
3815582.4-------
3915802.8-------
4014130.5-------
4112923.2-------
4215612.2-------
4316033.7-------
4416036.6-------
4514037.8-------
4615330.6-------
4715038.3-------
4817401.8-------
4914992.514414.666812696.940116132.39350.25483e-040.82743e-04
5016043.716293.773713864.541318723.00610.420.85310.7170.1857
5116929.616776.18313800.993119751.37290.45970.68530.73930.3401
5215921.315223.395411787.94218658.84880.34530.16520.73350.107
5314417.213769.10919928.155417610.06280.37040.1360.6670.0319
541596116406.888812199.334920614.44280.41770.8230.64440.3215
5517851.917308.501312763.823621853.1790.40740.71940.70880.484
5616483.916840.358511981.893721698.82330.44280.34160.62710.4104
5714215.515029.21679876.036520182.39680.37850.290.64690.1834
5817429.716180.039510748.110721611.96830.3260.76080.62040.3297
5917839.515956.421610259.366721653.47660.25850.30610.62390.3095
6017629.218186.791212236.411424137.17110.42710.54550.6020.602







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.06080.04010.0033333891.172227824.2643166.8061
500.0761-0.01530.001362536.87495211.406272.1901
510.09050.00918e-0423536.77731961.398144.2877
520.11510.04580.0038487070.794940589.2329201.4677
530.14230.04710.0039420021.823735001.8186187.0877
540.1308-0.02720.0023198816.846316568.0705128.717
550.1340.03140.0026295282.172924606.8477156.8657
560.1472-0.02120.0018127062.679810588.5566102.9007
570.1749-0.05410.0045662134.829555177.9025234.8998
580.17130.07720.00641561651.4121130137.6177360.7459
590.18220.1180.00983545984.0912295498.6743543.5979
600.1669-0.03070.0026310907.990125908.9992160.9627

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0608 & 0.0401 & 0.0033 & 333891.1722 & 27824.2643 & 166.8061 \tabularnewline
50 & 0.0761 & -0.0153 & 0.0013 & 62536.8749 & 5211.4062 & 72.1901 \tabularnewline
51 & 0.0905 & 0.0091 & 8e-04 & 23536.7773 & 1961.3981 & 44.2877 \tabularnewline
52 & 0.1151 & 0.0458 & 0.0038 & 487070.7949 & 40589.2329 & 201.4677 \tabularnewline
53 & 0.1423 & 0.0471 & 0.0039 & 420021.8237 & 35001.8186 & 187.0877 \tabularnewline
54 & 0.1308 & -0.0272 & 0.0023 & 198816.8463 & 16568.0705 & 128.717 \tabularnewline
55 & 0.134 & 0.0314 & 0.0026 & 295282.1729 & 24606.8477 & 156.8657 \tabularnewline
56 & 0.1472 & -0.0212 & 0.0018 & 127062.6798 & 10588.5566 & 102.9007 \tabularnewline
57 & 0.1749 & -0.0541 & 0.0045 & 662134.8295 & 55177.9025 & 234.8998 \tabularnewline
58 & 0.1713 & 0.0772 & 0.0064 & 1561651.4121 & 130137.6177 & 360.7459 \tabularnewline
59 & 0.1822 & 0.118 & 0.0098 & 3545984.0912 & 295498.6743 & 543.5979 \tabularnewline
60 & 0.1669 & -0.0307 & 0.0026 & 310907.9901 & 25908.9992 & 160.9627 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32105&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.0608[/C][C]0.0401[/C][C]0.0033[/C][C]333891.1722[/C][C]27824.2643[/C][C]166.8061[/C][/ROW]
[ROW][C]50[/C][C]0.0761[/C][C]-0.0153[/C][C]0.0013[/C][C]62536.8749[/C][C]5211.4062[/C][C]72.1901[/C][/ROW]
[ROW][C]51[/C][C]0.0905[/C][C]0.0091[/C][C]8e-04[/C][C]23536.7773[/C][C]1961.3981[/C][C]44.2877[/C][/ROW]
[ROW][C]52[/C][C]0.1151[/C][C]0.0458[/C][C]0.0038[/C][C]487070.7949[/C][C]40589.2329[/C][C]201.4677[/C][/ROW]
[ROW][C]53[/C][C]0.1423[/C][C]0.0471[/C][C]0.0039[/C][C]420021.8237[/C][C]35001.8186[/C][C]187.0877[/C][/ROW]
[ROW][C]54[/C][C]0.1308[/C][C]-0.0272[/C][C]0.0023[/C][C]198816.8463[/C][C]16568.0705[/C][C]128.717[/C][/ROW]
[ROW][C]55[/C][C]0.134[/C][C]0.0314[/C][C]0.0026[/C][C]295282.1729[/C][C]24606.8477[/C][C]156.8657[/C][/ROW]
[ROW][C]56[/C][C]0.1472[/C][C]-0.0212[/C][C]0.0018[/C][C]127062.6798[/C][C]10588.5566[/C][C]102.9007[/C][/ROW]
[ROW][C]57[/C][C]0.1749[/C][C]-0.0541[/C][C]0.0045[/C][C]662134.8295[/C][C]55177.9025[/C][C]234.8998[/C][/ROW]
[ROW][C]58[/C][C]0.1713[/C][C]0.0772[/C][C]0.0064[/C][C]1561651.4121[/C][C]130137.6177[/C][C]360.7459[/C][/ROW]
[ROW][C]59[/C][C]0.1822[/C][C]0.118[/C][C]0.0098[/C][C]3545984.0912[/C][C]295498.6743[/C][C]543.5979[/C][/ROW]
[ROW][C]60[/C][C]0.1669[/C][C]-0.0307[/C][C]0.0026[/C][C]310907.9901[/C][C]25908.9992[/C][C]160.9627[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32105&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32105&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.06080.04010.0033333891.172227824.2643166.8061
500.0761-0.01530.001362536.87495211.406272.1901
510.09050.00918e-0423536.77731961.398144.2877
520.11510.04580.0038487070.794940589.2329201.4677
530.14230.04710.0039420021.823735001.8186187.0877
540.1308-0.02720.0023198816.846316568.0705128.717
550.1340.03140.0026295282.172924606.8477156.8657
560.1472-0.02120.0018127062.679810588.5566102.9007
570.1749-0.05410.0045662134.829555177.9025234.8998
580.17130.07720.00641561651.4121130137.6177360.7459
590.18220.1180.00983545984.0912295498.6743543.5979
600.1669-0.03070.0026310907.990125908.9992160.9627



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