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, 14 Dec 2009 12:29:29 -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/14/t1260823636pfxaj4o2ftmdi3i.htm/, Retrieved Sun, 05 May 2024 11:51:07 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=67672, Retrieved Sun, 05 May 2024 11:51:07 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact108
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [ARIMA Backward Selection] [] [2009-11-27 14:53:14] [b98453cac15ba1066b407e146608df68]
- RMPD      [ARIMA Forecasting] [Voorspellingen me...] [2009-12-14 19:29:29] [2210215221105fab636491031ce54076] [Current]
Feedback Forum

Post a new message
Dataseries X:
91.02
91.19
91.53
91.88
92.06
92.32
92.67
92.85
92.82
93.46
93.23
93.54
93.29
93.20
93.60
93.81
94.62
95.22
95.38
95.31
95.30
95.57
95.42
95.53
95.33
95.90
96.06
96.31
96.34
96.49
96.22
96.53
96.50
96.77
96.66
96.58
96.63
97.06
97.73
98.01
97.76
97.49
97.77
97.96
98.23
98.51
98.19
98.37
98.31
98.60
98.97
99.11
99.64
100.03
99.98
100.32
100.44
100.51
101.00
100.88
100.55
100.83
101.51
102.16
102.39
102.54
102.85
103.47
103.57
103.69
103.50
103.47
103.45
103.48
103.93
103.89
104.40
104.79
104.77
105.13
105.26
104.96
104.75
105.01
105.15
105.20
105.77
105.78
106.26
106.13
106.12
106.57
106.44
106.54
107.10
108.10
108.40
108.84
109.62
110.42
110.67
111.66
112.28
112.87
112.18
112.36
112.16
111.49
111.25
111.36
111.74
111.10
111.33
111.25
111.04
110.97
111.31
111.02
111.07
111.36




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67672&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67672&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67672&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'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[108])
96108.1-------
97108.4-------
98108.84-------
99109.62-------
100110.42-------
101110.67-------
102111.66-------
103112.28-------
104112.87-------
105112.18-------
106112.36-------
107112.16-------
108111.49-------
109111.25111.3811110.7866111.97570.33270.359910.3599
110111.36111.4759110.5359112.41590.40450.681210.4883
111111.74112.0138110.8248113.20290.32590.859410.806
112111.1112.1095110.7153113.50380.07790.69830.99120.8081
113111.33112.5725110.9996114.14550.06080.96670.99110.9113
114111.25112.868111.1347114.60130.03370.9590.9140.9404
115111.04112.9417111.0617114.82180.02370.96110.75490.9349
116110.97113.3652111.3491115.38130.00990.98810.68490.9658
117111.31113.2899111.1463115.43350.03510.9830.84490.9501
118111.02113.1955110.9316115.45940.02980.94870.76530.9301
119111.07113.2522110.8741115.63030.0360.96710.8160.9268
120111.36113.636111.1489116.12310.03640.97840.95460.9546

\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[108]) \tabularnewline
96 & 108.1 & - & - & - & - & - & - & - \tabularnewline
97 & 108.4 & - & - & - & - & - & - & - \tabularnewline
98 & 108.84 & - & - & - & - & - & - & - \tabularnewline
99 & 109.62 & - & - & - & - & - & - & - \tabularnewline
100 & 110.42 & - & - & - & - & - & - & - \tabularnewline
101 & 110.67 & - & - & - & - & - & - & - \tabularnewline
102 & 111.66 & - & - & - & - & - & - & - \tabularnewline
103 & 112.28 & - & - & - & - & - & - & - \tabularnewline
104 & 112.87 & - & - & - & - & - & - & - \tabularnewline
105 & 112.18 & - & - & - & - & - & - & - \tabularnewline
106 & 112.36 & - & - & - & - & - & - & - \tabularnewline
107 & 112.16 & - & - & - & - & - & - & - \tabularnewline
108 & 111.49 & - & - & - & - & - & - & - \tabularnewline
109 & 111.25 & 111.3811 & 110.7866 & 111.9757 & 0.3327 & 0.3599 & 1 & 0.3599 \tabularnewline
110 & 111.36 & 111.4759 & 110.5359 & 112.4159 & 0.4045 & 0.6812 & 1 & 0.4883 \tabularnewline
111 & 111.74 & 112.0138 & 110.8248 & 113.2029 & 0.3259 & 0.8594 & 1 & 0.806 \tabularnewline
112 & 111.1 & 112.1095 & 110.7153 & 113.5038 & 0.0779 & 0.6983 & 0.9912 & 0.8081 \tabularnewline
113 & 111.33 & 112.5725 & 110.9996 & 114.1455 & 0.0608 & 0.9667 & 0.9911 & 0.9113 \tabularnewline
114 & 111.25 & 112.868 & 111.1347 & 114.6013 & 0.0337 & 0.959 & 0.914 & 0.9404 \tabularnewline
115 & 111.04 & 112.9417 & 111.0617 & 114.8218 & 0.0237 & 0.9611 & 0.7549 & 0.9349 \tabularnewline
116 & 110.97 & 113.3652 & 111.3491 & 115.3813 & 0.0099 & 0.9881 & 0.6849 & 0.9658 \tabularnewline
117 & 111.31 & 113.2899 & 111.1463 & 115.4335 & 0.0351 & 0.983 & 0.8449 & 0.9501 \tabularnewline
118 & 111.02 & 113.1955 & 110.9316 & 115.4594 & 0.0298 & 0.9487 & 0.7653 & 0.9301 \tabularnewline
119 & 111.07 & 113.2522 & 110.8741 & 115.6303 & 0.036 & 0.9671 & 0.816 & 0.9268 \tabularnewline
120 & 111.36 & 113.636 & 111.1489 & 116.1231 & 0.0364 & 0.9784 & 0.9546 & 0.9546 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67672&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[108])[/C][/ROW]
[ROW][C]96[/C][C]108.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]108.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]108.84[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]109.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]110.42[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]110.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]111.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]112.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]112.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]112.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]112.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]112.16[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]111.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]111.25[/C][C]111.3811[/C][C]110.7866[/C][C]111.9757[/C][C]0.3327[/C][C]0.3599[/C][C]1[/C][C]0.3599[/C][/ROW]
[ROW][C]110[/C][C]111.36[/C][C]111.4759[/C][C]110.5359[/C][C]112.4159[/C][C]0.4045[/C][C]0.6812[/C][C]1[/C][C]0.4883[/C][/ROW]
[ROW][C]111[/C][C]111.74[/C][C]112.0138[/C][C]110.8248[/C][C]113.2029[/C][C]0.3259[/C][C]0.8594[/C][C]1[/C][C]0.806[/C][/ROW]
[ROW][C]112[/C][C]111.1[/C][C]112.1095[/C][C]110.7153[/C][C]113.5038[/C][C]0.0779[/C][C]0.6983[/C][C]0.9912[/C][C]0.8081[/C][/ROW]
[ROW][C]113[/C][C]111.33[/C][C]112.5725[/C][C]110.9996[/C][C]114.1455[/C][C]0.0608[/C][C]0.9667[/C][C]0.9911[/C][C]0.9113[/C][/ROW]
[ROW][C]114[/C][C]111.25[/C][C]112.868[/C][C]111.1347[/C][C]114.6013[/C][C]0.0337[/C][C]0.959[/C][C]0.914[/C][C]0.9404[/C][/ROW]
[ROW][C]115[/C][C]111.04[/C][C]112.9417[/C][C]111.0617[/C][C]114.8218[/C][C]0.0237[/C][C]0.9611[/C][C]0.7549[/C][C]0.9349[/C][/ROW]
[ROW][C]116[/C][C]110.97[/C][C]113.3652[/C][C]111.3491[/C][C]115.3813[/C][C]0.0099[/C][C]0.9881[/C][C]0.6849[/C][C]0.9658[/C][/ROW]
[ROW][C]117[/C][C]111.31[/C][C]113.2899[/C][C]111.1463[/C][C]115.4335[/C][C]0.0351[/C][C]0.983[/C][C]0.8449[/C][C]0.9501[/C][/ROW]
[ROW][C]118[/C][C]111.02[/C][C]113.1955[/C][C]110.9316[/C][C]115.4594[/C][C]0.0298[/C][C]0.9487[/C][C]0.7653[/C][C]0.9301[/C][/ROW]
[ROW][C]119[/C][C]111.07[/C][C]113.2522[/C][C]110.8741[/C][C]115.6303[/C][C]0.036[/C][C]0.9671[/C][C]0.816[/C][C]0.9268[/C][/ROW]
[ROW][C]120[/C][C]111.36[/C][C]113.636[/C][C]111.1489[/C][C]116.1231[/C][C]0.0364[/C][C]0.9784[/C][C]0.9546[/C][C]0.9546[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67672&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67672&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[108])
96108.1-------
97108.4-------
98108.84-------
99109.62-------
100110.42-------
101110.67-------
102111.66-------
103112.28-------
104112.87-------
105112.18-------
106112.36-------
107112.16-------
108111.49-------
109111.25111.3811110.7866111.97570.33270.359910.3599
110111.36111.4759110.5359112.41590.40450.681210.4883
111111.74112.0138110.8248113.20290.32590.859410.806
112111.1112.1095110.7153113.50380.07790.69830.99120.8081
113111.33112.5725110.9996114.14550.06080.96670.99110.9113
114111.25112.868111.1347114.60130.03370.9590.9140.9404
115111.04112.9417111.0617114.82180.02370.96110.75490.9349
116110.97113.3652111.3491115.38130.00990.98810.68490.9658
117111.31113.2899111.1463115.43350.03510.9830.84490.9501
118111.02113.1955110.9316115.45940.02980.94870.76530.9301
119111.07113.2522110.8741115.63030.0360.96710.8160.9268
120111.36113.636111.1489116.12310.03640.97840.95460.9546







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1090.0027-0.001200.017200
1100.0043-0.0010.00110.01340.01530.1238
1110.0054-0.00240.00160.0750.03520.1876
1120.0063-0.0090.00341.01920.28120.5303
1130.0071-0.0110.00491.54390.53370.7306
1140.0078-0.01430.00652.61790.88110.9387
1150.0085-0.01680.0083.61661.27191.1278
1160.0091-0.02110.00965.7371.831.3528
1170.0097-0.01750.01053.92012.06221.4361
1180.0102-0.01920.01144.73272.32931.5262
1190.0107-0.01930.01214.76212.55051.597
1200.0112-0.020.01275.18022.76961.6642

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
109 & 0.0027 & -0.0012 & 0 & 0.0172 & 0 & 0 \tabularnewline
110 & 0.0043 & -0.001 & 0.0011 & 0.0134 & 0.0153 & 0.1238 \tabularnewline
111 & 0.0054 & -0.0024 & 0.0016 & 0.075 & 0.0352 & 0.1876 \tabularnewline
112 & 0.0063 & -0.009 & 0.0034 & 1.0192 & 0.2812 & 0.5303 \tabularnewline
113 & 0.0071 & -0.011 & 0.0049 & 1.5439 & 0.5337 & 0.7306 \tabularnewline
114 & 0.0078 & -0.0143 & 0.0065 & 2.6179 & 0.8811 & 0.9387 \tabularnewline
115 & 0.0085 & -0.0168 & 0.008 & 3.6166 & 1.2719 & 1.1278 \tabularnewline
116 & 0.0091 & -0.0211 & 0.0096 & 5.737 & 1.83 & 1.3528 \tabularnewline
117 & 0.0097 & -0.0175 & 0.0105 & 3.9201 & 2.0622 & 1.4361 \tabularnewline
118 & 0.0102 & -0.0192 & 0.0114 & 4.7327 & 2.3293 & 1.5262 \tabularnewline
119 & 0.0107 & -0.0193 & 0.0121 & 4.7621 & 2.5505 & 1.597 \tabularnewline
120 & 0.0112 & -0.02 & 0.0127 & 5.1802 & 2.7696 & 1.6642 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67672&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]109[/C][C]0.0027[/C][C]-0.0012[/C][C]0[/C][C]0.0172[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]110[/C][C]0.0043[/C][C]-0.001[/C][C]0.0011[/C][C]0.0134[/C][C]0.0153[/C][C]0.1238[/C][/ROW]
[ROW][C]111[/C][C]0.0054[/C][C]-0.0024[/C][C]0.0016[/C][C]0.075[/C][C]0.0352[/C][C]0.1876[/C][/ROW]
[ROW][C]112[/C][C]0.0063[/C][C]-0.009[/C][C]0.0034[/C][C]1.0192[/C][C]0.2812[/C][C]0.5303[/C][/ROW]
[ROW][C]113[/C][C]0.0071[/C][C]-0.011[/C][C]0.0049[/C][C]1.5439[/C][C]0.5337[/C][C]0.7306[/C][/ROW]
[ROW][C]114[/C][C]0.0078[/C][C]-0.0143[/C][C]0.0065[/C][C]2.6179[/C][C]0.8811[/C][C]0.9387[/C][/ROW]
[ROW][C]115[/C][C]0.0085[/C][C]-0.0168[/C][C]0.008[/C][C]3.6166[/C][C]1.2719[/C][C]1.1278[/C][/ROW]
[ROW][C]116[/C][C]0.0091[/C][C]-0.0211[/C][C]0.0096[/C][C]5.737[/C][C]1.83[/C][C]1.3528[/C][/ROW]
[ROW][C]117[/C][C]0.0097[/C][C]-0.0175[/C][C]0.0105[/C][C]3.9201[/C][C]2.0622[/C][C]1.4361[/C][/ROW]
[ROW][C]118[/C][C]0.0102[/C][C]-0.0192[/C][C]0.0114[/C][C]4.7327[/C][C]2.3293[/C][C]1.5262[/C][/ROW]
[ROW][C]119[/C][C]0.0107[/C][C]-0.0193[/C][C]0.0121[/C][C]4.7621[/C][C]2.5505[/C][C]1.597[/C][/ROW]
[ROW][C]120[/C][C]0.0112[/C][C]-0.02[/C][C]0.0127[/C][C]5.1802[/C][C]2.7696[/C][C]1.6642[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67672&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67672&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
1090.0027-0.001200.017200
1100.0043-0.0010.00110.01340.01530.1238
1110.0054-0.00240.00160.0750.03520.1876
1120.0063-0.0090.00341.01920.28120.5303
1130.0071-0.0110.00491.54390.53370.7306
1140.0078-0.01430.00652.61790.88110.9387
1150.0085-0.01680.0083.61661.27191.1278
1160.0091-0.02110.00965.7371.831.3528
1170.0097-0.01750.01053.92012.06221.4361
1180.0102-0.01920.01144.73272.32931.5262
1190.0107-0.01930.01214.76212.55051.597
1200.0112-0.020.01275.18022.76961.6642



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