Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 12 Dec 2007 02:28:14 -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/12/t119745083541iommizgnyuu49.htm/, Retrieved Fri, 03 May 2024 03:25:02 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3183, Retrieved Fri, 03 May 2024 03:25:02 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsbridome
Estimated Impact232
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [extrapolation for...] [2007-12-12 09:28:14] [05eb25e9a99d8c3f4eb6a6fe65650e56] [Current]
Feedback Forum

Post a new message
Dataseries X:
540
522
526
527
516
503
489
479
475
524
552
532
511
492
492
493
481
462
457
442
439
488
521
501
485
464
460
467
460
448
443
436
431
484
510
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




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3183&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 time5 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[94])
82621-------
83629-------
84628-------
85612-------
86595-------
87597-------
88593-------
89590-------
90580-------
91574-------
92573-------
93573-------
94620-------
95626632.7185620.8144644.62260.13430.98190.72980.9819
96620629.0451612.0261646.0640.14880.63710.54790.8512
97588614.209593.3429635.0750.00690.29320.58220.2932
98566596.4557572.3613620.55020.00660.75420.54710.0277
99557598.471571.5372625.40480.00130.99090.54260.0586
100561597.0255567.5228626.52820.00830.99610.60540.0635
101549592.9468561.0821624.81150.00340.97530.57190.0481
102532582.9233548.8599616.98670.00170.97450.56680.0164
103526575.8883539.7598612.01680.00340.99140.54080.0084
104511572.1261534.0443610.2088e-040.99120.48210.0069
105499572.0504532.1107611.99012e-040.99860.48140.0093
106555621.2718579.5569662.98689e-0410.52380.5238

\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[94]) \tabularnewline
82 & 621 & - & - & - & - & - & - & - \tabularnewline
83 & 629 & - & - & - & - & - & - & - \tabularnewline
84 & 628 & - & - & - & - & - & - & - \tabularnewline
85 & 612 & - & - & - & - & - & - & - \tabularnewline
86 & 595 & - & - & - & - & - & - & - \tabularnewline
87 & 597 & - & - & - & - & - & - & - \tabularnewline
88 & 593 & - & - & - & - & - & - & - \tabularnewline
89 & 590 & - & - & - & - & - & - & - \tabularnewline
90 & 580 & - & - & - & - & - & - & - \tabularnewline
91 & 574 & - & - & - & - & - & - & - \tabularnewline
92 & 573 & - & - & - & - & - & - & - \tabularnewline
93 & 573 & - & - & - & - & - & - & - \tabularnewline
94 & 620 & - & - & - & - & - & - & - \tabularnewline
95 & 626 & 632.7185 & 620.8144 & 644.6226 & 0.1343 & 0.9819 & 0.7298 & 0.9819 \tabularnewline
96 & 620 & 629.0451 & 612.0261 & 646.064 & 0.1488 & 0.6371 & 0.5479 & 0.8512 \tabularnewline
97 & 588 & 614.209 & 593.3429 & 635.075 & 0.0069 & 0.2932 & 0.5822 & 0.2932 \tabularnewline
98 & 566 & 596.4557 & 572.3613 & 620.5502 & 0.0066 & 0.7542 & 0.5471 & 0.0277 \tabularnewline
99 & 557 & 598.471 & 571.5372 & 625.4048 & 0.0013 & 0.9909 & 0.5426 & 0.0586 \tabularnewline
100 & 561 & 597.0255 & 567.5228 & 626.5282 & 0.0083 & 0.9961 & 0.6054 & 0.0635 \tabularnewline
101 & 549 & 592.9468 & 561.0821 & 624.8115 & 0.0034 & 0.9753 & 0.5719 & 0.0481 \tabularnewline
102 & 532 & 582.9233 & 548.8599 & 616.9867 & 0.0017 & 0.9745 & 0.5668 & 0.0164 \tabularnewline
103 & 526 & 575.8883 & 539.7598 & 612.0168 & 0.0034 & 0.9914 & 0.5408 & 0.0084 \tabularnewline
104 & 511 & 572.1261 & 534.0443 & 610.208 & 8e-04 & 0.9912 & 0.4821 & 0.0069 \tabularnewline
105 & 499 & 572.0504 & 532.1107 & 611.9901 & 2e-04 & 0.9986 & 0.4814 & 0.0093 \tabularnewline
106 & 555 & 621.2718 & 579.5569 & 662.9868 & 9e-04 & 1 & 0.5238 & 0.5238 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3183&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[94])[/C][/ROW]
[ROW][C]82[/C][C]621[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]629[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]628[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]612[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]595[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]597[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]593[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]590[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]580[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]574[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]573[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]573[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]620[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]626[/C][C]632.7185[/C][C]620.8144[/C][C]644.6226[/C][C]0.1343[/C][C]0.9819[/C][C]0.7298[/C][C]0.9819[/C][/ROW]
[ROW][C]96[/C][C]620[/C][C]629.0451[/C][C]612.0261[/C][C]646.064[/C][C]0.1488[/C][C]0.6371[/C][C]0.5479[/C][C]0.8512[/C][/ROW]
[ROW][C]97[/C][C]588[/C][C]614.209[/C][C]593.3429[/C][C]635.075[/C][C]0.0069[/C][C]0.2932[/C][C]0.5822[/C][C]0.2932[/C][/ROW]
[ROW][C]98[/C][C]566[/C][C]596.4557[/C][C]572.3613[/C][C]620.5502[/C][C]0.0066[/C][C]0.7542[/C][C]0.5471[/C][C]0.0277[/C][/ROW]
[ROW][C]99[/C][C]557[/C][C]598.471[/C][C]571.5372[/C][C]625.4048[/C][C]0.0013[/C][C]0.9909[/C][C]0.5426[/C][C]0.0586[/C][/ROW]
[ROW][C]100[/C][C]561[/C][C]597.0255[/C][C]567.5228[/C][C]626.5282[/C][C]0.0083[/C][C]0.9961[/C][C]0.6054[/C][C]0.0635[/C][/ROW]
[ROW][C]101[/C][C]549[/C][C]592.9468[/C][C]561.0821[/C][C]624.8115[/C][C]0.0034[/C][C]0.9753[/C][C]0.5719[/C][C]0.0481[/C][/ROW]
[ROW][C]102[/C][C]532[/C][C]582.9233[/C][C]548.8599[/C][C]616.9867[/C][C]0.0017[/C][C]0.9745[/C][C]0.5668[/C][C]0.0164[/C][/ROW]
[ROW][C]103[/C][C]526[/C][C]575.8883[/C][C]539.7598[/C][C]612.0168[/C][C]0.0034[/C][C]0.9914[/C][C]0.5408[/C][C]0.0084[/C][/ROW]
[ROW][C]104[/C][C]511[/C][C]572.1261[/C][C]534.0443[/C][C]610.208[/C][C]8e-04[/C][C]0.9912[/C][C]0.4821[/C][C]0.0069[/C][/ROW]
[ROW][C]105[/C][C]499[/C][C]572.0504[/C][C]532.1107[/C][C]611.9901[/C][C]2e-04[/C][C]0.9986[/C][C]0.4814[/C][C]0.0093[/C][/ROW]
[ROW][C]106[/C][C]555[/C][C]621.2718[/C][C]579.5569[/C][C]662.9868[/C][C]9e-04[/C][C]1[/C][C]0.5238[/C][C]0.5238[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3183&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3183&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[94])
82621-------
83629-------
84628-------
85612-------
86595-------
87597-------
88593-------
89590-------
90580-------
91574-------
92573-------
93573-------
94620-------
95626632.7185620.8144644.62260.13430.98190.72980.9819
96620629.0451612.0261646.0640.14880.63710.54790.8512
97588614.209593.3429635.0750.00690.29320.58220.2932
98566596.4557572.3613620.55020.00660.75420.54710.0277
99557598.471571.5372625.40480.00130.99090.54260.0586
100561597.0255567.5228626.52820.00830.99610.60540.0635
101549592.9468561.0821624.81150.00340.97530.57190.0481
102532582.9233548.8599616.98670.00170.97450.56680.0164
103526575.8883539.7598612.01680.00340.99140.54080.0084
104511572.1261534.0443610.2088e-040.99120.48210.0069
105499572.0504532.1107611.99012e-040.99860.48140.0093
106555621.2718579.5569662.98689e-0410.52380.5238







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
950.0096-0.01069e-0445.13853.76151.9395
960.0138-0.01440.001281.81356.81782.6111
970.0173-0.04270.0036686.909257.24247.5659
980.0206-0.05110.0043927.552777.29618.7918
990.023-0.06930.00581719.8449143.320411.9717
1000.0252-0.06030.0051297.8344108.152910.3997
1010.0274-0.07410.00621931.3204160.943412.6863
1020.0298-0.08740.00732593.1829216.098614.7003
1030.032-0.08660.00722488.8426207.403614.4015
1040.034-0.10680.00893736.4059311.367217.6456
1050.0356-0.12770.01065336.3595444.696621.0878
1060.0343-0.10670.00894391.9556365.996319.131

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
95 & 0.0096 & -0.0106 & 9e-04 & 45.1385 & 3.7615 & 1.9395 \tabularnewline
96 & 0.0138 & -0.0144 & 0.0012 & 81.8135 & 6.8178 & 2.6111 \tabularnewline
97 & 0.0173 & -0.0427 & 0.0036 & 686.9092 & 57.2424 & 7.5659 \tabularnewline
98 & 0.0206 & -0.0511 & 0.0043 & 927.5527 & 77.2961 & 8.7918 \tabularnewline
99 & 0.023 & -0.0693 & 0.0058 & 1719.8449 & 143.3204 & 11.9717 \tabularnewline
100 & 0.0252 & -0.0603 & 0.005 & 1297.8344 & 108.1529 & 10.3997 \tabularnewline
101 & 0.0274 & -0.0741 & 0.0062 & 1931.3204 & 160.9434 & 12.6863 \tabularnewline
102 & 0.0298 & -0.0874 & 0.0073 & 2593.1829 & 216.0986 & 14.7003 \tabularnewline
103 & 0.032 & -0.0866 & 0.0072 & 2488.8426 & 207.4036 & 14.4015 \tabularnewline
104 & 0.034 & -0.1068 & 0.0089 & 3736.4059 & 311.3672 & 17.6456 \tabularnewline
105 & 0.0356 & -0.1277 & 0.0106 & 5336.3595 & 444.6966 & 21.0878 \tabularnewline
106 & 0.0343 & -0.1067 & 0.0089 & 4391.9556 & 365.9963 & 19.131 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3183&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]95[/C][C]0.0096[/C][C]-0.0106[/C][C]9e-04[/C][C]45.1385[/C][C]3.7615[/C][C]1.9395[/C][/ROW]
[ROW][C]96[/C][C]0.0138[/C][C]-0.0144[/C][C]0.0012[/C][C]81.8135[/C][C]6.8178[/C][C]2.6111[/C][/ROW]
[ROW][C]97[/C][C]0.0173[/C][C]-0.0427[/C][C]0.0036[/C][C]686.9092[/C][C]57.2424[/C][C]7.5659[/C][/ROW]
[ROW][C]98[/C][C]0.0206[/C][C]-0.0511[/C][C]0.0043[/C][C]927.5527[/C][C]77.2961[/C][C]8.7918[/C][/ROW]
[ROW][C]99[/C][C]0.023[/C][C]-0.0693[/C][C]0.0058[/C][C]1719.8449[/C][C]143.3204[/C][C]11.9717[/C][/ROW]
[ROW][C]100[/C][C]0.0252[/C][C]-0.0603[/C][C]0.005[/C][C]1297.8344[/C][C]108.1529[/C][C]10.3997[/C][/ROW]
[ROW][C]101[/C][C]0.0274[/C][C]-0.0741[/C][C]0.0062[/C][C]1931.3204[/C][C]160.9434[/C][C]12.6863[/C][/ROW]
[ROW][C]102[/C][C]0.0298[/C][C]-0.0874[/C][C]0.0073[/C][C]2593.1829[/C][C]216.0986[/C][C]14.7003[/C][/ROW]
[ROW][C]103[/C][C]0.032[/C][C]-0.0866[/C][C]0.0072[/C][C]2488.8426[/C][C]207.4036[/C][C]14.4015[/C][/ROW]
[ROW][C]104[/C][C]0.034[/C][C]-0.1068[/C][C]0.0089[/C][C]3736.4059[/C][C]311.3672[/C][C]17.6456[/C][/ROW]
[ROW][C]105[/C][C]0.0356[/C][C]-0.1277[/C][C]0.0106[/C][C]5336.3595[/C][C]444.6966[/C][C]21.0878[/C][/ROW]
[ROW][C]106[/C][C]0.0343[/C][C]-0.1067[/C][C]0.0089[/C][C]4391.9556[/C][C]365.9963[/C][C]19.131[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3183&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3183&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
950.0096-0.01069e-0445.13853.76151.9395
960.0138-0.01440.001281.81356.81782.6111
970.0173-0.04270.0036686.909257.24247.5659
980.0206-0.05110.0043927.552777.29618.7918
990.023-0.06930.00581719.8449143.320411.9717
1000.0252-0.06030.0051297.8344108.152910.3997
1010.0274-0.07410.00621931.3204160.943412.6863
1020.0298-0.08740.00732593.1829216.098614.7003
1030.032-0.08660.00722488.8426207.403614.4015
1040.034-0.10680.00893736.4059311.367217.6456
1050.0356-0.12770.01065336.3595444.696621.0878
1060.0343-0.10670.00894391.9556365.996319.131



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