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, 16 Dec 2009 13:56:07 -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/2009/Dec/16/t1260997028g4dt7mvqzsjjp3k.htm/, Retrieved Tue, 30 Apr 2024 13:06:04 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=68601, Retrieved Tue, 30 Apr 2024 13:06:04 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact124
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Variance Reduction Matrix] [VRM - vaste rente...] [2008-12-12 10:51:08] [c5a66f1c8528a963efc2b82a8519f117]
- RM D  [Standard Deviation-Mean Plot] [SDMP inschrijving...] [2008-12-12 11:03:14] [c5a66f1c8528a963efc2b82a8519f117]
- RM      [Variance Reduction Matrix] [VRM - inschrijvin...] [2008-12-12 11:08:27] [c5a66f1c8528a963efc2b82a8519f117]
- RMP       [(Partial) Autocorrelation Function] [ACF - inschrijvin...] [2008-12-12 11:14:36] [c5a66f1c8528a963efc2b82a8519f117]
-   P         [(Partial) Autocorrelation Function] [ACF - inschrijvin...] [2008-12-12 11:32:48] [c5a66f1c8528a963efc2b82a8519f117]
-               [(Partial) Autocorrelation Function] [ACF - inschrijvin...] [2008-12-12 11:37:19] [c5a66f1c8528a963efc2b82a8519f117]
- RM              [ARIMA Backward Selection] [ARIMA backward se...] [2008-12-12 11:51:13] [c5a66f1c8528a963efc2b82a8519f117]
- RM                [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-12 11:57:42] [c5a66f1c8528a963efc2b82a8519f117]
F                     [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-12 12:06:55] [c5a66f1c8528a963efc2b82a8519f117]
-  MPD                    [ARIMA Forecasting] [Arima forecast - ...] [2009-12-16 20:56:07] [557d56ec4b06cd0135c259898de8ce95] [Current]
Feedback Forum

Post a new message
Dataseries X:
17.8
17.9
17.4
16.7
16
16.6
19.1
17.8
17.2
18.6
16.3
15.1
19.2
17.7
19.1
18
17.5
17.8
21.1
17.2
19.4
19.8
17.6
16.2
19.5
19.9
20
17.3
18.9
18.6
21.4
18.6
19.8
20.8
19.6
17.7
19.8
22.2
20.7
17.9
20.9
21.2
21.4
23
21.3
23.9
22.4
18.3
22.8
22.3
17.8
16.4
16
16.4
17.7
16.6
16.2
18.3
17.6
15.1




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68601&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])
3617.7-------
3719.8-------
3822.2-------
3920.7-------
4017.9-------
4120.9-------
4221.2-------
4321.4-------
4423-------
4521.3-------
4623.9-------
4722.4-------
4818.3-------
4922.822.679820.296825.73760.46930.99750.96750.9975
5022.324.752221.904828.50680.10030.84590.90860.9996
5117.822.541920.012725.85090.00250.5570.86240.994
5216.419.785517.655322.5380.0080.92130.91030.8549
531623.072920.166827.02452e-040.99950.85940.991
5416.423.465220.322927.83758e-040.99960.84510.9897
5517.723.950120.565328.76410.00550.99890.85040.9893
5616.625.745321.781231.60450.00110.99640.82080.9936
5716.223.674520.197128.70360.00180.99710.82260.9819
5818.327.041522.446834.18680.00820.99850.80560.9918
5917.625.031420.98731.15370.00870.98440.80020.9844
6015.120.006117.320123.74690.00510.89630.81430.8143

\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 & 17.7 & - & - & - & - & - & - & - \tabularnewline
37 & 19.8 & - & - & - & - & - & - & - \tabularnewline
38 & 22.2 & - & - & - & - & - & - & - \tabularnewline
39 & 20.7 & - & - & - & - & - & - & - \tabularnewline
40 & 17.9 & - & - & - & - & - & - & - \tabularnewline
41 & 20.9 & - & - & - & - & - & - & - \tabularnewline
42 & 21.2 & - & - & - & - & - & - & - \tabularnewline
43 & 21.4 & - & - & - & - & - & - & - \tabularnewline
44 & 23 & - & - & - & - & - & - & - \tabularnewline
45 & 21.3 & - & - & - & - & - & - & - \tabularnewline
46 & 23.9 & - & - & - & - & - & - & - \tabularnewline
47 & 22.4 & - & - & - & - & - & - & - \tabularnewline
48 & 18.3 & - & - & - & - & - & - & - \tabularnewline
49 & 22.8 & 22.6798 & 20.2968 & 25.7376 & 0.4693 & 0.9975 & 0.9675 & 0.9975 \tabularnewline
50 & 22.3 & 24.7522 & 21.9048 & 28.5068 & 0.1003 & 0.8459 & 0.9086 & 0.9996 \tabularnewline
51 & 17.8 & 22.5419 & 20.0127 & 25.8509 & 0.0025 & 0.557 & 0.8624 & 0.994 \tabularnewline
52 & 16.4 & 19.7855 & 17.6553 & 22.538 & 0.008 & 0.9213 & 0.9103 & 0.8549 \tabularnewline
53 & 16 & 23.0729 & 20.1668 & 27.0245 & 2e-04 & 0.9995 & 0.8594 & 0.991 \tabularnewline
54 & 16.4 & 23.4652 & 20.3229 & 27.8375 & 8e-04 & 0.9996 & 0.8451 & 0.9897 \tabularnewline
55 & 17.7 & 23.9501 & 20.5653 & 28.7641 & 0.0055 & 0.9989 & 0.8504 & 0.9893 \tabularnewline
56 & 16.6 & 25.7453 & 21.7812 & 31.6045 & 0.0011 & 0.9964 & 0.8208 & 0.9936 \tabularnewline
57 & 16.2 & 23.6745 & 20.1971 & 28.7036 & 0.0018 & 0.9971 & 0.8226 & 0.9819 \tabularnewline
58 & 18.3 & 27.0415 & 22.4468 & 34.1868 & 0.0082 & 0.9985 & 0.8056 & 0.9918 \tabularnewline
59 & 17.6 & 25.0314 & 20.987 & 31.1537 & 0.0087 & 0.9844 & 0.8002 & 0.9844 \tabularnewline
60 & 15.1 & 20.0061 & 17.3201 & 23.7469 & 0.0051 & 0.8963 & 0.8143 & 0.8143 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68601&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]17.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]19.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]22.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]20.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]17.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]20.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]21.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]21.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]21.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]23.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]22.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]18.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]22.8[/C][C]22.6798[/C][C]20.2968[/C][C]25.7376[/C][C]0.4693[/C][C]0.9975[/C][C]0.9675[/C][C]0.9975[/C][/ROW]
[ROW][C]50[/C][C]22.3[/C][C]24.7522[/C][C]21.9048[/C][C]28.5068[/C][C]0.1003[/C][C]0.8459[/C][C]0.9086[/C][C]0.9996[/C][/ROW]
[ROW][C]51[/C][C]17.8[/C][C]22.5419[/C][C]20.0127[/C][C]25.8509[/C][C]0.0025[/C][C]0.557[/C][C]0.8624[/C][C]0.994[/C][/ROW]
[ROW][C]52[/C][C]16.4[/C][C]19.7855[/C][C]17.6553[/C][C]22.538[/C][C]0.008[/C][C]0.9213[/C][C]0.9103[/C][C]0.8549[/C][/ROW]
[ROW][C]53[/C][C]16[/C][C]23.0729[/C][C]20.1668[/C][C]27.0245[/C][C]2e-04[/C][C]0.9995[/C][C]0.8594[/C][C]0.991[/C][/ROW]
[ROW][C]54[/C][C]16.4[/C][C]23.4652[/C][C]20.3229[/C][C]27.8375[/C][C]8e-04[/C][C]0.9996[/C][C]0.8451[/C][C]0.9897[/C][/ROW]
[ROW][C]55[/C][C]17.7[/C][C]23.9501[/C][C]20.5653[/C][C]28.7641[/C][C]0.0055[/C][C]0.9989[/C][C]0.8504[/C][C]0.9893[/C][/ROW]
[ROW][C]56[/C][C]16.6[/C][C]25.7453[/C][C]21.7812[/C][C]31.6045[/C][C]0.0011[/C][C]0.9964[/C][C]0.8208[/C][C]0.9936[/C][/ROW]
[ROW][C]57[/C][C]16.2[/C][C]23.6745[/C][C]20.1971[/C][C]28.7036[/C][C]0.0018[/C][C]0.9971[/C][C]0.8226[/C][C]0.9819[/C][/ROW]
[ROW][C]58[/C][C]18.3[/C][C]27.0415[/C][C]22.4468[/C][C]34.1868[/C][C]0.0082[/C][C]0.9985[/C][C]0.8056[/C][C]0.9918[/C][/ROW]
[ROW][C]59[/C][C]17.6[/C][C]25.0314[/C][C]20.987[/C][C]31.1537[/C][C]0.0087[/C][C]0.9844[/C][C]0.8002[/C][C]0.9844[/C][/ROW]
[ROW][C]60[/C][C]15.1[/C][C]20.0061[/C][C]17.3201[/C][C]23.7469[/C][C]0.0051[/C][C]0.8963[/C][C]0.8143[/C][C]0.8143[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68601&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68601&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])
3617.7-------
3719.8-------
3822.2-------
3920.7-------
4017.9-------
4120.9-------
4221.2-------
4321.4-------
4423-------
4521.3-------
4623.9-------
4722.4-------
4818.3-------
4922.822.679820.296825.73760.46930.99750.96750.9975
5022.324.752221.904828.50680.10030.84590.90860.9996
5117.822.541920.012725.85090.00250.5570.86240.994
5216.419.785517.655322.5380.0080.92130.91030.8549
531623.072920.166827.02452e-040.99950.85940.991
5416.423.465220.322927.83758e-040.99960.84510.9897
5517.723.950120.565328.76410.00550.99890.85040.9893
5616.625.745321.781231.60450.00110.99640.82080.9936
5716.223.674520.197128.70360.00180.99710.82260.9819
5818.327.041522.446834.18680.00820.99850.80560.9918
5917.625.031420.98731.15370.00870.98440.80020.9844
6015.120.006117.320123.74690.00510.89630.81430.8143







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.06880.00534e-040.01440.00120.0347
500.0774-0.09910.00836.01340.50110.7079
510.0749-0.21040.017522.48611.87381.3689
520.071-0.17110.014311.46130.95510.9773
530.0874-0.30650.025550.02644.16892.0418
540.0951-0.30110.025149.91784.15982.0396
550.1026-0.2610.021739.06423.25531.8043
560.1161-0.35520.029683.63596.96972.64
570.1084-0.31570.026355.86824.65572.1577
580.1348-0.32330.026976.41386.36782.5235
590.1248-0.29690.024755.22514.60212.1452
600.0954-0.24520.020424.06962.00581.4163

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0688 & 0.0053 & 4e-04 & 0.0144 & 0.0012 & 0.0347 \tabularnewline
50 & 0.0774 & -0.0991 & 0.0083 & 6.0134 & 0.5011 & 0.7079 \tabularnewline
51 & 0.0749 & -0.2104 & 0.0175 & 22.4861 & 1.8738 & 1.3689 \tabularnewline
52 & 0.071 & -0.1711 & 0.0143 & 11.4613 & 0.9551 & 0.9773 \tabularnewline
53 & 0.0874 & -0.3065 & 0.0255 & 50.0264 & 4.1689 & 2.0418 \tabularnewline
54 & 0.0951 & -0.3011 & 0.0251 & 49.9178 & 4.1598 & 2.0396 \tabularnewline
55 & 0.1026 & -0.261 & 0.0217 & 39.0642 & 3.2553 & 1.8043 \tabularnewline
56 & 0.1161 & -0.3552 & 0.0296 & 83.6359 & 6.9697 & 2.64 \tabularnewline
57 & 0.1084 & -0.3157 & 0.0263 & 55.8682 & 4.6557 & 2.1577 \tabularnewline
58 & 0.1348 & -0.3233 & 0.0269 & 76.4138 & 6.3678 & 2.5235 \tabularnewline
59 & 0.1248 & -0.2969 & 0.0247 & 55.2251 & 4.6021 & 2.1452 \tabularnewline
60 & 0.0954 & -0.2452 & 0.0204 & 24.0696 & 2.0058 & 1.4163 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68601&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.0688[/C][C]0.0053[/C][C]4e-04[/C][C]0.0144[/C][C]0.0012[/C][C]0.0347[/C][/ROW]
[ROW][C]50[/C][C]0.0774[/C][C]-0.0991[/C][C]0.0083[/C][C]6.0134[/C][C]0.5011[/C][C]0.7079[/C][/ROW]
[ROW][C]51[/C][C]0.0749[/C][C]-0.2104[/C][C]0.0175[/C][C]22.4861[/C][C]1.8738[/C][C]1.3689[/C][/ROW]
[ROW][C]52[/C][C]0.071[/C][C]-0.1711[/C][C]0.0143[/C][C]11.4613[/C][C]0.9551[/C][C]0.9773[/C][/ROW]
[ROW][C]53[/C][C]0.0874[/C][C]-0.3065[/C][C]0.0255[/C][C]50.0264[/C][C]4.1689[/C][C]2.0418[/C][/ROW]
[ROW][C]54[/C][C]0.0951[/C][C]-0.3011[/C][C]0.0251[/C][C]49.9178[/C][C]4.1598[/C][C]2.0396[/C][/ROW]
[ROW][C]55[/C][C]0.1026[/C][C]-0.261[/C][C]0.0217[/C][C]39.0642[/C][C]3.2553[/C][C]1.8043[/C][/ROW]
[ROW][C]56[/C][C]0.1161[/C][C]-0.3552[/C][C]0.0296[/C][C]83.6359[/C][C]6.9697[/C][C]2.64[/C][/ROW]
[ROW][C]57[/C][C]0.1084[/C][C]-0.3157[/C][C]0.0263[/C][C]55.8682[/C][C]4.6557[/C][C]2.1577[/C][/ROW]
[ROW][C]58[/C][C]0.1348[/C][C]-0.3233[/C][C]0.0269[/C][C]76.4138[/C][C]6.3678[/C][C]2.5235[/C][/ROW]
[ROW][C]59[/C][C]0.1248[/C][C]-0.2969[/C][C]0.0247[/C][C]55.2251[/C][C]4.6021[/C][C]2.1452[/C][/ROW]
[ROW][C]60[/C][C]0.0954[/C][C]-0.2452[/C][C]0.0204[/C][C]24.0696[/C][C]2.0058[/C][C]1.4163[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68601&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68601&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.06880.00534e-040.01440.00120.0347
500.0774-0.09910.00836.01340.50110.7079
510.0749-0.21040.017522.48611.87381.3689
520.071-0.17110.014311.46130.95510.9773
530.0874-0.30650.025550.02644.16892.0418
540.0951-0.30110.025149.91784.15982.0396
550.1026-0.2610.021739.06423.25531.8043
560.1161-0.35520.029683.63596.96972.64
570.1084-0.31570.026355.86824.65572.1577
580.1348-0.32330.026976.41386.36782.5235
590.1248-0.29690.024755.22514.60212.1452
600.0954-0.24520.020424.06962.00581.4163



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