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 computationFri, 19 Dec 2008 11:01:56 -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/19/t1229709747jwjgylplzsj02ea.htm/, Retrieved Wed, 15 May 2024 23:30:22 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35242, Retrieved Wed, 15 May 2024 23:30:22 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact196
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Box-Cox Linearity Plot] [Box-Cox] [2008-11-11 14:29:04] [adb6b6905cde49db36d59ca44433140d]
- RM D  [Box-Cox Normality Plot] [Box-Cox Normality...] [2008-11-11 14:44:37] [adb6b6905cde49db36d59ca44433140d]
F    D    [Box-Cox Normality Plot] [Box-Cox Normality...] [2008-11-11 23:46:30] [b591abfa820a394aeb0c5ebd9cfa1091]
F RMPD      [Maximum-likelihood Fitting - Normal Distribution] [Normal Distribution ] [2008-11-12 15:48:53] [b478325fa744e3f2fc16a7222294469c]
F   PD        [Maximum-likelihood Fitting - Normal Distribution] [task 8 maximum li...] [2008-11-12 20:17:58] [1eab65e90adf64584b8e6f0da23ff414]
- RMPD          [Box-Cox Normality Plot] [4.2.1] [2008-12-18 18:51:19] [1eab65e90adf64584b8e6f0da23ff414]
- RMP             [(Partial) Autocorrelation Function] [4.2.2] [2008-12-19 10:57:29] [1eab65e90adf64584b8e6f0da23ff414]
- RMP               [ARIMA Backward Selection] [4.3] [2008-12-19 14:24:21] [1eab65e90adf64584b8e6f0da23ff414]
- RMP                   [ARIMA Forecasting] [4.3] [2008-12-19 18:01:56] [0458bd763b171003ec052ce63099d477] [Current]
Feedback Forum

Post a new message
Dataseries X:
90.7
94.3
104.6
111.1
110
107.2
99
99
91
96.2
96.9
96.2
100.1
99
115.4
106.9
107.1
99.3
99.2
108.3
105.6
99.5
107.4
93.1
88.1
110.7
113.1
99.6
93.6
98.6
99.6
114.3
107.8
101.2
112.5
100.5
93.9
116.2
112
106.4
95.7
96
95.8
103
102.2
98.4
111.4
86.6
91.3
107.9
101.8
104.4
93.4
100.1
98.5
112.9
101.4
107.1
110.8
90.3
95.5
111.4
113
107.5
95.9
106.3
105.2
117.2
106.9
108.2
113
97.2
99.9
108.1
118.1
109.1
93.3
112.1
111.8
112.5
116.3
110.3
117.1
103.4
96.2




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ 72.249.76.132

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35242&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'George Udny Yule' @ 72.249.76.132







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[73])
6195.5-------
62111.4-------
63113-------
64107.5-------
6595.9-------
66106.3-------
67105.2-------
68117.2-------
69106.9-------
70108.2-------
71113-------
7297.2-------
7399.9-------
74108.1113.8545102.0524125.65670.16960.98980.65820.9898
75118.1114.7078102.2744127.14120.29640.85120.60610.9902
76109.1108.688295.9605121.41590.47470.07360.57260.912
7793.396.726783.8589109.59450.30090.02970.55010.3144
78112.1106.875293.9401119.81020.21430.98020.53470.8547
79111.8105.600292.6327118.56770.17440.16290.52410.8055
80112.5117.4784104.4953130.46160.22620.80430.51680.996
81116.3107.093794.103120.08440.08240.20730.51170.8611
82110.3108.334895.3404121.32920.38350.11480.50810.8984
83117.1113.0938100.0976126.08990.27290.66320.50560.9767
84103.497.265284.2682110.26230.17740.00140.50390.3456
8596.299.945486.948112.94280.28610.30120.50270.5027

\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[73]) \tabularnewline
61 & 95.5 & - & - & - & - & - & - & - \tabularnewline
62 & 111.4 & - & - & - & - & - & - & - \tabularnewline
63 & 113 & - & - & - & - & - & - & - \tabularnewline
64 & 107.5 & - & - & - & - & - & - & - \tabularnewline
65 & 95.9 & - & - & - & - & - & - & - \tabularnewline
66 & 106.3 & - & - & - & - & - & - & - \tabularnewline
67 & 105.2 & - & - & - & - & - & - & - \tabularnewline
68 & 117.2 & - & - & - & - & - & - & - \tabularnewline
69 & 106.9 & - & - & - & - & - & - & - \tabularnewline
70 & 108.2 & - & - & - & - & - & - & - \tabularnewline
71 & 113 & - & - & - & - & - & - & - \tabularnewline
72 & 97.2 & - & - & - & - & - & - & - \tabularnewline
73 & 99.9 & - & - & - & - & - & - & - \tabularnewline
74 & 108.1 & 113.8545 & 102.0524 & 125.6567 & 0.1696 & 0.9898 & 0.6582 & 0.9898 \tabularnewline
75 & 118.1 & 114.7078 & 102.2744 & 127.1412 & 0.2964 & 0.8512 & 0.6061 & 0.9902 \tabularnewline
76 & 109.1 & 108.6882 & 95.9605 & 121.4159 & 0.4747 & 0.0736 & 0.5726 & 0.912 \tabularnewline
77 & 93.3 & 96.7267 & 83.8589 & 109.5945 & 0.3009 & 0.0297 & 0.5501 & 0.3144 \tabularnewline
78 & 112.1 & 106.8752 & 93.9401 & 119.8102 & 0.2143 & 0.9802 & 0.5347 & 0.8547 \tabularnewline
79 & 111.8 & 105.6002 & 92.6327 & 118.5677 & 0.1744 & 0.1629 & 0.5241 & 0.8055 \tabularnewline
80 & 112.5 & 117.4784 & 104.4953 & 130.4616 & 0.2262 & 0.8043 & 0.5168 & 0.996 \tabularnewline
81 & 116.3 & 107.0937 & 94.103 & 120.0844 & 0.0824 & 0.2073 & 0.5117 & 0.8611 \tabularnewline
82 & 110.3 & 108.3348 & 95.3404 & 121.3292 & 0.3835 & 0.1148 & 0.5081 & 0.8984 \tabularnewline
83 & 117.1 & 113.0938 & 100.0976 & 126.0899 & 0.2729 & 0.6632 & 0.5056 & 0.9767 \tabularnewline
84 & 103.4 & 97.2652 & 84.2682 & 110.2623 & 0.1774 & 0.0014 & 0.5039 & 0.3456 \tabularnewline
85 & 96.2 & 99.9454 & 86.948 & 112.9428 & 0.2861 & 0.3012 & 0.5027 & 0.5027 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35242&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[73])[/C][/ROW]
[ROW][C]61[/C][C]95.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]111.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]113[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]107.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]95.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]106.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]105.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]106.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]108.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]113[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]97.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]99.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]108.1[/C][C]113.8545[/C][C]102.0524[/C][C]125.6567[/C][C]0.1696[/C][C]0.9898[/C][C]0.6582[/C][C]0.9898[/C][/ROW]
[ROW][C]75[/C][C]118.1[/C][C]114.7078[/C][C]102.2744[/C][C]127.1412[/C][C]0.2964[/C][C]0.8512[/C][C]0.6061[/C][C]0.9902[/C][/ROW]
[ROW][C]76[/C][C]109.1[/C][C]108.6882[/C][C]95.9605[/C][C]121.4159[/C][C]0.4747[/C][C]0.0736[/C][C]0.5726[/C][C]0.912[/C][/ROW]
[ROW][C]77[/C][C]93.3[/C][C]96.7267[/C][C]83.8589[/C][C]109.5945[/C][C]0.3009[/C][C]0.0297[/C][C]0.5501[/C][C]0.3144[/C][/ROW]
[ROW][C]78[/C][C]112.1[/C][C]106.8752[/C][C]93.9401[/C][C]119.8102[/C][C]0.2143[/C][C]0.9802[/C][C]0.5347[/C][C]0.8547[/C][/ROW]
[ROW][C]79[/C][C]111.8[/C][C]105.6002[/C][C]92.6327[/C][C]118.5677[/C][C]0.1744[/C][C]0.1629[/C][C]0.5241[/C][C]0.8055[/C][/ROW]
[ROW][C]80[/C][C]112.5[/C][C]117.4784[/C][C]104.4953[/C][C]130.4616[/C][C]0.2262[/C][C]0.8043[/C][C]0.5168[/C][C]0.996[/C][/ROW]
[ROW][C]81[/C][C]116.3[/C][C]107.0937[/C][C]94.103[/C][C]120.0844[/C][C]0.0824[/C][C]0.2073[/C][C]0.5117[/C][C]0.8611[/C][/ROW]
[ROW][C]82[/C][C]110.3[/C][C]108.3348[/C][C]95.3404[/C][C]121.3292[/C][C]0.3835[/C][C]0.1148[/C][C]0.5081[/C][C]0.8984[/C][/ROW]
[ROW][C]83[/C][C]117.1[/C][C]113.0938[/C][C]100.0976[/C][C]126.0899[/C][C]0.2729[/C][C]0.6632[/C][C]0.5056[/C][C]0.9767[/C][/ROW]
[ROW][C]84[/C][C]103.4[/C][C]97.2652[/C][C]84.2682[/C][C]110.2623[/C][C]0.1774[/C][C]0.0014[/C][C]0.5039[/C][C]0.3456[/C][/ROW]
[ROW][C]85[/C][C]96.2[/C][C]99.9454[/C][C]86.948[/C][C]112.9428[/C][C]0.2861[/C][C]0.3012[/C][C]0.5027[/C][C]0.5027[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35242&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35242&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[73])
6195.5-------
62111.4-------
63113-------
64107.5-------
6595.9-------
66106.3-------
67105.2-------
68117.2-------
69106.9-------
70108.2-------
71113-------
7297.2-------
7399.9-------
74108.1113.8545102.0524125.65670.16960.98980.65820.9898
75118.1114.7078102.2744127.14120.29640.85120.60610.9902
76109.1108.688295.9605121.41590.47470.07360.57260.912
7793.396.726783.8589109.59450.30090.02970.55010.3144
78112.1106.875293.9401119.81020.21430.98020.53470.8547
79111.8105.600292.6327118.56770.17440.16290.52410.8055
80112.5117.4784104.4953130.46160.22620.80430.51680.996
81116.3107.093794.103120.08440.08240.20730.51170.8611
82110.3108.334895.3404121.32920.38350.11480.50810.8984
83117.1113.0938100.0976126.08990.27290.66320.50560.9767
84103.497.265284.2682110.26230.17740.00140.50390.3456
8596.299.945486.948112.94280.28610.30120.50270.5027







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
740.0529-0.05050.004233.11482.75961.6612
750.05530.02960.002511.50720.95890.9793
760.05970.00383e-040.16960.01410.1189
770.0679-0.03540.00311.74230.97850.9892
780.06170.04890.004127.29872.27491.5083
790.06270.05870.004938.43763.20311.7897
800.0564-0.04240.003524.78482.06541.4372
810.06190.0860.007284.75557.0632.6576
820.06120.01810.00153.86210.32180.5673
830.05860.03540.00316.04981.33751.1565
840.06820.06310.005337.63523.13631.771
850.0663-0.03750.003114.0281.1691.0812

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
74 & 0.0529 & -0.0505 & 0.0042 & 33.1148 & 2.7596 & 1.6612 \tabularnewline
75 & 0.0553 & 0.0296 & 0.0025 & 11.5072 & 0.9589 & 0.9793 \tabularnewline
76 & 0.0597 & 0.0038 & 3e-04 & 0.1696 & 0.0141 & 0.1189 \tabularnewline
77 & 0.0679 & -0.0354 & 0.003 & 11.7423 & 0.9785 & 0.9892 \tabularnewline
78 & 0.0617 & 0.0489 & 0.0041 & 27.2987 & 2.2749 & 1.5083 \tabularnewline
79 & 0.0627 & 0.0587 & 0.0049 & 38.4376 & 3.2031 & 1.7897 \tabularnewline
80 & 0.0564 & -0.0424 & 0.0035 & 24.7848 & 2.0654 & 1.4372 \tabularnewline
81 & 0.0619 & 0.086 & 0.0072 & 84.7555 & 7.063 & 2.6576 \tabularnewline
82 & 0.0612 & 0.0181 & 0.0015 & 3.8621 & 0.3218 & 0.5673 \tabularnewline
83 & 0.0586 & 0.0354 & 0.003 & 16.0498 & 1.3375 & 1.1565 \tabularnewline
84 & 0.0682 & 0.0631 & 0.0053 & 37.6352 & 3.1363 & 1.771 \tabularnewline
85 & 0.0663 & -0.0375 & 0.0031 & 14.028 & 1.169 & 1.0812 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35242&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]74[/C][C]0.0529[/C][C]-0.0505[/C][C]0.0042[/C][C]33.1148[/C][C]2.7596[/C][C]1.6612[/C][/ROW]
[ROW][C]75[/C][C]0.0553[/C][C]0.0296[/C][C]0.0025[/C][C]11.5072[/C][C]0.9589[/C][C]0.9793[/C][/ROW]
[ROW][C]76[/C][C]0.0597[/C][C]0.0038[/C][C]3e-04[/C][C]0.1696[/C][C]0.0141[/C][C]0.1189[/C][/ROW]
[ROW][C]77[/C][C]0.0679[/C][C]-0.0354[/C][C]0.003[/C][C]11.7423[/C][C]0.9785[/C][C]0.9892[/C][/ROW]
[ROW][C]78[/C][C]0.0617[/C][C]0.0489[/C][C]0.0041[/C][C]27.2987[/C][C]2.2749[/C][C]1.5083[/C][/ROW]
[ROW][C]79[/C][C]0.0627[/C][C]0.0587[/C][C]0.0049[/C][C]38.4376[/C][C]3.2031[/C][C]1.7897[/C][/ROW]
[ROW][C]80[/C][C]0.0564[/C][C]-0.0424[/C][C]0.0035[/C][C]24.7848[/C][C]2.0654[/C][C]1.4372[/C][/ROW]
[ROW][C]81[/C][C]0.0619[/C][C]0.086[/C][C]0.0072[/C][C]84.7555[/C][C]7.063[/C][C]2.6576[/C][/ROW]
[ROW][C]82[/C][C]0.0612[/C][C]0.0181[/C][C]0.0015[/C][C]3.8621[/C][C]0.3218[/C][C]0.5673[/C][/ROW]
[ROW][C]83[/C][C]0.0586[/C][C]0.0354[/C][C]0.003[/C][C]16.0498[/C][C]1.3375[/C][C]1.1565[/C][/ROW]
[ROW][C]84[/C][C]0.0682[/C][C]0.0631[/C][C]0.0053[/C][C]37.6352[/C][C]3.1363[/C][C]1.771[/C][/ROW]
[ROW][C]85[/C][C]0.0663[/C][C]-0.0375[/C][C]0.0031[/C][C]14.028[/C][C]1.169[/C][C]1.0812[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35242&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35242&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
740.0529-0.05050.004233.11482.75961.6612
750.05530.02960.002511.50720.95890.9793
760.05970.00383e-040.16960.01410.1189
770.0679-0.03540.00311.74230.97850.9892
780.06170.04890.004127.29872.27491.5083
790.06270.05870.004938.43763.20311.7897
800.0564-0.04240.003524.78482.06541.4372
810.06190.0860.007284.75557.0632.6576
820.06120.01810.00153.86210.32180.5673
830.05860.03540.00316.04981.33751.1565
840.06820.06310.005337.63523.13631.771
850.0663-0.03750.003114.0281.1691.0812



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