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 13:25:28 -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/t12294591585zl4c85ooflpm0w.htm/, Retrieved Wed, 15 May 2024 15:49:07 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34180, Retrieved Wed, 15 May 2024 15:49:07 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact223
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [ARIMA Forecasting] [arima forecast ex...] [2008-12-10 16:35:06] [1e1d8320a8a1170c475bf6e4ce119de6]
F       [ARIMA Forecasting] [ARIMA Forecasting] [2008-12-15 20:25:56] [3754dd41128068acfc463ebbabce5a9c]
-   P       [ARIMA Forecasting] [feedback op blog] [2008-12-16 20:25:28] [f4b2017b314c03698059f43b95818e67] [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 time2 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 & 2 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34180&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]2 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=34180&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34180&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 time2 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[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.918751.809917191.689820311.92990.13150.98560.93210.9856
501902418326.135216711.751819940.51860.19840.05490.78770.9447
512169121193.382319510.595522876.16920.28110.99420.67171
5218835.917990.378216104.771919875.98460.18971e-040.77680.8454
5319873.419532.778417580.928721484.62810.36620.7580.70910.9943
5421468.221003.191218982.259523024.1230.3260.86340.67590.9999
5519406.817630.27315522.35519738.19090.04932e-040.69480.7173
5618385.317371.240915208.338519534.14330.17910.03250.6670.6275
5720739.320718.899818503.459222934.34040.49280.98050.65280.9995
5822268.320528.380618261.151122795.610.06630.42770.65130.9988
592156920315.854818007.249822624.45970.14370.04870.63770.9975
6017514.817406.234215059.51919752.94940.46393e-040.6290.629

\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 & 18751.8099 & 17191.6898 & 20311.9299 & 0.1315 & 0.9856 & 0.9321 & 0.9856 \tabularnewline
50 & 19024 & 18326.1352 & 16711.7518 & 19940.5186 & 0.1984 & 0.0549 & 0.7877 & 0.9447 \tabularnewline
51 & 21691 & 21193.3823 & 19510.5955 & 22876.1692 & 0.2811 & 0.9942 & 0.6717 & 1 \tabularnewline
52 & 18835.9 & 17990.3782 & 16104.7719 & 19875.9846 & 0.1897 & 1e-04 & 0.7768 & 0.8454 \tabularnewline
53 & 19873.4 & 19532.7784 & 17580.9287 & 21484.6281 & 0.3662 & 0.758 & 0.7091 & 0.9943 \tabularnewline
54 & 21468.2 & 21003.1912 & 18982.2595 & 23024.123 & 0.326 & 0.8634 & 0.6759 & 0.9999 \tabularnewline
55 & 19406.8 & 17630.273 & 15522.355 & 19738.1909 & 0.0493 & 2e-04 & 0.6948 & 0.7173 \tabularnewline
56 & 18385.3 & 17371.2409 & 15208.3385 & 19534.1433 & 0.1791 & 0.0325 & 0.667 & 0.6275 \tabularnewline
57 & 20739.3 & 20718.8998 & 18503.4592 & 22934.3404 & 0.4928 & 0.9805 & 0.6528 & 0.9995 \tabularnewline
58 & 22268.3 & 20528.3806 & 18261.1511 & 22795.61 & 0.0663 & 0.4277 & 0.6513 & 0.9988 \tabularnewline
59 & 21569 & 20315.8548 & 18007.2498 & 22624.4597 & 0.1437 & 0.0487 & 0.6377 & 0.9975 \tabularnewline
60 & 17514.8 & 17406.2342 & 15059.519 & 19752.9494 & 0.4639 & 3e-04 & 0.629 & 0.629 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34180&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]18751.8099[/C][C]17191.6898[/C][C]20311.9299[/C][C]0.1315[/C][C]0.9856[/C][C]0.9321[/C][C]0.9856[/C][/ROW]
[ROW][C]50[/C][C]19024[/C][C]18326.1352[/C][C]16711.7518[/C][C]19940.5186[/C][C]0.1984[/C][C]0.0549[/C][C]0.7877[/C][C]0.9447[/C][/ROW]
[ROW][C]51[/C][C]21691[/C][C]21193.3823[/C][C]19510.5955[/C][C]22876.1692[/C][C]0.2811[/C][C]0.9942[/C][C]0.6717[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]18835.9[/C][C]17990.3782[/C][C]16104.7719[/C][C]19875.9846[/C][C]0.1897[/C][C]1e-04[/C][C]0.7768[/C][C]0.8454[/C][/ROW]
[ROW][C]53[/C][C]19873.4[/C][C]19532.7784[/C][C]17580.9287[/C][C]21484.6281[/C][C]0.3662[/C][C]0.758[/C][C]0.7091[/C][C]0.9943[/C][/ROW]
[ROW][C]54[/C][C]21468.2[/C][C]21003.1912[/C][C]18982.2595[/C][C]23024.123[/C][C]0.326[/C][C]0.8634[/C][C]0.6759[/C][C]0.9999[/C][/ROW]
[ROW][C]55[/C][C]19406.8[/C][C]17630.273[/C][C]15522.355[/C][C]19738.1909[/C][C]0.0493[/C][C]2e-04[/C][C]0.6948[/C][C]0.7173[/C][/ROW]
[ROW][C]56[/C][C]18385.3[/C][C]17371.2409[/C][C]15208.3385[/C][C]19534.1433[/C][C]0.1791[/C][C]0.0325[/C][C]0.667[/C][C]0.6275[/C][/ROW]
[ROW][C]57[/C][C]20739.3[/C][C]20718.8998[/C][C]18503.4592[/C][C]22934.3404[/C][C]0.4928[/C][C]0.9805[/C][C]0.6528[/C][C]0.9995[/C][/ROW]
[ROW][C]58[/C][C]22268.3[/C][C]20528.3806[/C][C]18261.1511[/C][C]22795.61[/C][C]0.0663[/C][C]0.4277[/C][C]0.6513[/C][C]0.9988[/C][/ROW]
[ROW][C]59[/C][C]21569[/C][C]20315.8548[/C][C]18007.2498[/C][C]22624.4597[/C][C]0.1437[/C][C]0.0487[/C][C]0.6377[/C][C]0.9975[/C][/ROW]
[ROW][C]60[/C][C]17514.8[/C][C]17406.2342[/C][C]15059.519[/C][C]19752.9494[/C][C]0.4639[/C][C]3e-04[/C][C]0.629[/C][C]0.629[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34180&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34180&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.918751.809917191.689820311.92990.13150.98560.93210.9856
501902418326.135216711.751819940.51860.19840.05490.78770.9447
512169121193.382319510.595522876.16920.28110.99420.67171
5218835.917990.378216104.771919875.98460.18971e-040.77680.8454
5319873.419532.778417580.928721484.62810.36620.7580.70910.9943
5421468.221003.191218982.259523024.1230.3260.86340.67590.9999
5519406.817630.27315522.35519738.19090.04932e-040.69480.7173
5618385.317371.240915208.338519534.14330.17910.03250.6670.6275
5720739.320718.899818503.459222934.34040.49280.98050.65280.9995
5822268.320528.380618261.151122795.610.06630.42770.65130.9988
592156920315.854818007.249822624.45970.14370.04870.63770.9975
6017514.817406.234215059.51919752.94940.46393e-040.6290.629







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.04240.04750.004794041.655466170.1379257.2356
500.04490.03810.0032487015.252740584.6044201.4562
510.04050.02350.002247623.328920635.2774143.6498
520.05350.0470.0039714907.086659575.5906244.0811
530.0510.01740.0015116023.06249668.588598.329
540.04910.02210.0018216233.148818019.4291134.2365
550.0610.10080.00843156048.2549263004.0212512.8392
560.06350.05840.00491028315.935885692.9947292.7337
570.05460.0011e-04416.166634.68055.889
580.05630.08480.00713027319.6893252276.6408502.2715
590.0580.06170.00511570372.9864130864.4155361.7519
600.06880.00625e-0411786.5264982.210531.3402

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0424 & 0.0475 & 0.004 & 794041.6554 & 66170.1379 & 257.2356 \tabularnewline
50 & 0.0449 & 0.0381 & 0.0032 & 487015.2527 & 40584.6044 & 201.4562 \tabularnewline
51 & 0.0405 & 0.0235 & 0.002 & 247623.3289 & 20635.2774 & 143.6498 \tabularnewline
52 & 0.0535 & 0.047 & 0.0039 & 714907.0866 & 59575.5906 & 244.0811 \tabularnewline
53 & 0.051 & 0.0174 & 0.0015 & 116023.0624 & 9668.5885 & 98.329 \tabularnewline
54 & 0.0491 & 0.0221 & 0.0018 & 216233.1488 & 18019.4291 & 134.2365 \tabularnewline
55 & 0.061 & 0.1008 & 0.0084 & 3156048.2549 & 263004.0212 & 512.8392 \tabularnewline
56 & 0.0635 & 0.0584 & 0.0049 & 1028315.9358 & 85692.9947 & 292.7337 \tabularnewline
57 & 0.0546 & 0.001 & 1e-04 & 416.1666 & 34.6805 & 5.889 \tabularnewline
58 & 0.0563 & 0.0848 & 0.0071 & 3027319.6893 & 252276.6408 & 502.2715 \tabularnewline
59 & 0.058 & 0.0617 & 0.0051 & 1570372.9864 & 130864.4155 & 361.7519 \tabularnewline
60 & 0.0688 & 0.0062 & 5e-04 & 11786.5264 & 982.2105 & 31.3402 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34180&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.0424[/C][C]0.0475[/C][C]0.004[/C][C]794041.6554[/C][C]66170.1379[/C][C]257.2356[/C][/ROW]
[ROW][C]50[/C][C]0.0449[/C][C]0.0381[/C][C]0.0032[/C][C]487015.2527[/C][C]40584.6044[/C][C]201.4562[/C][/ROW]
[ROW][C]51[/C][C]0.0405[/C][C]0.0235[/C][C]0.002[/C][C]247623.3289[/C][C]20635.2774[/C][C]143.6498[/C][/ROW]
[ROW][C]52[/C][C]0.0535[/C][C]0.047[/C][C]0.0039[/C][C]714907.0866[/C][C]59575.5906[/C][C]244.0811[/C][/ROW]
[ROW][C]53[/C][C]0.051[/C][C]0.0174[/C][C]0.0015[/C][C]116023.0624[/C][C]9668.5885[/C][C]98.329[/C][/ROW]
[ROW][C]54[/C][C]0.0491[/C][C]0.0221[/C][C]0.0018[/C][C]216233.1488[/C][C]18019.4291[/C][C]134.2365[/C][/ROW]
[ROW][C]55[/C][C]0.061[/C][C]0.1008[/C][C]0.0084[/C][C]3156048.2549[/C][C]263004.0212[/C][C]512.8392[/C][/ROW]
[ROW][C]56[/C][C]0.0635[/C][C]0.0584[/C][C]0.0049[/C][C]1028315.9358[/C][C]85692.9947[/C][C]292.7337[/C][/ROW]
[ROW][C]57[/C][C]0.0546[/C][C]0.001[/C][C]1e-04[/C][C]416.1666[/C][C]34.6805[/C][C]5.889[/C][/ROW]
[ROW][C]58[/C][C]0.0563[/C][C]0.0848[/C][C]0.0071[/C][C]3027319.6893[/C][C]252276.6408[/C][C]502.2715[/C][/ROW]
[ROW][C]59[/C][C]0.058[/C][C]0.0617[/C][C]0.0051[/C][C]1570372.9864[/C][C]130864.4155[/C][C]361.7519[/C][/ROW]
[ROW][C]60[/C][C]0.0688[/C][C]0.0062[/C][C]5e-04[/C][C]11786.5264[/C][C]982.2105[/C][C]31.3402[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34180&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34180&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.04240.04750.004794041.655466170.1379257.2356
500.04490.03810.0032487015.252740584.6044201.4562
510.04050.02350.002247623.328920635.2774143.6498
520.05350.0470.0039714907.086659575.5906244.0811
530.0510.01740.0015116023.06249668.588598.329
540.04910.02210.0018216233.148818019.4291134.2365
550.0610.10080.00843156048.2549263004.0212512.8392
560.06350.05840.00491028315.935885692.9947292.7337
570.05460.0011e-04416.166634.68055.889
580.05630.08480.00713027319.6893252276.6408502.2715
590.0580.06170.00511570372.9864130864.4155361.7519
600.06880.00625e-0411786.5264982.210531.3402



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