Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 06 Dec 2007 03:08:23 -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/2007/Dec/06/t1196934945fcaqnfraaj47srt.htm/, Retrieved Fri, 03 May 2024 06:42:42 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2559, Retrieved Fri, 03 May 2024 06:42:42 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsQ1 - totale werkloosheid
Estimated Impact526
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [estimation of ARM...] [2007-12-06 10:08:23] [ac6f409873aab27747ac7f3d36ded223] [Current]
- RMPD    [ARIMA Forecasting] [Workshop 10 - ARI...] [2009-12-04 14:39:07] [09308ad056f3c94653a9b0d51f6f1a28]
- RMPD    [ARIMA Forecasting] [Workshop 10 - ARI...] [2009-12-04 14:46:05] [09308ad056f3c94653a9b0d51f6f1a28]
-   P       [ARIMA Forecasting] [Workshop 10 - JUI...] [2009-12-06 21:21:45] [74be16979710d4c4e7c6647856088456]
-             [ARIMA Forecasting] [] [2009-12-17 13:53:52] [68cb6e9d2b1cb3475e83bcdfaf88b501]
-   P         [ARIMA Forecasting] [Verbeterde foreca...] [2009-12-18 17:14:04] [9717cb857c153ca3061376906953b329]
- R P         [ARIMA Forecasting] [FINALE PAPER - Ar...] [2009-12-28 21:52:59] [74be16979710d4c4e7c6647856088456]
- RMPD    [ARIMA Forecasting] [] [2009-12-06 20:31:40] [1f74ef2f756548f1f3a7b6136ea56d7f]
-   PD      [ARIMA Forecasting] [Forecasting Melk] [2009-12-19 11:57:06] [a94022e7c2399c0f4d62eea578db3411]
-  MPD    [ARIMA Forecasting] [ARIMA forecasting] [2009-12-08 22:29:39] [cd6314e7e707a6546bd4604c9d1f2b69]
- RMPD    [ARIMA Forecasting] [Forecasting beste...] [2009-12-14 19:02:57] [54d83950395cfb8ca1091bdb7440f70a]
-   PD      [ARIMA Forecasting] [] [2010-12-14 19:44:34] [1ec36cc0fd92fd0f07d0b885ce2c369b]
- R PD        [ARIMA Forecasting] [] [2010-12-16 20:55:17] [82643889efeee0b265cd2ff213e5137b]
- RMPD      [(Partial) Autocorrelation Function] [] [2010-12-29 13:10:17] [adca540665f1dd1a5a4406fd7f55bdf4]
- RMPD    [ARIMA Backward Selection] [arima backward se...] [2009-12-28 19:15:03] [9b3063011151cbe1c3c2955cd3d2c958]
- RMPD    [ARIMA Forecasting] [forecasting] [2009-12-28 19:18:14] [9b3063011151cbe1c3c2955cd3d2c958]
Feedback Forum

Post a new message
Dataseries X:
513
503
471
471
476
475
470
461
455
456
517
525
523
519
509
512
519
517
510
509
501
507
569
580
578
565
547
555
562
561
555
544
537
543
594
611
613
611
594
595
591
589
584
573
567
569
621
629
628
612
595
597
593
590
580
574
573
573
620
626
620
588
566
557
561
549
532
526
511
499
555
565
542




Summary of compuational 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 compuational 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=2559&T=0

[TABLE]
[ROW][C]Summary of compuational 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=2559&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2559&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 compuational 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[61])
49628-------
50612-------
51595-------
52597-------
53593-------
54590-------
55580-------
56574-------
57573-------
58573-------
59620-------
60626-------
61620-------
62588603.0107591.1791614.84240.00640.00240.06820.0024
63566585.7938567.3493604.23830.01770.40730.1641e-04
64557587.7462564.1867611.30580.00530.96480.22070.0036
65561583.7358555.9296611.54210.05450.97030.25690.0053
66549580.7335549.2368612.23030.02410.89030.28210.0073
67532570.733535.9328605.53330.01460.88950.30090.0028
68526564.7329526.9161602.54970.02230.95510.31550.0021
69511563.7329523.123604.34280.00550.96570.32730.0033
70499563.7329520.5099606.95590.00170.99160.33720.0054
71555610.7329565.0461656.41970.008410.34550.3455
72565616.7329568.7085664.75730.01740.99410.35260.447
73542610.7329560.4795660.98630.00370.96280.35890.3589

\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[61]) \tabularnewline
49 & 628 & - & - & - & - & - & - & - \tabularnewline
50 & 612 & - & - & - & - & - & - & - \tabularnewline
51 & 595 & - & - & - & - & - & - & - \tabularnewline
52 & 597 & - & - & - & - & - & - & - \tabularnewline
53 & 593 & - & - & - & - & - & - & - \tabularnewline
54 & 590 & - & - & - & - & - & - & - \tabularnewline
55 & 580 & - & - & - & - & - & - & - \tabularnewline
56 & 574 & - & - & - & - & - & - & - \tabularnewline
57 & 573 & - & - & - & - & - & - & - \tabularnewline
58 & 573 & - & - & - & - & - & - & - \tabularnewline
59 & 620 & - & - & - & - & - & - & - \tabularnewline
60 & 626 & - & - & - & - & - & - & - \tabularnewline
61 & 620 & - & - & - & - & - & - & - \tabularnewline
62 & 588 & 603.0107 & 591.1791 & 614.8424 & 0.0064 & 0.0024 & 0.0682 & 0.0024 \tabularnewline
63 & 566 & 585.7938 & 567.3493 & 604.2383 & 0.0177 & 0.4073 & 0.164 & 1e-04 \tabularnewline
64 & 557 & 587.7462 & 564.1867 & 611.3058 & 0.0053 & 0.9648 & 0.2207 & 0.0036 \tabularnewline
65 & 561 & 583.7358 & 555.9296 & 611.5421 & 0.0545 & 0.9703 & 0.2569 & 0.0053 \tabularnewline
66 & 549 & 580.7335 & 549.2368 & 612.2303 & 0.0241 & 0.8903 & 0.2821 & 0.0073 \tabularnewline
67 & 532 & 570.733 & 535.9328 & 605.5333 & 0.0146 & 0.8895 & 0.3009 & 0.0028 \tabularnewline
68 & 526 & 564.7329 & 526.9161 & 602.5497 & 0.0223 & 0.9551 & 0.3155 & 0.0021 \tabularnewline
69 & 511 & 563.7329 & 523.123 & 604.3428 & 0.0055 & 0.9657 & 0.3273 & 0.0033 \tabularnewline
70 & 499 & 563.7329 & 520.5099 & 606.9559 & 0.0017 & 0.9916 & 0.3372 & 0.0054 \tabularnewline
71 & 555 & 610.7329 & 565.0461 & 656.4197 & 0.0084 & 1 & 0.3455 & 0.3455 \tabularnewline
72 & 565 & 616.7329 & 568.7085 & 664.7573 & 0.0174 & 0.9941 & 0.3526 & 0.447 \tabularnewline
73 & 542 & 610.7329 & 560.4795 & 660.9863 & 0.0037 & 0.9628 & 0.3589 & 0.3589 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2559&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[61])[/C][/ROW]
[ROW][C]49[/C][C]628[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]612[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]595[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]597[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]593[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]590[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]580[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]574[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]573[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]573[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]620[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]626[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]620[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]588[/C][C]603.0107[/C][C]591.1791[/C][C]614.8424[/C][C]0.0064[/C][C]0.0024[/C][C]0.0682[/C][C]0.0024[/C][/ROW]
[ROW][C]63[/C][C]566[/C][C]585.7938[/C][C]567.3493[/C][C]604.2383[/C][C]0.0177[/C][C]0.4073[/C][C]0.164[/C][C]1e-04[/C][/ROW]
[ROW][C]64[/C][C]557[/C][C]587.7462[/C][C]564.1867[/C][C]611.3058[/C][C]0.0053[/C][C]0.9648[/C][C]0.2207[/C][C]0.0036[/C][/ROW]
[ROW][C]65[/C][C]561[/C][C]583.7358[/C][C]555.9296[/C][C]611.5421[/C][C]0.0545[/C][C]0.9703[/C][C]0.2569[/C][C]0.0053[/C][/ROW]
[ROW][C]66[/C][C]549[/C][C]580.7335[/C][C]549.2368[/C][C]612.2303[/C][C]0.0241[/C][C]0.8903[/C][C]0.2821[/C][C]0.0073[/C][/ROW]
[ROW][C]67[/C][C]532[/C][C]570.733[/C][C]535.9328[/C][C]605.5333[/C][C]0.0146[/C][C]0.8895[/C][C]0.3009[/C][C]0.0028[/C][/ROW]
[ROW][C]68[/C][C]526[/C][C]564.7329[/C][C]526.9161[/C][C]602.5497[/C][C]0.0223[/C][C]0.9551[/C][C]0.3155[/C][C]0.0021[/C][/ROW]
[ROW][C]69[/C][C]511[/C][C]563.7329[/C][C]523.123[/C][C]604.3428[/C][C]0.0055[/C][C]0.9657[/C][C]0.3273[/C][C]0.0033[/C][/ROW]
[ROW][C]70[/C][C]499[/C][C]563.7329[/C][C]520.5099[/C][C]606.9559[/C][C]0.0017[/C][C]0.9916[/C][C]0.3372[/C][C]0.0054[/C][/ROW]
[ROW][C]71[/C][C]555[/C][C]610.7329[/C][C]565.0461[/C][C]656.4197[/C][C]0.0084[/C][C]1[/C][C]0.3455[/C][C]0.3455[/C][/ROW]
[ROW][C]72[/C][C]565[/C][C]616.7329[/C][C]568.7085[/C][C]664.7573[/C][C]0.0174[/C][C]0.9941[/C][C]0.3526[/C][C]0.447[/C][/ROW]
[ROW][C]73[/C][C]542[/C][C]610.7329[/C][C]560.4795[/C][C]660.9863[/C][C]0.0037[/C][C]0.9628[/C][C]0.3589[/C][C]0.3589[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2559&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2559&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[61])
49628-------
50612-------
51595-------
52597-------
53593-------
54590-------
55580-------
56574-------
57573-------
58573-------
59620-------
60626-------
61620-------
62588603.0107591.1791614.84240.00640.00240.06820.0024
63566585.7938567.3493604.23830.01770.40730.1641e-04
64557587.7462564.1867611.30580.00530.96480.22070.0036
65561583.7358555.9296611.54210.05450.97030.25690.0053
66549580.7335549.2368612.23030.02410.89030.28210.0073
67532570.733535.9328605.53330.01460.88950.30090.0028
68526564.7329526.9161602.54970.02230.95510.31550.0021
69511563.7329523.123604.34280.00550.96570.32730.0033
70499563.7329520.5099606.95590.00170.99160.33720.0054
71555610.7329565.0461656.41970.008410.34550.3455
72565616.7329568.7085664.75730.01740.99410.35260.447
73542610.7329560.4795660.98630.00370.96280.35890.3589







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.01-0.02490.0021225.322418.77694.3332
630.0161-0.03380.0028391.795232.64965.714
640.0205-0.05230.0044945.331978.77778.8757
650.0243-0.03890.0032516.917443.07656.5633
660.0277-0.05460.00461007.01783.91819.1607
670.0311-0.06790.00571500.2476125.020611.1813
680.0342-0.06860.00571500.2391125.019911.1812
690.0368-0.09350.00782780.7583231.729915.2227
700.0391-0.11480.00964190.3471349.195618.6868
710.0382-0.09130.00763106.1549258.846216.0887
720.0397-0.08390.0072676.2918223.024314.934
730.042-0.11250.00944724.21393.684219.8415

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.01 & -0.0249 & 0.0021 & 225.3224 & 18.7769 & 4.3332 \tabularnewline
63 & 0.0161 & -0.0338 & 0.0028 & 391.7952 & 32.6496 & 5.714 \tabularnewline
64 & 0.0205 & -0.0523 & 0.0044 & 945.3319 & 78.7777 & 8.8757 \tabularnewline
65 & 0.0243 & -0.0389 & 0.0032 & 516.9174 & 43.0765 & 6.5633 \tabularnewline
66 & 0.0277 & -0.0546 & 0.0046 & 1007.017 & 83.9181 & 9.1607 \tabularnewline
67 & 0.0311 & -0.0679 & 0.0057 & 1500.2476 & 125.0206 & 11.1813 \tabularnewline
68 & 0.0342 & -0.0686 & 0.0057 & 1500.2391 & 125.0199 & 11.1812 \tabularnewline
69 & 0.0368 & -0.0935 & 0.0078 & 2780.7583 & 231.7299 & 15.2227 \tabularnewline
70 & 0.0391 & -0.1148 & 0.0096 & 4190.3471 & 349.1956 & 18.6868 \tabularnewline
71 & 0.0382 & -0.0913 & 0.0076 & 3106.1549 & 258.8462 & 16.0887 \tabularnewline
72 & 0.0397 & -0.0839 & 0.007 & 2676.2918 & 223.0243 & 14.934 \tabularnewline
73 & 0.042 & -0.1125 & 0.0094 & 4724.21 & 393.6842 & 19.8415 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2559&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]62[/C][C]0.01[/C][C]-0.0249[/C][C]0.0021[/C][C]225.3224[/C][C]18.7769[/C][C]4.3332[/C][/ROW]
[ROW][C]63[/C][C]0.0161[/C][C]-0.0338[/C][C]0.0028[/C][C]391.7952[/C][C]32.6496[/C][C]5.714[/C][/ROW]
[ROW][C]64[/C][C]0.0205[/C][C]-0.0523[/C][C]0.0044[/C][C]945.3319[/C][C]78.7777[/C][C]8.8757[/C][/ROW]
[ROW][C]65[/C][C]0.0243[/C][C]-0.0389[/C][C]0.0032[/C][C]516.9174[/C][C]43.0765[/C][C]6.5633[/C][/ROW]
[ROW][C]66[/C][C]0.0277[/C][C]-0.0546[/C][C]0.0046[/C][C]1007.017[/C][C]83.9181[/C][C]9.1607[/C][/ROW]
[ROW][C]67[/C][C]0.0311[/C][C]-0.0679[/C][C]0.0057[/C][C]1500.2476[/C][C]125.0206[/C][C]11.1813[/C][/ROW]
[ROW][C]68[/C][C]0.0342[/C][C]-0.0686[/C][C]0.0057[/C][C]1500.2391[/C][C]125.0199[/C][C]11.1812[/C][/ROW]
[ROW][C]69[/C][C]0.0368[/C][C]-0.0935[/C][C]0.0078[/C][C]2780.7583[/C][C]231.7299[/C][C]15.2227[/C][/ROW]
[ROW][C]70[/C][C]0.0391[/C][C]-0.1148[/C][C]0.0096[/C][C]4190.3471[/C][C]349.1956[/C][C]18.6868[/C][/ROW]
[ROW][C]71[/C][C]0.0382[/C][C]-0.0913[/C][C]0.0076[/C][C]3106.1549[/C][C]258.8462[/C][C]16.0887[/C][/ROW]
[ROW][C]72[/C][C]0.0397[/C][C]-0.0839[/C][C]0.007[/C][C]2676.2918[/C][C]223.0243[/C][C]14.934[/C][/ROW]
[ROW][C]73[/C][C]0.042[/C][C]-0.1125[/C][C]0.0094[/C][C]4724.21[/C][C]393.6842[/C][C]19.8415[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2559&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2559&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
620.01-0.02490.0021225.322418.77694.3332
630.0161-0.03380.0028391.795232.64965.714
640.0205-0.05230.0044945.331978.77778.8757
650.0243-0.03890.0032516.917443.07656.5633
660.0277-0.05460.00461007.01783.91819.1607
670.0311-0.06790.00571500.2476125.020611.1813
680.0342-0.06860.00571500.2391125.019911.1812
690.0368-0.09350.00782780.7583231.729915.2227
700.0391-0.11480.00964190.3471349.195618.6868
710.0382-0.09130.00763106.1549258.846216.0887
720.0397-0.08390.0072676.2918223.024314.934
730.042-0.11250.00944724.21393.684219.8415



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