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 computationMon, 27 Dec 2010 10:20:40 +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/27/t1293445151uq6w2do5u8bvub9.htm/, Retrieved Mon, 06 May 2024 11:29:08 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115884, Retrieved Mon, 06 May 2024 11:29:08 +0000
QR Codes:

Original text written by user:prijsverandering in nederland
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact162
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [Airline data] [2007-10-18 09:58:47] [42daae401fd3def69a25014f2252b4c2]
F RMPD  [Cross Correlation Function] [Q7 - zonder trans...] [2008-12-01 20:04:13] [299afd6311e4c20059ea2f05c8dd029d]
F RM D    [Variance Reduction Matrix] [Q8] [2008-12-01 20:20:44] [299afd6311e4c20059ea2f05c8dd029d]
F    D      [Variance Reduction Matrix] [Q8 - 2] [2008-12-01 20:25:07] [299afd6311e4c20059ea2f05c8dd029d]
F RM D        [Standard Deviation-Mean Plot] [Deel 2: Step 1] [2008-12-08 20:09:35] [299afd6311e4c20059ea2f05c8dd029d]
-    D          [Standard Deviation-Mean Plot] [Totale Uitvoer - SMP] [2008-12-17 15:57:12] [299afd6311e4c20059ea2f05c8dd029d]
- RMPD            [ARIMA Forecasting] [ARIMA Forecasting] [2010-12-24 14:15:31] [9f313cc7203314d73bf17d2b325aee79]
-   PD                [ARIMA Forecasting] [ARIMA Forecasting] [2010-12-27 10:20:40] [fba9c6aa004af59d8497d682e70ddad5] [Current]
Feedback Forum

Post a new message
Dataseries X:
13.7
13.7
13.7
1.3
1.3
1.3
-7.4
-7.4
-7.4
-12.9
-12.9
-12.9
-9.6
-9.6
-9.6
-11.1
-11.1
-11.1
-8.3
-8.3
-8.3
-2.7
-2.7
-2.7
5.1
5.1
5.1
4.6
4.6
4.6
5.6
5.6
5.6
5.1
5.1
5.1
0.8
0.8
0.8
6
6
6
9.3
9.3
9.3
8.7
8.7
8.7
11
11
11
8.5
8.5
8.5
4.4
4.4
4.4
2.5
2.5
2.5
0.3
0.3
0.3
-3
-3
-3




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115884&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[54])
426-------
439.3-------
449.3-------
459.3-------
468.7-------
478.7-------
488.7-------
4911-------
5011-------
5111-------
528.5-------
538.5-------
548.5-------
554.46.19771.579210.81620.22280.16430.0940.1643
564.46.1977-0.333912.72930.29480.70520.17590.2448
574.46.1977-1.801914.19720.32980.67020.22360.2863
582.55.864-5.11616.84410.27410.60310.30630.319
592.55.864-7.44519.1730.31020.68980.33810.3489
602.55.864-9.423221.15120.33310.66690.35810.3677
610.35.8098-12.107723.72730.27330.64130.28510.3843
620.35.8098-14.398526.01810.29650.70350.30730.3971
630.35.8098-16.454828.07440.31380.68620.32390.4064
64-34.6993-19.913629.31220.26990.6370.38110.3811
65-34.6993-22.056631.45520.28640.71360.39030.3903
66-34.6993-24.040233.43880.29980.70020.39770.3977

\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[54]) \tabularnewline
42 & 6 & - & - & - & - & - & - & - \tabularnewline
43 & 9.3 & - & - & - & - & - & - & - \tabularnewline
44 & 9.3 & - & - & - & - & - & - & - \tabularnewline
45 & 9.3 & - & - & - & - & - & - & - \tabularnewline
46 & 8.7 & - & - & - & - & - & - & - \tabularnewline
47 & 8.7 & - & - & - & - & - & - & - \tabularnewline
48 & 8.7 & - & - & - & - & - & - & - \tabularnewline
49 & 11 & - & - & - & - & - & - & - \tabularnewline
50 & 11 & - & - & - & - & - & - & - \tabularnewline
51 & 11 & - & - & - & - & - & - & - \tabularnewline
52 & 8.5 & - & - & - & - & - & - & - \tabularnewline
53 & 8.5 & - & - & - & - & - & - & - \tabularnewline
54 & 8.5 & - & - & - & - & - & - & - \tabularnewline
55 & 4.4 & 6.1977 & 1.5792 & 10.8162 & 0.2228 & 0.1643 & 0.094 & 0.1643 \tabularnewline
56 & 4.4 & 6.1977 & -0.3339 & 12.7293 & 0.2948 & 0.7052 & 0.1759 & 0.2448 \tabularnewline
57 & 4.4 & 6.1977 & -1.8019 & 14.1972 & 0.3298 & 0.6702 & 0.2236 & 0.2863 \tabularnewline
58 & 2.5 & 5.864 & -5.116 & 16.8441 & 0.2741 & 0.6031 & 0.3063 & 0.319 \tabularnewline
59 & 2.5 & 5.864 & -7.445 & 19.173 & 0.3102 & 0.6898 & 0.3381 & 0.3489 \tabularnewline
60 & 2.5 & 5.864 & -9.4232 & 21.1512 & 0.3331 & 0.6669 & 0.3581 & 0.3677 \tabularnewline
61 & 0.3 & 5.8098 & -12.1077 & 23.7273 & 0.2733 & 0.6413 & 0.2851 & 0.3843 \tabularnewline
62 & 0.3 & 5.8098 & -14.3985 & 26.0181 & 0.2965 & 0.7035 & 0.3073 & 0.3971 \tabularnewline
63 & 0.3 & 5.8098 & -16.4548 & 28.0744 & 0.3138 & 0.6862 & 0.3239 & 0.4064 \tabularnewline
64 & -3 & 4.6993 & -19.9136 & 29.3122 & 0.2699 & 0.637 & 0.3811 & 0.3811 \tabularnewline
65 & -3 & 4.6993 & -22.0566 & 31.4552 & 0.2864 & 0.7136 & 0.3903 & 0.3903 \tabularnewline
66 & -3 & 4.6993 & -24.0402 & 33.4388 & 0.2998 & 0.7002 & 0.3977 & 0.3977 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115884&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[54])[/C][/ROW]
[ROW][C]42[/C][C]6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]9.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]9.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]9.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]11[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]11[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]11[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]8.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]8.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]8.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]4.4[/C][C]6.1977[/C][C]1.5792[/C][C]10.8162[/C][C]0.2228[/C][C]0.1643[/C][C]0.094[/C][C]0.1643[/C][/ROW]
[ROW][C]56[/C][C]4.4[/C][C]6.1977[/C][C]-0.3339[/C][C]12.7293[/C][C]0.2948[/C][C]0.7052[/C][C]0.1759[/C][C]0.2448[/C][/ROW]
[ROW][C]57[/C][C]4.4[/C][C]6.1977[/C][C]-1.8019[/C][C]14.1972[/C][C]0.3298[/C][C]0.6702[/C][C]0.2236[/C][C]0.2863[/C][/ROW]
[ROW][C]58[/C][C]2.5[/C][C]5.864[/C][C]-5.116[/C][C]16.8441[/C][C]0.2741[/C][C]0.6031[/C][C]0.3063[/C][C]0.319[/C][/ROW]
[ROW][C]59[/C][C]2.5[/C][C]5.864[/C][C]-7.445[/C][C]19.173[/C][C]0.3102[/C][C]0.6898[/C][C]0.3381[/C][C]0.3489[/C][/ROW]
[ROW][C]60[/C][C]2.5[/C][C]5.864[/C][C]-9.4232[/C][C]21.1512[/C][C]0.3331[/C][C]0.6669[/C][C]0.3581[/C][C]0.3677[/C][/ROW]
[ROW][C]61[/C][C]0.3[/C][C]5.8098[/C][C]-12.1077[/C][C]23.7273[/C][C]0.2733[/C][C]0.6413[/C][C]0.2851[/C][C]0.3843[/C][/ROW]
[ROW][C]62[/C][C]0.3[/C][C]5.8098[/C][C]-14.3985[/C][C]26.0181[/C][C]0.2965[/C][C]0.7035[/C][C]0.3073[/C][C]0.3971[/C][/ROW]
[ROW][C]63[/C][C]0.3[/C][C]5.8098[/C][C]-16.4548[/C][C]28.0744[/C][C]0.3138[/C][C]0.6862[/C][C]0.3239[/C][C]0.4064[/C][/ROW]
[ROW][C]64[/C][C]-3[/C][C]4.6993[/C][C]-19.9136[/C][C]29.3122[/C][C]0.2699[/C][C]0.637[/C][C]0.3811[/C][C]0.3811[/C][/ROW]
[ROW][C]65[/C][C]-3[/C][C]4.6993[/C][C]-22.0566[/C][C]31.4552[/C][C]0.2864[/C][C]0.7136[/C][C]0.3903[/C][C]0.3903[/C][/ROW]
[ROW][C]66[/C][C]-3[/C][C]4.6993[/C][C]-24.0402[/C][C]33.4388[/C][C]0.2998[/C][C]0.7002[/C][C]0.3977[/C][C]0.3977[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115884&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115884&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[54])
426-------
439.3-------
449.3-------
459.3-------
468.7-------
478.7-------
488.7-------
4911-------
5011-------
5111-------
528.5-------
538.5-------
548.5-------
554.46.19771.579210.81620.22280.16430.0940.1643
564.46.1977-0.333912.72930.29480.70520.17590.2448
574.46.1977-1.801914.19720.32980.67020.22360.2863
582.55.864-5.11616.84410.27410.60310.30630.319
592.55.864-7.44519.1730.31020.68980.33810.3489
602.55.864-9.423221.15120.33310.66690.35810.3677
610.35.8098-12.107723.72730.27330.64130.28510.3843
620.35.8098-14.398526.01810.29650.70350.30730.3971
630.35.8098-16.454828.07440.31380.68620.32390.4064
64-34.6993-19.913629.31220.26990.6370.38110.3811
65-34.6993-22.056631.45520.28640.71360.39030.3903
66-34.6993-24.040233.43880.29980.70020.39770.3977







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
550.3802-0.290103.231700
560.5377-0.29010.29013.23173.23171.7977
570.6585-0.29010.29013.23173.23171.7977
580.9553-0.57370.36111.31675.25292.2919
591.158-0.57370.403511.31676.46572.5428
601.3301-0.57370.431911.31677.27422.6971
611.5735-0.94840.505730.357810.57193.2514
621.7746-0.94840.56130.357813.04513.6118
631.9552-0.94840.60430.357814.96873.8689
642.6722-1.63840.707559.279219.39984.4045
652.9049-1.63840.792159.279223.02524.7985
663.1203-1.63840.862659.279226.04645.1036

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
55 & 0.3802 & -0.2901 & 0 & 3.2317 & 0 & 0 \tabularnewline
56 & 0.5377 & -0.2901 & 0.2901 & 3.2317 & 3.2317 & 1.7977 \tabularnewline
57 & 0.6585 & -0.2901 & 0.2901 & 3.2317 & 3.2317 & 1.7977 \tabularnewline
58 & 0.9553 & -0.5737 & 0.361 & 11.3167 & 5.2529 & 2.2919 \tabularnewline
59 & 1.158 & -0.5737 & 0.4035 & 11.3167 & 6.4657 & 2.5428 \tabularnewline
60 & 1.3301 & -0.5737 & 0.4319 & 11.3167 & 7.2742 & 2.6971 \tabularnewline
61 & 1.5735 & -0.9484 & 0.5057 & 30.3578 & 10.5719 & 3.2514 \tabularnewline
62 & 1.7746 & -0.9484 & 0.561 & 30.3578 & 13.0451 & 3.6118 \tabularnewline
63 & 1.9552 & -0.9484 & 0.604 & 30.3578 & 14.9687 & 3.8689 \tabularnewline
64 & 2.6722 & -1.6384 & 0.7075 & 59.2792 & 19.3998 & 4.4045 \tabularnewline
65 & 2.9049 & -1.6384 & 0.7921 & 59.2792 & 23.0252 & 4.7985 \tabularnewline
66 & 3.1203 & -1.6384 & 0.8626 & 59.2792 & 26.0464 & 5.1036 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115884&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]55[/C][C]0.3802[/C][C]-0.2901[/C][C]0[/C][C]3.2317[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]56[/C][C]0.5377[/C][C]-0.2901[/C][C]0.2901[/C][C]3.2317[/C][C]3.2317[/C][C]1.7977[/C][/ROW]
[ROW][C]57[/C][C]0.6585[/C][C]-0.2901[/C][C]0.2901[/C][C]3.2317[/C][C]3.2317[/C][C]1.7977[/C][/ROW]
[ROW][C]58[/C][C]0.9553[/C][C]-0.5737[/C][C]0.361[/C][C]11.3167[/C][C]5.2529[/C][C]2.2919[/C][/ROW]
[ROW][C]59[/C][C]1.158[/C][C]-0.5737[/C][C]0.4035[/C][C]11.3167[/C][C]6.4657[/C][C]2.5428[/C][/ROW]
[ROW][C]60[/C][C]1.3301[/C][C]-0.5737[/C][C]0.4319[/C][C]11.3167[/C][C]7.2742[/C][C]2.6971[/C][/ROW]
[ROW][C]61[/C][C]1.5735[/C][C]-0.9484[/C][C]0.5057[/C][C]30.3578[/C][C]10.5719[/C][C]3.2514[/C][/ROW]
[ROW][C]62[/C][C]1.7746[/C][C]-0.9484[/C][C]0.561[/C][C]30.3578[/C][C]13.0451[/C][C]3.6118[/C][/ROW]
[ROW][C]63[/C][C]1.9552[/C][C]-0.9484[/C][C]0.604[/C][C]30.3578[/C][C]14.9687[/C][C]3.8689[/C][/ROW]
[ROW][C]64[/C][C]2.6722[/C][C]-1.6384[/C][C]0.7075[/C][C]59.2792[/C][C]19.3998[/C][C]4.4045[/C][/ROW]
[ROW][C]65[/C][C]2.9049[/C][C]-1.6384[/C][C]0.7921[/C][C]59.2792[/C][C]23.0252[/C][C]4.7985[/C][/ROW]
[ROW][C]66[/C][C]3.1203[/C][C]-1.6384[/C][C]0.8626[/C][C]59.2792[/C][C]26.0464[/C][C]5.1036[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115884&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115884&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
550.3802-0.290103.231700
560.5377-0.29010.29013.23173.23171.7977
570.6585-0.29010.29013.23173.23171.7977
580.9553-0.57370.36111.31675.25292.2919
591.158-0.57370.403511.31676.46572.5428
601.3301-0.57370.431911.31677.27422.6971
611.5735-0.94840.505730.357810.57193.2514
621.7746-0.94840.56130.357813.04513.6118
631.9552-0.94840.60430.357814.96873.8689
642.6722-1.63840.707559.279219.39984.4045
652.9049-1.63840.792159.279223.02524.7985
663.1203-1.63840.862659.279226.04645.1036



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