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, 24 Dec 2010 10:55:57 +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/24/t1293188050aa6szkq2h2csj0i.htm/, Retrieved Tue, 30 Apr 2024 06:58:26 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114744, Retrieved Tue, 30 Apr 2024 06:58:26 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact103
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]
-   PD    [ARIMA Backward Selection] [ws9 tabel] [2009-12-04 14:44:54] [626f1d98f4a7f05bcb9f17666b672c60]
- R PD      [ARIMA Backward Selection] [Paper ARS] [2009-12-12 12:11:40] [626f1d98f4a7f05bcb9f17666b672c60]
-    D        [ARIMA Backward Selection] [ARIMA backward se...] [2010-12-19 14:59:42] [8d09066a9d3795298da6860e7d4a4400]
- RM D          [ARIMA Forecasting] [ARIMA Forecasting] [2010-12-19 16:30:13] [8d09066a9d3795298da6860e7d4a4400]
-   P               [ARIMA Forecasting] [ARIMA Forecasting] [2010-12-24 10:55:57] [1b6bbf3cf94635fe119752c144706ab0] [Current]
Feedback Forum

Post a new message
Dataseries X:
206010
198112
194519
185705
180173
176142
203401
221902
197378
185001
176356
180449
180144
173666
165688
161570
156145
153730
182698
200765
176512
166618
158644
159585
163095
159044
155511
153745
150569
150605
179612
194690
189917
184128
175335
179566
181140
177876
175041
169292
166070
166972
206348
215706
202108
195411
193111
195198
198770
194163
190420
189733
186029
191531
232571
243477
227247
217859
208679
213188
216234
213586
209465
204045
200237
203666
241476
260307
243324
244460
233575
237217
235243
230354
227184
221678
217142
219452
256446
265845
248624
241114
229245
231805
219277
219313
212610
214771
211142
211457
240048
240636
230580
208795
197922
194596
194581
185686
178106
172608
167302
168053
202300
202388
182516
173476
166444
171297
169701
164182
161914
159612
151001
158114
186530
187069
174330
169362
166827
178037
186413
189226
191563
188906
186005
195309
223532
226899
214126
206903
204442




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 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 & 6 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114744&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]6 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=114744&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114744&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 time6 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[119])
107166444-------
108171297-------
109169701-------
110164182-------
111161914-------
112159612-------
113151001-------
114158114-------
115186530-------
116187069-------
117174330-------
118169362-------
119166827-------
120178037170167.5361161354.4148178980.65730.040.77120.40080.7712
121186413165981.4659154202.1543177760.77763e-040.02240.2680.4441
122189226163390.9455148543.938178237.95293e-040.00120.45840.3251
123191563160089.3441142356.5521177822.1363e-046e-040.42010.2282
124188906160263.3819139686.4736180840.29030.00320.00140.52470.2659
125186005154798.4388131410.9027178185.97490.00450.00210.62490.1567
126195309159718.4261133537.8737185898.97850.00390.02450.54780.2973
127223532189541.762160580.6717218502.85230.01070.34820.58080.9379
128226899190895.6061159163.699222627.51310.01310.02190.59340.9314
129214126179408.3065144914.5594213902.05360.02430.00350.61350.7627
130206903168414.5572131168.1558205660.95870.02140.00810.48010.5333
131204442163035.5346123046.4263203024.6430.02120.01580.42630.4263

\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[119]) \tabularnewline
107 & 166444 & - & - & - & - & - & - & - \tabularnewline
108 & 171297 & - & - & - & - & - & - & - \tabularnewline
109 & 169701 & - & - & - & - & - & - & - \tabularnewline
110 & 164182 & - & - & - & - & - & - & - \tabularnewline
111 & 161914 & - & - & - & - & - & - & - \tabularnewline
112 & 159612 & - & - & - & - & - & - & - \tabularnewline
113 & 151001 & - & - & - & - & - & - & - \tabularnewline
114 & 158114 & - & - & - & - & - & - & - \tabularnewline
115 & 186530 & - & - & - & - & - & - & - \tabularnewline
116 & 187069 & - & - & - & - & - & - & - \tabularnewline
117 & 174330 & - & - & - & - & - & - & - \tabularnewline
118 & 169362 & - & - & - & - & - & - & - \tabularnewline
119 & 166827 & - & - & - & - & - & - & - \tabularnewline
120 & 178037 & 170167.5361 & 161354.4148 & 178980.6573 & 0.04 & 0.7712 & 0.4008 & 0.7712 \tabularnewline
121 & 186413 & 165981.4659 & 154202.1543 & 177760.7776 & 3e-04 & 0.0224 & 0.268 & 0.4441 \tabularnewline
122 & 189226 & 163390.9455 & 148543.938 & 178237.9529 & 3e-04 & 0.0012 & 0.4584 & 0.3251 \tabularnewline
123 & 191563 & 160089.3441 & 142356.5521 & 177822.136 & 3e-04 & 6e-04 & 0.4201 & 0.2282 \tabularnewline
124 & 188906 & 160263.3819 & 139686.4736 & 180840.2903 & 0.0032 & 0.0014 & 0.5247 & 0.2659 \tabularnewline
125 & 186005 & 154798.4388 & 131410.9027 & 178185.9749 & 0.0045 & 0.0021 & 0.6249 & 0.1567 \tabularnewline
126 & 195309 & 159718.4261 & 133537.8737 & 185898.9785 & 0.0039 & 0.0245 & 0.5478 & 0.2973 \tabularnewline
127 & 223532 & 189541.762 & 160580.6717 & 218502.8523 & 0.0107 & 0.3482 & 0.5808 & 0.9379 \tabularnewline
128 & 226899 & 190895.6061 & 159163.699 & 222627.5131 & 0.0131 & 0.0219 & 0.5934 & 0.9314 \tabularnewline
129 & 214126 & 179408.3065 & 144914.5594 & 213902.0536 & 0.0243 & 0.0035 & 0.6135 & 0.7627 \tabularnewline
130 & 206903 & 168414.5572 & 131168.1558 & 205660.9587 & 0.0214 & 0.0081 & 0.4801 & 0.5333 \tabularnewline
131 & 204442 & 163035.5346 & 123046.4263 & 203024.643 & 0.0212 & 0.0158 & 0.4263 & 0.4263 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114744&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[119])[/C][/ROW]
[ROW][C]107[/C][C]166444[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]171297[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]169701[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]164182[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]161914[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]159612[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]151001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]158114[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]186530[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]187069[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]174330[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]169362[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]166827[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]178037[/C][C]170167.5361[/C][C]161354.4148[/C][C]178980.6573[/C][C]0.04[/C][C]0.7712[/C][C]0.4008[/C][C]0.7712[/C][/ROW]
[ROW][C]121[/C][C]186413[/C][C]165981.4659[/C][C]154202.1543[/C][C]177760.7776[/C][C]3e-04[/C][C]0.0224[/C][C]0.268[/C][C]0.4441[/C][/ROW]
[ROW][C]122[/C][C]189226[/C][C]163390.9455[/C][C]148543.938[/C][C]178237.9529[/C][C]3e-04[/C][C]0.0012[/C][C]0.4584[/C][C]0.3251[/C][/ROW]
[ROW][C]123[/C][C]191563[/C][C]160089.3441[/C][C]142356.5521[/C][C]177822.136[/C][C]3e-04[/C][C]6e-04[/C][C]0.4201[/C][C]0.2282[/C][/ROW]
[ROW][C]124[/C][C]188906[/C][C]160263.3819[/C][C]139686.4736[/C][C]180840.2903[/C][C]0.0032[/C][C]0.0014[/C][C]0.5247[/C][C]0.2659[/C][/ROW]
[ROW][C]125[/C][C]186005[/C][C]154798.4388[/C][C]131410.9027[/C][C]178185.9749[/C][C]0.0045[/C][C]0.0021[/C][C]0.6249[/C][C]0.1567[/C][/ROW]
[ROW][C]126[/C][C]195309[/C][C]159718.4261[/C][C]133537.8737[/C][C]185898.9785[/C][C]0.0039[/C][C]0.0245[/C][C]0.5478[/C][C]0.2973[/C][/ROW]
[ROW][C]127[/C][C]223532[/C][C]189541.762[/C][C]160580.6717[/C][C]218502.8523[/C][C]0.0107[/C][C]0.3482[/C][C]0.5808[/C][C]0.9379[/C][/ROW]
[ROW][C]128[/C][C]226899[/C][C]190895.6061[/C][C]159163.699[/C][C]222627.5131[/C][C]0.0131[/C][C]0.0219[/C][C]0.5934[/C][C]0.9314[/C][/ROW]
[ROW][C]129[/C][C]214126[/C][C]179408.3065[/C][C]144914.5594[/C][C]213902.0536[/C][C]0.0243[/C][C]0.0035[/C][C]0.6135[/C][C]0.7627[/C][/ROW]
[ROW][C]130[/C][C]206903[/C][C]168414.5572[/C][C]131168.1558[/C][C]205660.9587[/C][C]0.0214[/C][C]0.0081[/C][C]0.4801[/C][C]0.5333[/C][/ROW]
[ROW][C]131[/C][C]204442[/C][C]163035.5346[/C][C]123046.4263[/C][C]203024.643[/C][C]0.0212[/C][C]0.0158[/C][C]0.4263[/C][C]0.4263[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114744&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114744&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[119])
107166444-------
108171297-------
109169701-------
110164182-------
111161914-------
112159612-------
113151001-------
114158114-------
115186530-------
116187069-------
117174330-------
118169362-------
119166827-------
120178037170167.5361161354.4148178980.65730.040.77120.40080.7712
121186413165981.4659154202.1543177760.77763e-040.02240.2680.4441
122189226163390.9455148543.938178237.95293e-040.00120.45840.3251
123191563160089.3441142356.5521177822.1363e-046e-040.42010.2282
124188906160263.3819139686.4736180840.29030.00320.00140.52470.2659
125186005154798.4388131410.9027178185.97490.00450.00210.62490.1567
126195309159718.4261133537.8737185898.97850.00390.02450.54780.2973
127223532189541.762160580.6717218502.85230.01070.34820.58080.9379
128226899190895.6061159163.699222627.51310.01310.02190.59340.9314
129214126179408.3065144914.5594213902.05360.02430.00350.61350.7627
130206903168414.5572131168.1558205660.95870.02140.00810.48010.5333
131204442163035.5346123046.4263203024.6430.02120.01580.42630.4263







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1200.02640.0462061928462.716500
1210.03620.12310.0847417447584.4686239688023.592515481.8611
1220.04640.15810.1092667450042.7206382275363.301919551.8634
1230.05650.19660.131990591017.9799534354276.971423116.1043
1240.06550.17870.1406820399569.469591563335.470924322.0751
1250.07710.20160.1507973849464.0815655277690.239325598.3923
1260.08360.22280.1611266688948.2497742622155.669427251.0946
1270.0780.17930.16331155336281.054794211421.342528181.7569
1280.08480.18860.16611296244375.3319849992860.674629154.637
1290.09810.19350.16891205318242.639885525398.871129757.7788
1300.11280.22850.17431481360225.4656939692201.288730654.3994
1310.12510.2540.18091714495373.93761004259132.342831690.0478

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
120 & 0.0264 & 0.0462 & 0 & 61928462.7165 & 0 & 0 \tabularnewline
121 & 0.0362 & 0.1231 & 0.0847 & 417447584.4686 & 239688023.5925 & 15481.8611 \tabularnewline
122 & 0.0464 & 0.1581 & 0.1092 & 667450042.7206 & 382275363.3019 & 19551.8634 \tabularnewline
123 & 0.0565 & 0.1966 & 0.131 & 990591017.9799 & 534354276.9714 & 23116.1043 \tabularnewline
124 & 0.0655 & 0.1787 & 0.1406 & 820399569.469 & 591563335.4709 & 24322.0751 \tabularnewline
125 & 0.0771 & 0.2016 & 0.1507 & 973849464.0815 & 655277690.2393 & 25598.3923 \tabularnewline
126 & 0.0836 & 0.2228 & 0.161 & 1266688948.2497 & 742622155.6694 & 27251.0946 \tabularnewline
127 & 0.078 & 0.1793 & 0.1633 & 1155336281.054 & 794211421.3425 & 28181.7569 \tabularnewline
128 & 0.0848 & 0.1886 & 0.1661 & 1296244375.3319 & 849992860.6746 & 29154.637 \tabularnewline
129 & 0.0981 & 0.1935 & 0.1689 & 1205318242.639 & 885525398.8711 & 29757.7788 \tabularnewline
130 & 0.1128 & 0.2285 & 0.1743 & 1481360225.4656 & 939692201.2887 & 30654.3994 \tabularnewline
131 & 0.1251 & 0.254 & 0.1809 & 1714495373.9376 & 1004259132.3428 & 31690.0478 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114744&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]120[/C][C]0.0264[/C][C]0.0462[/C][C]0[/C][C]61928462.7165[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]121[/C][C]0.0362[/C][C]0.1231[/C][C]0.0847[/C][C]417447584.4686[/C][C]239688023.5925[/C][C]15481.8611[/C][/ROW]
[ROW][C]122[/C][C]0.0464[/C][C]0.1581[/C][C]0.1092[/C][C]667450042.7206[/C][C]382275363.3019[/C][C]19551.8634[/C][/ROW]
[ROW][C]123[/C][C]0.0565[/C][C]0.1966[/C][C]0.131[/C][C]990591017.9799[/C][C]534354276.9714[/C][C]23116.1043[/C][/ROW]
[ROW][C]124[/C][C]0.0655[/C][C]0.1787[/C][C]0.1406[/C][C]820399569.469[/C][C]591563335.4709[/C][C]24322.0751[/C][/ROW]
[ROW][C]125[/C][C]0.0771[/C][C]0.2016[/C][C]0.1507[/C][C]973849464.0815[/C][C]655277690.2393[/C][C]25598.3923[/C][/ROW]
[ROW][C]126[/C][C]0.0836[/C][C]0.2228[/C][C]0.161[/C][C]1266688948.2497[/C][C]742622155.6694[/C][C]27251.0946[/C][/ROW]
[ROW][C]127[/C][C]0.078[/C][C]0.1793[/C][C]0.1633[/C][C]1155336281.054[/C][C]794211421.3425[/C][C]28181.7569[/C][/ROW]
[ROW][C]128[/C][C]0.0848[/C][C]0.1886[/C][C]0.1661[/C][C]1296244375.3319[/C][C]849992860.6746[/C][C]29154.637[/C][/ROW]
[ROW][C]129[/C][C]0.0981[/C][C]0.1935[/C][C]0.1689[/C][C]1205318242.639[/C][C]885525398.8711[/C][C]29757.7788[/C][/ROW]
[ROW][C]130[/C][C]0.1128[/C][C]0.2285[/C][C]0.1743[/C][C]1481360225.4656[/C][C]939692201.2887[/C][C]30654.3994[/C][/ROW]
[ROW][C]131[/C][C]0.1251[/C][C]0.254[/C][C]0.1809[/C][C]1714495373.9376[/C][C]1004259132.3428[/C][C]31690.0478[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114744&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114744&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
1200.02640.0462061928462.716500
1210.03620.12310.0847417447584.4686239688023.592515481.8611
1220.04640.15810.1092667450042.7206382275363.301919551.8634
1230.05650.19660.131990591017.9799534354276.971423116.1043
1240.06550.17870.1406820399569.469591563335.470924322.0751
1250.07710.20160.1507973849464.0815655277690.239325598.3923
1260.08360.22280.1611266688948.2497742622155.669427251.0946
1270.0780.17930.16331155336281.054794211421.342528181.7569
1280.08480.18860.16611296244375.3319849992860.674629154.637
1290.09810.19350.16891205318242.639885525398.871129757.7788
1300.11280.22850.17431481360225.4656939692201.288730654.3994
1310.12510.2540.18091714495373.93761004259132.342831690.0478



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