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, 05 Dec 2011 14:34:28 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/05/t1323114034v4jzx1y8u20biok.htm/, Retrieved Fri, 03 May 2024 04:59:46 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=151214, Retrieved Fri, 03 May 2024 04:59:46 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact141
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   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
F R PD      [ARIMA Forecasting] [Forecast] [2010-12-02 21:01:45] [97ad38b1c3b35a5feca8b85f7bc7b3ff]
- R PD          [ARIMA Forecasting] [] [2011-12-05 19:34:28] [ce4468323d272130d499477f5e05a6d2] [Current]
- R PD            [ARIMA Forecasting] [] [2011-12-20 20:08:21] [06c08141d7d783218a8164fd2ea166f2]
Feedback Forum

Post a new message
Dataseries X:
276986
260633
291551
275383
275302
231693
238829
274215
277808
299060
286629
232313
294053
267510
309739
280733
287298
235672
256449
288997
290789
321898
291834
241380
295469
258200
306102
281480
283101
237414
274834
299340
300383
340862
318794
265740
322656
281563
323461
312579
310784
262785
273754
320036
310336
342206
320052
265582
326988
300713
346414
317325
326208
270657
278158
324584
321801
343542
354040
278179
330246
307344
375874
335309
339271
280264
293689
341161
345097
368712
369403
288384
340981
319072
374214
344529
337271
281016
282224
320984
325426
366276
380296
300727
359326
327610
383563
352405
329351
294486
333454
334339
358000
396057
386976
307155
363909
344700
397561
376791
337085
299252
323136
329091
346991
461999
436533
360372
415467
382110
432197
424254
386728
354508
375765
367986
402378
426516
433313
338461
416834
381099
445673
412408
393997
348241
380134
373688
393588
434192
430731
344468
411891
370497
437305
411270
385495
341273
384217
373223
415771
448634
454341
350297
419104
398027
456059
430052
399757
362731
384896
385349
432289
468891
442702
370178
439400
393900
468700
438800
430100
366300
391000
380900
431400
465400
471500
387500
446400
421500
504800
492071
421253
396682
428000
421900
465600
525793
499855
435287
479499
473027
554410
489574
462157
420331




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151214&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' @ jenkins.wessa.net







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[174])
162366300-------
163391000-------
164380900-------
165431400-------
166465400-------
167471500-------
168387500-------
169446400-------
170421500-------
171504800-------
172492071-------
173421253-------
174396682-------
175428000420751.1946393737.7747448660.79080.30540.95450.98170.9545
176421900411479.8823381810.1327442259.69510.25350.14640.97420.827
177465600459344.9946424368.4086495706.46520.3680.97820.9340.9996
178525793497067.751456290.6536539589.76710.09270.92650.92781
179499855493036.5673449070.8866539055.12930.38580.08150.82051
180435287405213.7305362508.2602450296.5850.095500.77940.6447
181479499472466.8159423200.7208524444.840.39540.91950.83720.9979
182473027439606.4797389381.3247492877.37950.10940.07110.74740.9429
183554410516550.1314459099.7117577386.41430.11130.91960.64750.9999
184489574494338.0377435469.3786556937.57560.44070.030.52830.9989
185462157451417.7373392765.025514150.49320.36860.11660.8270.9564
186420331410225.0689352126.9781472757.20470.37570.05180.66440.6644

\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[174]) \tabularnewline
162 & 366300 & - & - & - & - & - & - & - \tabularnewline
163 & 391000 & - & - & - & - & - & - & - \tabularnewline
164 & 380900 & - & - & - & - & - & - & - \tabularnewline
165 & 431400 & - & - & - & - & - & - & - \tabularnewline
166 & 465400 & - & - & - & - & - & - & - \tabularnewline
167 & 471500 & - & - & - & - & - & - & - \tabularnewline
168 & 387500 & - & - & - & - & - & - & - \tabularnewline
169 & 446400 & - & - & - & - & - & - & - \tabularnewline
170 & 421500 & - & - & - & - & - & - & - \tabularnewline
171 & 504800 & - & - & - & - & - & - & - \tabularnewline
172 & 492071 & - & - & - & - & - & - & - \tabularnewline
173 & 421253 & - & - & - & - & - & - & - \tabularnewline
174 & 396682 & - & - & - & - & - & - & - \tabularnewline
175 & 428000 & 420751.1946 & 393737.7747 & 448660.7908 & 0.3054 & 0.9545 & 0.9817 & 0.9545 \tabularnewline
176 & 421900 & 411479.8823 & 381810.1327 & 442259.6951 & 0.2535 & 0.1464 & 0.9742 & 0.827 \tabularnewline
177 & 465600 & 459344.9946 & 424368.4086 & 495706.4652 & 0.368 & 0.9782 & 0.934 & 0.9996 \tabularnewline
178 & 525793 & 497067.751 & 456290.6536 & 539589.7671 & 0.0927 & 0.9265 & 0.9278 & 1 \tabularnewline
179 & 499855 & 493036.5673 & 449070.8866 & 539055.1293 & 0.3858 & 0.0815 & 0.8205 & 1 \tabularnewline
180 & 435287 & 405213.7305 & 362508.2602 & 450296.585 & 0.0955 & 0 & 0.7794 & 0.6447 \tabularnewline
181 & 479499 & 472466.8159 & 423200.7208 & 524444.84 & 0.3954 & 0.9195 & 0.8372 & 0.9979 \tabularnewline
182 & 473027 & 439606.4797 & 389381.3247 & 492877.3795 & 0.1094 & 0.0711 & 0.7474 & 0.9429 \tabularnewline
183 & 554410 & 516550.1314 & 459099.7117 & 577386.4143 & 0.1113 & 0.9196 & 0.6475 & 0.9999 \tabularnewline
184 & 489574 & 494338.0377 & 435469.3786 & 556937.5756 & 0.4407 & 0.03 & 0.5283 & 0.9989 \tabularnewline
185 & 462157 & 451417.7373 & 392765.025 & 514150.4932 & 0.3686 & 0.1166 & 0.827 & 0.9564 \tabularnewline
186 & 420331 & 410225.0689 & 352126.9781 & 472757.2047 & 0.3757 & 0.0518 & 0.6644 & 0.6644 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151214&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[174])[/C][/ROW]
[ROW][C]162[/C][C]366300[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]163[/C][C]391000[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]164[/C][C]380900[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]165[/C][C]431400[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]166[/C][C]465400[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]167[/C][C]471500[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]168[/C][C]387500[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]169[/C][C]446400[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]170[/C][C]421500[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]171[/C][C]504800[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]172[/C][C]492071[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]173[/C][C]421253[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]174[/C][C]396682[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]175[/C][C]428000[/C][C]420751.1946[/C][C]393737.7747[/C][C]448660.7908[/C][C]0.3054[/C][C]0.9545[/C][C]0.9817[/C][C]0.9545[/C][/ROW]
[ROW][C]176[/C][C]421900[/C][C]411479.8823[/C][C]381810.1327[/C][C]442259.6951[/C][C]0.2535[/C][C]0.1464[/C][C]0.9742[/C][C]0.827[/C][/ROW]
[ROW][C]177[/C][C]465600[/C][C]459344.9946[/C][C]424368.4086[/C][C]495706.4652[/C][C]0.368[/C][C]0.9782[/C][C]0.934[/C][C]0.9996[/C][/ROW]
[ROW][C]178[/C][C]525793[/C][C]497067.751[/C][C]456290.6536[/C][C]539589.7671[/C][C]0.0927[/C][C]0.9265[/C][C]0.9278[/C][C]1[/C][/ROW]
[ROW][C]179[/C][C]499855[/C][C]493036.5673[/C][C]449070.8866[/C][C]539055.1293[/C][C]0.3858[/C][C]0.0815[/C][C]0.8205[/C][C]1[/C][/ROW]
[ROW][C]180[/C][C]435287[/C][C]405213.7305[/C][C]362508.2602[/C][C]450296.585[/C][C]0.0955[/C][C]0[/C][C]0.7794[/C][C]0.6447[/C][/ROW]
[ROW][C]181[/C][C]479499[/C][C]472466.8159[/C][C]423200.7208[/C][C]524444.84[/C][C]0.3954[/C][C]0.9195[/C][C]0.8372[/C][C]0.9979[/C][/ROW]
[ROW][C]182[/C][C]473027[/C][C]439606.4797[/C][C]389381.3247[/C][C]492877.3795[/C][C]0.1094[/C][C]0.0711[/C][C]0.7474[/C][C]0.9429[/C][/ROW]
[ROW][C]183[/C][C]554410[/C][C]516550.1314[/C][C]459099.7117[/C][C]577386.4143[/C][C]0.1113[/C][C]0.9196[/C][C]0.6475[/C][C]0.9999[/C][/ROW]
[ROW][C]184[/C][C]489574[/C][C]494338.0377[/C][C]435469.3786[/C][C]556937.5756[/C][C]0.4407[/C][C]0.03[/C][C]0.5283[/C][C]0.9989[/C][/ROW]
[ROW][C]185[/C][C]462157[/C][C]451417.7373[/C][C]392765.025[/C][C]514150.4932[/C][C]0.3686[/C][C]0.1166[/C][C]0.827[/C][C]0.9564[/C][/ROW]
[ROW][C]186[/C][C]420331[/C][C]410225.0689[/C][C]352126.9781[/C][C]472757.2047[/C][C]0.3757[/C][C]0.0518[/C][C]0.6644[/C][C]0.6644[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151214&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151214&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[174])
162366300-------
163391000-------
164380900-------
165431400-------
166465400-------
167471500-------
168387500-------
169446400-------
170421500-------
171504800-------
172492071-------
173421253-------
174396682-------
175428000420751.1946393737.7747448660.79080.30540.95450.98170.9545
176421900411479.8823381810.1327442259.69510.25350.14640.97420.827
177465600459344.9946424368.4086495706.46520.3680.97820.9340.9996
178525793497067.751456290.6536539589.76710.09270.92650.92781
179499855493036.5673449070.8866539055.12930.38580.08150.82051
180435287405213.7305362508.2602450296.5850.095500.77940.6447
181479499472466.8159423200.7208524444.840.39540.91950.83720.9979
182473027439606.4797389381.3247492877.37950.10940.07110.74740.9429
183554410516550.1314459099.7117577386.41430.11130.91960.64750.9999
184489574494338.0377435469.3786556937.57560.44070.030.52830.9989
185462157451417.7373392765.025514150.49320.36860.11660.8270.9564
186420331410225.0689352126.9781472757.20470.37570.05180.66440.6644







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1750.03380.0172052545179.12400
1760.03820.02530.0213108578853.084680562016.10438975.6346
1770.04040.01360.018739125092.265466749708.1588170.0495
1780.04360.05780.0285825139928.5985256347263.268116010.8483
1790.04760.01380.025646491023.9252214376015.399514641.5851
1800.05680.07420.0337904401538.6889329380269.281118148.8366
1810.05610.01490.03149451613.2688289390461.279317011.4803
1820.06180.0760.03661116931177.5603392833050.814519820.0164
1830.06010.07330.04071433369647.2674508448228.198122548.7966
1840.0646-0.00960.037622696054.7475459873010.853121444.6499
1850.07090.02380.0363115331762.5164428551079.186120701.4753
1860.07780.02460.0354102129843.5139401349309.546720033.7043

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
175 & 0.0338 & 0.0172 & 0 & 52545179.124 & 0 & 0 \tabularnewline
176 & 0.0382 & 0.0253 & 0.0213 & 108578853.0846 & 80562016.1043 & 8975.6346 \tabularnewline
177 & 0.0404 & 0.0136 & 0.0187 & 39125092.2654 & 66749708.158 & 8170.0495 \tabularnewline
178 & 0.0436 & 0.0578 & 0.0285 & 825139928.5985 & 256347263.2681 & 16010.8483 \tabularnewline
179 & 0.0476 & 0.0138 & 0.0256 & 46491023.9252 & 214376015.3995 & 14641.5851 \tabularnewline
180 & 0.0568 & 0.0742 & 0.0337 & 904401538.6889 & 329380269.2811 & 18148.8366 \tabularnewline
181 & 0.0561 & 0.0149 & 0.031 & 49451613.2688 & 289390461.2793 & 17011.4803 \tabularnewline
182 & 0.0618 & 0.076 & 0.0366 & 1116931177.5603 & 392833050.8145 & 19820.0164 \tabularnewline
183 & 0.0601 & 0.0733 & 0.0407 & 1433369647.2674 & 508448228.1981 & 22548.7966 \tabularnewline
184 & 0.0646 & -0.0096 & 0.0376 & 22696054.7475 & 459873010.8531 & 21444.6499 \tabularnewline
185 & 0.0709 & 0.0238 & 0.0363 & 115331762.5164 & 428551079.1861 & 20701.4753 \tabularnewline
186 & 0.0778 & 0.0246 & 0.0354 & 102129843.5139 & 401349309.5467 & 20033.7043 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151214&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]175[/C][C]0.0338[/C][C]0.0172[/C][C]0[/C][C]52545179.124[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]176[/C][C]0.0382[/C][C]0.0253[/C][C]0.0213[/C][C]108578853.0846[/C][C]80562016.1043[/C][C]8975.6346[/C][/ROW]
[ROW][C]177[/C][C]0.0404[/C][C]0.0136[/C][C]0.0187[/C][C]39125092.2654[/C][C]66749708.158[/C][C]8170.0495[/C][/ROW]
[ROW][C]178[/C][C]0.0436[/C][C]0.0578[/C][C]0.0285[/C][C]825139928.5985[/C][C]256347263.2681[/C][C]16010.8483[/C][/ROW]
[ROW][C]179[/C][C]0.0476[/C][C]0.0138[/C][C]0.0256[/C][C]46491023.9252[/C][C]214376015.3995[/C][C]14641.5851[/C][/ROW]
[ROW][C]180[/C][C]0.0568[/C][C]0.0742[/C][C]0.0337[/C][C]904401538.6889[/C][C]329380269.2811[/C][C]18148.8366[/C][/ROW]
[ROW][C]181[/C][C]0.0561[/C][C]0.0149[/C][C]0.031[/C][C]49451613.2688[/C][C]289390461.2793[/C][C]17011.4803[/C][/ROW]
[ROW][C]182[/C][C]0.0618[/C][C]0.076[/C][C]0.0366[/C][C]1116931177.5603[/C][C]392833050.8145[/C][C]19820.0164[/C][/ROW]
[ROW][C]183[/C][C]0.0601[/C][C]0.0733[/C][C]0.0407[/C][C]1433369647.2674[/C][C]508448228.1981[/C][C]22548.7966[/C][/ROW]
[ROW][C]184[/C][C]0.0646[/C][C]-0.0096[/C][C]0.0376[/C][C]22696054.7475[/C][C]459873010.8531[/C][C]21444.6499[/C][/ROW]
[ROW][C]185[/C][C]0.0709[/C][C]0.0238[/C][C]0.0363[/C][C]115331762.5164[/C][C]428551079.1861[/C][C]20701.4753[/C][/ROW]
[ROW][C]186[/C][C]0.0778[/C][C]0.0246[/C][C]0.0354[/C][C]102129843.5139[/C][C]401349309.5467[/C][C]20033.7043[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151214&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151214&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
1750.03380.0172052545179.12400
1760.03820.02530.0213108578853.084680562016.10438975.6346
1770.04040.01360.018739125092.265466749708.1588170.0495
1780.04360.05780.0285825139928.5985256347263.268116010.8483
1790.04760.01380.025646491023.9252214376015.399514641.5851
1800.05680.07420.0337904401538.6889329380269.281118148.8366
1810.05610.01490.03149451613.2688289390461.279317011.4803
1820.06180.0760.03661116931177.5603392833050.814519820.0164
1830.06010.07330.04071433369647.2674508448228.198122548.7966
1840.0646-0.00960.037622696054.7475459873010.853121444.6499
1850.07090.02380.0363115331762.5164428551079.186120701.4753
1860.07780.02460.0354102129843.5139401349309.546720033.7043



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