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, 21 Dec 2010 17:11:25 +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/21/t1292951344a2879shjts2v3py.htm/, Retrieved Sun, 19 May 2024 17:45:54 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113761, Retrieved Sun, 19 May 2024 17:45:54 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact147
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   [(Partial) Autocorrelation Function] [WS8 Autocorolation] [2010-12-01 09:55:45] [b84bdc9bd81e1f02ca0dcc4710c1b790]
- RMPD      [ARIMA Forecasting] [forecast] [2010-12-21 17:11:25] [a8abc7260f3c847aeac0a796e7895a2e] [Current]
- RMP         [Univariate Explorative Data Analysis] [EDA] [2010-12-22 14:07:20] [fc9068db680cd880760a7c0fccd81a61]
- RMP         [Central Tendency] [central tendency] [2010-12-22 14:14:16] [fc9068db680cd880760a7c0fccd81a61]
Feedback Forum

Post a new message
Dataseries X:
143827
145191
146832
148577
149873
151847
153252
154292
155657
156523
156416
156693
160312
160438
160882
161668
164391
168556
169738
170387
171294
172202
172651
172770
178366
180014
181067
182586
184957
186417
188599
189490
190264
191221
191110
190674
195438
196393
197172
198760
200945
203845
204613
205487
206100
206315
206291
207801
211653
211325
211893
212056
214696
217455
218884
219816
219984
219062
218550
218179
222218
222196
223393
223292
226236
228831
228745
229140
229270
229359
230006
228810
232677
232961
234629
235660
240024
243554
244368
244356
245126
246321
246797
246735
251083
251786
252732
255051
259022
261698
263891
265247
262228
263429
264305
266371
273248
275472
278146
279506
283991
286794
288703
289285
288869
286942
285833
284095
289229
289389
290793
291454
294733
293853
294056
293982
293075
292391




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113761&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[106])
94263429-------
95264305-------
96266371-------
97273248-------
98275472-------
99278146-------
100279506-------
101283991-------
102286794-------
103288703-------
104289285-------
105288869-------
106286942-------
107285833286765.4228284924.046288606.79960.16050.425510.4255
108284095286954.1256284043.4692289864.78210.02710.774910.5033
109289229291840.1264288027.4138295652.8390.0897110.9941
110289389292772.7531288191.3094297354.19680.07390.935210.9937
111290793294301.285289046.9025299555.66760.09530.966610.997
112291454295565.116289708.9563301421.27580.08440.944910.998
113294733299214.6323292810.8886305618.3760.08510.991210.9999
114293853302040.2717295131.4177308949.12570.01010.980911
115294056303496.8559296117.0841310876.62770.00610.994811
116293982304206.2339296383.7296312028.73810.00520.99450.99991
117293075303754.9996295513.4715311996.52770.00550.98990.99981
118292391303680.7078295040.444312320.97160.00520.99190.99990.9999

\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[106]) \tabularnewline
94 & 263429 & - & - & - & - & - & - & - \tabularnewline
95 & 264305 & - & - & - & - & - & - & - \tabularnewline
96 & 266371 & - & - & - & - & - & - & - \tabularnewline
97 & 273248 & - & - & - & - & - & - & - \tabularnewline
98 & 275472 & - & - & - & - & - & - & - \tabularnewline
99 & 278146 & - & - & - & - & - & - & - \tabularnewline
100 & 279506 & - & - & - & - & - & - & - \tabularnewline
101 & 283991 & - & - & - & - & - & - & - \tabularnewline
102 & 286794 & - & - & - & - & - & - & - \tabularnewline
103 & 288703 & - & - & - & - & - & - & - \tabularnewline
104 & 289285 & - & - & - & - & - & - & - \tabularnewline
105 & 288869 & - & - & - & - & - & - & - \tabularnewline
106 & 286942 & - & - & - & - & - & - & - \tabularnewline
107 & 285833 & 286765.4228 & 284924.046 & 288606.7996 & 0.1605 & 0.4255 & 1 & 0.4255 \tabularnewline
108 & 284095 & 286954.1256 & 284043.4692 & 289864.7821 & 0.0271 & 0.7749 & 1 & 0.5033 \tabularnewline
109 & 289229 & 291840.1264 & 288027.4138 & 295652.839 & 0.0897 & 1 & 1 & 0.9941 \tabularnewline
110 & 289389 & 292772.7531 & 288191.3094 & 297354.1968 & 0.0739 & 0.9352 & 1 & 0.9937 \tabularnewline
111 & 290793 & 294301.285 & 289046.9025 & 299555.6676 & 0.0953 & 0.9666 & 1 & 0.997 \tabularnewline
112 & 291454 & 295565.116 & 289708.9563 & 301421.2758 & 0.0844 & 0.9449 & 1 & 0.998 \tabularnewline
113 & 294733 & 299214.6323 & 292810.8886 & 305618.376 & 0.0851 & 0.9912 & 1 & 0.9999 \tabularnewline
114 & 293853 & 302040.2717 & 295131.4177 & 308949.1257 & 0.0101 & 0.9809 & 1 & 1 \tabularnewline
115 & 294056 & 303496.8559 & 296117.0841 & 310876.6277 & 0.0061 & 0.9948 & 1 & 1 \tabularnewline
116 & 293982 & 304206.2339 & 296383.7296 & 312028.7381 & 0.0052 & 0.9945 & 0.9999 & 1 \tabularnewline
117 & 293075 & 303754.9996 & 295513.4715 & 311996.5277 & 0.0055 & 0.9899 & 0.9998 & 1 \tabularnewline
118 & 292391 & 303680.7078 & 295040.444 & 312320.9716 & 0.0052 & 0.9919 & 0.9999 & 0.9999 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113761&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[106])[/C][/ROW]
[ROW][C]94[/C][C]263429[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]264305[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]266371[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]273248[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]275472[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]278146[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]279506[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]283991[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]286794[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]288703[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]289285[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]288869[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]286942[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]285833[/C][C]286765.4228[/C][C]284924.046[/C][C]288606.7996[/C][C]0.1605[/C][C]0.4255[/C][C]1[/C][C]0.4255[/C][/ROW]
[ROW][C]108[/C][C]284095[/C][C]286954.1256[/C][C]284043.4692[/C][C]289864.7821[/C][C]0.0271[/C][C]0.7749[/C][C]1[/C][C]0.5033[/C][/ROW]
[ROW][C]109[/C][C]289229[/C][C]291840.1264[/C][C]288027.4138[/C][C]295652.839[/C][C]0.0897[/C][C]1[/C][C]1[/C][C]0.9941[/C][/ROW]
[ROW][C]110[/C][C]289389[/C][C]292772.7531[/C][C]288191.3094[/C][C]297354.1968[/C][C]0.0739[/C][C]0.9352[/C][C]1[/C][C]0.9937[/C][/ROW]
[ROW][C]111[/C][C]290793[/C][C]294301.285[/C][C]289046.9025[/C][C]299555.6676[/C][C]0.0953[/C][C]0.9666[/C][C]1[/C][C]0.997[/C][/ROW]
[ROW][C]112[/C][C]291454[/C][C]295565.116[/C][C]289708.9563[/C][C]301421.2758[/C][C]0.0844[/C][C]0.9449[/C][C]1[/C][C]0.998[/C][/ROW]
[ROW][C]113[/C][C]294733[/C][C]299214.6323[/C][C]292810.8886[/C][C]305618.376[/C][C]0.0851[/C][C]0.9912[/C][C]1[/C][C]0.9999[/C][/ROW]
[ROW][C]114[/C][C]293853[/C][C]302040.2717[/C][C]295131.4177[/C][C]308949.1257[/C][C]0.0101[/C][C]0.9809[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]115[/C][C]294056[/C][C]303496.8559[/C][C]296117.0841[/C][C]310876.6277[/C][C]0.0061[/C][C]0.9948[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]116[/C][C]293982[/C][C]304206.2339[/C][C]296383.7296[/C][C]312028.7381[/C][C]0.0052[/C][C]0.9945[/C][C]0.9999[/C][C]1[/C][/ROW]
[ROW][C]117[/C][C]293075[/C][C]303754.9996[/C][C]295513.4715[/C][C]311996.5277[/C][C]0.0055[/C][C]0.9899[/C][C]0.9998[/C][C]1[/C][/ROW]
[ROW][C]118[/C][C]292391[/C][C]303680.7078[/C][C]295040.444[/C][C]312320.9716[/C][C]0.0052[/C][C]0.9919[/C][C]0.9999[/C][C]0.9999[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113761&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113761&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[106])
94263429-------
95264305-------
96266371-------
97273248-------
98275472-------
99278146-------
100279506-------
101283991-------
102286794-------
103288703-------
104289285-------
105288869-------
106286942-------
107285833286765.4228284924.046288606.79960.16050.425510.4255
108284095286954.1256284043.4692289864.78210.02710.774910.5033
109289229291840.1264288027.4138295652.8390.0897110.9941
110289389292772.7531288191.3094297354.19680.07390.935210.9937
111290793294301.285289046.9025299555.66760.09530.966610.997
112291454295565.116289708.9563301421.27580.08440.944910.998
113294733299214.6323292810.8886305618.3760.08510.991210.9999
114293853302040.2717295131.4177308949.12570.01010.980911
115294056303496.8559296117.0841310876.62770.00610.994811
116293982304206.2339296383.7296312028.73810.00520.99450.99991
117293075303754.9996295513.4715311996.52770.00550.98990.99981
118292391303680.7078295040.444312320.97160.00520.99190.99990.9999







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1070.0033-0.00330869412.283600
1080.0052-0.010.00668174599.47184522005.87772126.5009
1090.0067-0.00890.00746817981.04755287330.93432299.4197
1100.008-0.01160.008411449784.83146827944.40862613.0336
1110.0091-0.01190.009112308063.95647923968.31812814.9544
1120.0101-0.01390.009916901275.00959420186.13069.2322
1130.0109-0.0150.010620085028.001510943734.94313308.1316
1140.0117-0.02710.012767031417.963217954695.32064237.2981
1150.0124-0.03110.014789129760.249625863035.86835085.5713
1160.0131-0.03360.0166104534958.005533730228.0825807.7731
1170.0138-0.03520.0183114062391.327541033152.01346405.7125
1180.0145-0.03720.0199127457502.766548235181.24286945.1552

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
107 & 0.0033 & -0.0033 & 0 & 869412.2836 & 0 & 0 \tabularnewline
108 & 0.0052 & -0.01 & 0.0066 & 8174599.4718 & 4522005.8777 & 2126.5009 \tabularnewline
109 & 0.0067 & -0.0089 & 0.0074 & 6817981.0475 & 5287330.9343 & 2299.4197 \tabularnewline
110 & 0.008 & -0.0116 & 0.0084 & 11449784.8314 & 6827944.4086 & 2613.0336 \tabularnewline
111 & 0.0091 & -0.0119 & 0.0091 & 12308063.9564 & 7923968.3181 & 2814.9544 \tabularnewline
112 & 0.0101 & -0.0139 & 0.0099 & 16901275.0095 & 9420186.1 & 3069.2322 \tabularnewline
113 & 0.0109 & -0.015 & 0.0106 & 20085028.0015 & 10943734.9431 & 3308.1316 \tabularnewline
114 & 0.0117 & -0.0271 & 0.0127 & 67031417.9632 & 17954695.3206 & 4237.2981 \tabularnewline
115 & 0.0124 & -0.0311 & 0.0147 & 89129760.2496 & 25863035.8683 & 5085.5713 \tabularnewline
116 & 0.0131 & -0.0336 & 0.0166 & 104534958.0055 & 33730228.082 & 5807.7731 \tabularnewline
117 & 0.0138 & -0.0352 & 0.0183 & 114062391.3275 & 41033152.0134 & 6405.7125 \tabularnewline
118 & 0.0145 & -0.0372 & 0.0199 & 127457502.7665 & 48235181.2428 & 6945.1552 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113761&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]107[/C][C]0.0033[/C][C]-0.0033[/C][C]0[/C][C]869412.2836[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]108[/C][C]0.0052[/C][C]-0.01[/C][C]0.0066[/C][C]8174599.4718[/C][C]4522005.8777[/C][C]2126.5009[/C][/ROW]
[ROW][C]109[/C][C]0.0067[/C][C]-0.0089[/C][C]0.0074[/C][C]6817981.0475[/C][C]5287330.9343[/C][C]2299.4197[/C][/ROW]
[ROW][C]110[/C][C]0.008[/C][C]-0.0116[/C][C]0.0084[/C][C]11449784.8314[/C][C]6827944.4086[/C][C]2613.0336[/C][/ROW]
[ROW][C]111[/C][C]0.0091[/C][C]-0.0119[/C][C]0.0091[/C][C]12308063.9564[/C][C]7923968.3181[/C][C]2814.9544[/C][/ROW]
[ROW][C]112[/C][C]0.0101[/C][C]-0.0139[/C][C]0.0099[/C][C]16901275.0095[/C][C]9420186.1[/C][C]3069.2322[/C][/ROW]
[ROW][C]113[/C][C]0.0109[/C][C]-0.015[/C][C]0.0106[/C][C]20085028.0015[/C][C]10943734.9431[/C][C]3308.1316[/C][/ROW]
[ROW][C]114[/C][C]0.0117[/C][C]-0.0271[/C][C]0.0127[/C][C]67031417.9632[/C][C]17954695.3206[/C][C]4237.2981[/C][/ROW]
[ROW][C]115[/C][C]0.0124[/C][C]-0.0311[/C][C]0.0147[/C][C]89129760.2496[/C][C]25863035.8683[/C][C]5085.5713[/C][/ROW]
[ROW][C]116[/C][C]0.0131[/C][C]-0.0336[/C][C]0.0166[/C][C]104534958.0055[/C][C]33730228.082[/C][C]5807.7731[/C][/ROW]
[ROW][C]117[/C][C]0.0138[/C][C]-0.0352[/C][C]0.0183[/C][C]114062391.3275[/C][C]41033152.0134[/C][C]6405.7125[/C][/ROW]
[ROW][C]118[/C][C]0.0145[/C][C]-0.0372[/C][C]0.0199[/C][C]127457502.7665[/C][C]48235181.2428[/C][C]6945.1552[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113761&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113761&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
1070.0033-0.00330869412.283600
1080.0052-0.010.00668174599.47184522005.87772126.5009
1090.0067-0.00890.00746817981.04755287330.93432299.4197
1100.008-0.01160.008411449784.83146827944.40862613.0336
1110.0091-0.01190.009112308063.95647923968.31812814.9544
1120.0101-0.01390.009916901275.00959420186.13069.2322
1130.0109-0.0150.010620085028.001510943734.94313308.1316
1140.0117-0.02710.012767031417.963217954695.32064237.2981
1150.0124-0.03110.014789129760.249625863035.86835085.5713
1160.0131-0.03360.0166104534958.005533730228.0825807.7731
1170.0138-0.03520.0183114062391.327541033152.01346405.7125
1180.0145-0.03720.0199127457502.766548235181.24286945.1552



Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 2 ; par7 = 1 ; par8 = 0 ; 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')