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 08:51:17 -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/t12294429813ih6k4vgtcnm6lk.htm/, Retrieved Wed, 15 May 2024 09:16:47 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33992, Retrieved Wed, 15 May 2024 09:16:47 +0000
QR Codes:

Original text written by user:In samenwerking met Katrien Bourdiaudhy, Stéphanie Claes en Kevin Engels
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact189
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [blog 1e tijdreeks...] [2008-10-13 19:23:31] [7173087adebe3e3a714c80ea2417b3eb]
-   PD  [Univariate Data Series] [tijdreeksen opnie...] [2008-10-19 17:18:46] [7173087adebe3e3a714c80ea2417b3eb]
- RMP     [Central Tendency] [tijdreeks 2 centr...] [2008-10-19 17:39:42] [7173087adebe3e3a714c80ea2417b3eb]
- RMP       [(Partial) Autocorrelation Function] [ACF aanvragen hyp...] [2008-12-16 14:51:47] [7d3039e6253bb5fb3b26df1537d500b4]
- RMP           [ARIMA Forecasting] [Arima forecasting...] [2008-12-16 15:51:17] [35348cd8592af0baf5f138bd59921307] [Current]
-   P             [ARIMA Forecasting] [Arima forecast aa...] [2008-12-18 11:33:58] [7d3039e6253bb5fb3b26df1537d500b4]
Feedback Forum

Post a new message
Dataseries X:
2400
4700
3700
2900
2800
3000
3100
3700
3000
2000
1900
1900
1800
3400
3800
2800
3100
2100
2000
2500
2400
2500
3300
3100
3700
5600
3700
2900
4000
2900
2400
3300
3800
4400
4000
3100
2700
5200
4600
3700
3200
2400
2200
3200
3100
2300
2500
2900
2700
5000
3500
3000
3800
2800
2400
2700
2800
2700
2600
3100




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=33992&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=33992&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33992&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])
363100-------
372700-------
385200-------
394600-------
403700-------
413200-------
422400-------
432200-------
443200-------
453100-------
462300-------
472500-------
482900-------
4927002894.36611803.77293984.95930.36340.4960.63660.496
5050004453.39682964.16935942.62430.23590.98950.16290.9795
5135003746.53892147.45885345.61890.38130.06220.14780.8503
5230003032.64941351.10344714.19540.48480.2930.21830.5614
5338003188.93431404.03294973.83570.25110.58220.49520.6245
5428002543.3161672.52734414.10490.3940.0940.55970.3543
5524002367.2987436.7494297.84850.48680.33020.56740.2943
5627003020.34811041.92674998.76960.37550.73060.42940.5475
5728002920.117900.53644939.69750.45360.58460.43070.5078
5827002670.5367617.2964723.77740.48880.45080.63820.4133
5926002757.4195677.79374837.04530.4410.52160.59580.4466
6031002553.1084456.81674649.40010.30460.48250.37280.3728

\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 & 3100 & - & - & - & - & - & - & - \tabularnewline
37 & 2700 & - & - & - & - & - & - & - \tabularnewline
38 & 5200 & - & - & - & - & - & - & - \tabularnewline
39 & 4600 & - & - & - & - & - & - & - \tabularnewline
40 & 3700 & - & - & - & - & - & - & - \tabularnewline
41 & 3200 & - & - & - & - & - & - & - \tabularnewline
42 & 2400 & - & - & - & - & - & - & - \tabularnewline
43 & 2200 & - & - & - & - & - & - & - \tabularnewline
44 & 3200 & - & - & - & - & - & - & - \tabularnewline
45 & 3100 & - & - & - & - & - & - & - \tabularnewline
46 & 2300 & - & - & - & - & - & - & - \tabularnewline
47 & 2500 & - & - & - & - & - & - & - \tabularnewline
48 & 2900 & - & - & - & - & - & - & - \tabularnewline
49 & 2700 & 2894.3661 & 1803.7729 & 3984.9593 & 0.3634 & 0.496 & 0.6366 & 0.496 \tabularnewline
50 & 5000 & 4453.3968 & 2964.1693 & 5942.6243 & 0.2359 & 0.9895 & 0.1629 & 0.9795 \tabularnewline
51 & 3500 & 3746.5389 & 2147.4588 & 5345.6189 & 0.3813 & 0.0622 & 0.1478 & 0.8503 \tabularnewline
52 & 3000 & 3032.6494 & 1351.1034 & 4714.1954 & 0.4848 & 0.293 & 0.2183 & 0.5614 \tabularnewline
53 & 3800 & 3188.9343 & 1404.0329 & 4973.8357 & 0.2511 & 0.5822 & 0.4952 & 0.6245 \tabularnewline
54 & 2800 & 2543.3161 & 672.5273 & 4414.1049 & 0.394 & 0.094 & 0.5597 & 0.3543 \tabularnewline
55 & 2400 & 2367.2987 & 436.749 & 4297.8485 & 0.4868 & 0.3302 & 0.5674 & 0.2943 \tabularnewline
56 & 2700 & 3020.3481 & 1041.9267 & 4998.7696 & 0.3755 & 0.7306 & 0.4294 & 0.5475 \tabularnewline
57 & 2800 & 2920.117 & 900.5364 & 4939.6975 & 0.4536 & 0.5846 & 0.4307 & 0.5078 \tabularnewline
58 & 2700 & 2670.5367 & 617.296 & 4723.7774 & 0.4888 & 0.4508 & 0.6382 & 0.4133 \tabularnewline
59 & 2600 & 2757.4195 & 677.7937 & 4837.0453 & 0.441 & 0.5216 & 0.5958 & 0.4466 \tabularnewline
60 & 3100 & 2553.1084 & 456.8167 & 4649.4001 & 0.3046 & 0.4825 & 0.3728 & 0.3728 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33992&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]3100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]2700[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]5200[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]4600[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]3700[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]3200[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]2400[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]2200[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]3200[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]3100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]2300[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]2500[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]2900[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]2700[/C][C]2894.3661[/C][C]1803.7729[/C][C]3984.9593[/C][C]0.3634[/C][C]0.496[/C][C]0.6366[/C][C]0.496[/C][/ROW]
[ROW][C]50[/C][C]5000[/C][C]4453.3968[/C][C]2964.1693[/C][C]5942.6243[/C][C]0.2359[/C][C]0.9895[/C][C]0.1629[/C][C]0.9795[/C][/ROW]
[ROW][C]51[/C][C]3500[/C][C]3746.5389[/C][C]2147.4588[/C][C]5345.6189[/C][C]0.3813[/C][C]0.0622[/C][C]0.1478[/C][C]0.8503[/C][/ROW]
[ROW][C]52[/C][C]3000[/C][C]3032.6494[/C][C]1351.1034[/C][C]4714.1954[/C][C]0.4848[/C][C]0.293[/C][C]0.2183[/C][C]0.5614[/C][/ROW]
[ROW][C]53[/C][C]3800[/C][C]3188.9343[/C][C]1404.0329[/C][C]4973.8357[/C][C]0.2511[/C][C]0.5822[/C][C]0.4952[/C][C]0.6245[/C][/ROW]
[ROW][C]54[/C][C]2800[/C][C]2543.3161[/C][C]672.5273[/C][C]4414.1049[/C][C]0.394[/C][C]0.094[/C][C]0.5597[/C][C]0.3543[/C][/ROW]
[ROW][C]55[/C][C]2400[/C][C]2367.2987[/C][C]436.749[/C][C]4297.8485[/C][C]0.4868[/C][C]0.3302[/C][C]0.5674[/C][C]0.2943[/C][/ROW]
[ROW][C]56[/C][C]2700[/C][C]3020.3481[/C][C]1041.9267[/C][C]4998.7696[/C][C]0.3755[/C][C]0.7306[/C][C]0.4294[/C][C]0.5475[/C][/ROW]
[ROW][C]57[/C][C]2800[/C][C]2920.117[/C][C]900.5364[/C][C]4939.6975[/C][C]0.4536[/C][C]0.5846[/C][C]0.4307[/C][C]0.5078[/C][/ROW]
[ROW][C]58[/C][C]2700[/C][C]2670.5367[/C][C]617.296[/C][C]4723.7774[/C][C]0.4888[/C][C]0.4508[/C][C]0.6382[/C][C]0.4133[/C][/ROW]
[ROW][C]59[/C][C]2600[/C][C]2757.4195[/C][C]677.7937[/C][C]4837.0453[/C][C]0.441[/C][C]0.5216[/C][C]0.5958[/C][C]0.4466[/C][/ROW]
[ROW][C]60[/C][C]3100[/C][C]2553.1084[/C][C]456.8167[/C][C]4649.4001[/C][C]0.3046[/C][C]0.4825[/C][C]0.3728[/C][C]0.3728[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33992&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33992&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])
363100-------
372700-------
385200-------
394600-------
403700-------
413200-------
422400-------
432200-------
443200-------
453100-------
462300-------
472500-------
482900-------
4927002894.36611803.77293984.95930.36340.4960.63660.496
5050004453.39682964.16935942.62430.23590.98950.16290.9795
5135003746.53892147.45885345.61890.38130.06220.14780.8503
5230003032.64941351.10344714.19540.48480.2930.21830.5614
5338003188.93431404.03294973.83570.25110.58220.49520.6245
5428002543.3161672.52734414.10490.3940.0940.55970.3543
5524002367.2987436.7494297.84850.48680.33020.56740.2943
5627003020.34811041.92674998.76960.37550.73060.42940.5475
5728002920.117900.53644939.69750.45360.58460.43070.5078
5827002670.5367617.2964723.77740.48880.45080.63820.4133
5926002757.4195677.79374837.04530.4410.52160.59580.4466
6031002553.1084456.81674649.40010.30460.48250.37280.3728







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.1922-0.06720.005637778.16943148.180856.1087
500.17060.12270.0102298775.06224897.9218157.7908
510.2178-0.06580.005560781.4065065.117271.1696
520.2829-0.01089e-041065.983488.8329.4251
530.28560.19160.016373401.303231116.7753176.3995
540.37530.10090.008465886.60885490.550774.0983
550.41610.01380.00121069.372789.11449.44
560.3342-0.10610.0088102622.92158551.910192.4765
570.3529-0.04110.003414428.08571202.340534.6748
580.39230.0119e-04868.086472.34058.5053
590.3848-0.05710.004824780.90122065.075145.4431
600.41890.21420.0179299090.430224924.2025157.874

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1922 & -0.0672 & 0.0056 & 37778.1694 & 3148.1808 & 56.1087 \tabularnewline
50 & 0.1706 & 0.1227 & 0.0102 & 298775.062 & 24897.9218 & 157.7908 \tabularnewline
51 & 0.2178 & -0.0658 & 0.0055 & 60781.406 & 5065.1172 & 71.1696 \tabularnewline
52 & 0.2829 & -0.0108 & 9e-04 & 1065.9834 & 88.832 & 9.4251 \tabularnewline
53 & 0.2856 & 0.1916 & 0.016 & 373401.3032 & 31116.7753 & 176.3995 \tabularnewline
54 & 0.3753 & 0.1009 & 0.0084 & 65886.6088 & 5490.5507 & 74.0983 \tabularnewline
55 & 0.4161 & 0.0138 & 0.0012 & 1069.3727 & 89.1144 & 9.44 \tabularnewline
56 & 0.3342 & -0.1061 & 0.0088 & 102622.9215 & 8551.9101 & 92.4765 \tabularnewline
57 & 0.3529 & -0.0411 & 0.0034 & 14428.0857 & 1202.3405 & 34.6748 \tabularnewline
58 & 0.3923 & 0.011 & 9e-04 & 868.0864 & 72.3405 & 8.5053 \tabularnewline
59 & 0.3848 & -0.0571 & 0.0048 & 24780.9012 & 2065.0751 & 45.4431 \tabularnewline
60 & 0.4189 & 0.2142 & 0.0179 & 299090.4302 & 24924.2025 & 157.874 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33992&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.1922[/C][C]-0.0672[/C][C]0.0056[/C][C]37778.1694[/C][C]3148.1808[/C][C]56.1087[/C][/ROW]
[ROW][C]50[/C][C]0.1706[/C][C]0.1227[/C][C]0.0102[/C][C]298775.062[/C][C]24897.9218[/C][C]157.7908[/C][/ROW]
[ROW][C]51[/C][C]0.2178[/C][C]-0.0658[/C][C]0.0055[/C][C]60781.406[/C][C]5065.1172[/C][C]71.1696[/C][/ROW]
[ROW][C]52[/C][C]0.2829[/C][C]-0.0108[/C][C]9e-04[/C][C]1065.9834[/C][C]88.832[/C][C]9.4251[/C][/ROW]
[ROW][C]53[/C][C]0.2856[/C][C]0.1916[/C][C]0.016[/C][C]373401.3032[/C][C]31116.7753[/C][C]176.3995[/C][/ROW]
[ROW][C]54[/C][C]0.3753[/C][C]0.1009[/C][C]0.0084[/C][C]65886.6088[/C][C]5490.5507[/C][C]74.0983[/C][/ROW]
[ROW][C]55[/C][C]0.4161[/C][C]0.0138[/C][C]0.0012[/C][C]1069.3727[/C][C]89.1144[/C][C]9.44[/C][/ROW]
[ROW][C]56[/C][C]0.3342[/C][C]-0.1061[/C][C]0.0088[/C][C]102622.9215[/C][C]8551.9101[/C][C]92.4765[/C][/ROW]
[ROW][C]57[/C][C]0.3529[/C][C]-0.0411[/C][C]0.0034[/C][C]14428.0857[/C][C]1202.3405[/C][C]34.6748[/C][/ROW]
[ROW][C]58[/C][C]0.3923[/C][C]0.011[/C][C]9e-04[/C][C]868.0864[/C][C]72.3405[/C][C]8.5053[/C][/ROW]
[ROW][C]59[/C][C]0.3848[/C][C]-0.0571[/C][C]0.0048[/C][C]24780.9012[/C][C]2065.0751[/C][C]45.4431[/C][/ROW]
[ROW][C]60[/C][C]0.4189[/C][C]0.2142[/C][C]0.0179[/C][C]299090.4302[/C][C]24924.2025[/C][C]157.874[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33992&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33992&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.1922-0.06720.005637778.16943148.180856.1087
500.17060.12270.0102298775.06224897.9218157.7908
510.2178-0.06580.005560781.4065065.117271.1696
520.2829-0.01089e-041065.983488.8329.4251
530.28560.19160.016373401.303231116.7753176.3995
540.37530.10090.008465886.60885490.550774.0983
550.41610.01380.00121069.372789.11449.44
560.3342-0.10610.0088102622.92158551.910192.4765
570.3529-0.04110.003414428.08571202.340534.6748
580.39230.0119e-04868.086472.34058.5053
590.3848-0.05710.004824780.90122065.075145.4431
600.41890.21420.0179299090.430224924.2025157.874



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