Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 07 Dec 2007 02:20:34 -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/07/t1197018456ufqq8xx252pb44n.htm/, Retrieved Sun, 28 Apr 2024 20:35:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2722, Retrieved Sun, 28 Apr 2024 20:35:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact212
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Totale werklooshe...] [2007-12-07 09:20:34] [2cdb7403ed3391afb545b8c0d20da37e] [Current]
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=2722&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=2722&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2722&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-------
62588608.7432598.6286618.857800.01460.2640.0146
63566591.0639575.2903606.83759e-040.64830.31242e-04
64557593.8902573.6074614.17312e-040.99650.38190.0058
65561593.4923569.6422617.34240.00380.99860.51610.0147
66549591.3501564.4806618.21960.0010.98660.53920.0183
67532583.9049554.361613.44893e-040.98970.60220.0083
68526576.1604544.1744608.14640.00110.99660.55270.0036
69511571.9054537.6513606.15942e-040.99570.4750.003
70499574.0047537.6223610.387200.99970.52160.0066
71555625.467587.073663.86112e-0410.60990.6099
72565634.3235594.0183674.62864e-040.99990.65720.757
73542631.4694589.3414673.597300.9990.70320.7032

\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 & 608.7432 & 598.6286 & 618.8578 & 0 & 0.0146 & 0.264 & 0.0146 \tabularnewline
63 & 566 & 591.0639 & 575.2903 & 606.8375 & 9e-04 & 0.6483 & 0.3124 & 2e-04 \tabularnewline
64 & 557 & 593.8902 & 573.6074 & 614.1731 & 2e-04 & 0.9965 & 0.3819 & 0.0058 \tabularnewline
65 & 561 & 593.4923 & 569.6422 & 617.3424 & 0.0038 & 0.9986 & 0.5161 & 0.0147 \tabularnewline
66 & 549 & 591.3501 & 564.4806 & 618.2196 & 0.001 & 0.9866 & 0.5392 & 0.0183 \tabularnewline
67 & 532 & 583.9049 & 554.361 & 613.4489 & 3e-04 & 0.9897 & 0.6022 & 0.0083 \tabularnewline
68 & 526 & 576.1604 & 544.1744 & 608.1464 & 0.0011 & 0.9966 & 0.5527 & 0.0036 \tabularnewline
69 & 511 & 571.9054 & 537.6513 & 606.1594 & 2e-04 & 0.9957 & 0.475 & 0.003 \tabularnewline
70 & 499 & 574.0047 & 537.6223 & 610.3872 & 0 & 0.9997 & 0.5216 & 0.0066 \tabularnewline
71 & 555 & 625.467 & 587.073 & 663.8611 & 2e-04 & 1 & 0.6099 & 0.6099 \tabularnewline
72 & 565 & 634.3235 & 594.0183 & 674.6286 & 4e-04 & 0.9999 & 0.6572 & 0.757 \tabularnewline
73 & 542 & 631.4694 & 589.3414 & 673.5973 & 0 & 0.999 & 0.7032 & 0.7032 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2722&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]608.7432[/C][C]598.6286[/C][C]618.8578[/C][C]0[/C][C]0.0146[/C][C]0.264[/C][C]0.0146[/C][/ROW]
[ROW][C]63[/C][C]566[/C][C]591.0639[/C][C]575.2903[/C][C]606.8375[/C][C]9e-04[/C][C]0.6483[/C][C]0.3124[/C][C]2e-04[/C][/ROW]
[ROW][C]64[/C][C]557[/C][C]593.8902[/C][C]573.6074[/C][C]614.1731[/C][C]2e-04[/C][C]0.9965[/C][C]0.3819[/C][C]0.0058[/C][/ROW]
[ROW][C]65[/C][C]561[/C][C]593.4923[/C][C]569.6422[/C][C]617.3424[/C][C]0.0038[/C][C]0.9986[/C][C]0.5161[/C][C]0.0147[/C][/ROW]
[ROW][C]66[/C][C]549[/C][C]591.3501[/C][C]564.4806[/C][C]618.2196[/C][C]0.001[/C][C]0.9866[/C][C]0.5392[/C][C]0.0183[/C][/ROW]
[ROW][C]67[/C][C]532[/C][C]583.9049[/C][C]554.361[/C][C]613.4489[/C][C]3e-04[/C][C]0.9897[/C][C]0.6022[/C][C]0.0083[/C][/ROW]
[ROW][C]68[/C][C]526[/C][C]576.1604[/C][C]544.1744[/C][C]608.1464[/C][C]0.0011[/C][C]0.9966[/C][C]0.5527[/C][C]0.0036[/C][/ROW]
[ROW][C]69[/C][C]511[/C][C]571.9054[/C][C]537.6513[/C][C]606.1594[/C][C]2e-04[/C][C]0.9957[/C][C]0.475[/C][C]0.003[/C][/ROW]
[ROW][C]70[/C][C]499[/C][C]574.0047[/C][C]537.6223[/C][C]610.3872[/C][C]0[/C][C]0.9997[/C][C]0.5216[/C][C]0.0066[/C][/ROW]
[ROW][C]71[/C][C]555[/C][C]625.467[/C][C]587.073[/C][C]663.8611[/C][C]2e-04[/C][C]1[/C][C]0.6099[/C][C]0.6099[/C][/ROW]
[ROW][C]72[/C][C]565[/C][C]634.3235[/C][C]594.0183[/C][C]674.6286[/C][C]4e-04[/C][C]0.9999[/C][C]0.6572[/C][C]0.757[/C][/ROW]
[ROW][C]73[/C][C]542[/C][C]631.4694[/C][C]589.3414[/C][C]673.5973[/C][C]0[/C][C]0.999[/C][C]0.7032[/C][C]0.7032[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2722&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2722&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-------
62588608.7432598.6286618.857800.01460.2640.0146
63566591.0639575.2903606.83759e-040.64830.31242e-04
64557593.8902573.6074614.17312e-040.99650.38190.0058
65561593.4923569.6422617.34240.00380.99860.51610.0147
66549591.3501564.4806618.21960.0010.98660.53920.0183
67532583.9049554.361613.44893e-040.98970.60220.0083
68526576.1604544.1744608.14640.00110.99660.55270.0036
69511571.9054537.6513606.15942e-040.99570.4750.003
70499574.0047537.6223610.387200.99970.52160.0066
71555625.467587.073663.86112e-0410.60990.6099
72565634.3235594.0183674.62864e-040.99990.65720.757
73542631.4694589.3414673.597300.9990.70320.7032







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.0085-0.03410.0028430.280635.85675.988
630.0136-0.04240.0035628.19952.34997.2353
640.0174-0.06210.00521360.8894113.407510.6493
650.0205-0.05470.00461055.748487.9799.3797
660.0232-0.07160.0061793.5318149.46112.2254
670.0258-0.08890.00742694.1202224.5114.9837
680.0283-0.08710.00732516.0693209.672414.4801
690.0306-0.10650.00893709.4665309.122217.5819
700.0323-0.13070.01095625.7088468.809121.652
710.0313-0.11270.00944965.6048413.800420.3421
720.0324-0.10930.00914805.743400.478620.012
730.034-0.14170.01188004.7679667.06425.8276

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0085 & -0.0341 & 0.0028 & 430.2806 & 35.8567 & 5.988 \tabularnewline
63 & 0.0136 & -0.0424 & 0.0035 & 628.199 & 52.3499 & 7.2353 \tabularnewline
64 & 0.0174 & -0.0621 & 0.0052 & 1360.8894 & 113.4075 & 10.6493 \tabularnewline
65 & 0.0205 & -0.0547 & 0.0046 & 1055.7484 & 87.979 & 9.3797 \tabularnewline
66 & 0.0232 & -0.0716 & 0.006 & 1793.5318 & 149.461 & 12.2254 \tabularnewline
67 & 0.0258 & -0.0889 & 0.0074 & 2694.1202 & 224.51 & 14.9837 \tabularnewline
68 & 0.0283 & -0.0871 & 0.0073 & 2516.0693 & 209.6724 & 14.4801 \tabularnewline
69 & 0.0306 & -0.1065 & 0.0089 & 3709.4665 & 309.1222 & 17.5819 \tabularnewline
70 & 0.0323 & -0.1307 & 0.0109 & 5625.7088 & 468.8091 & 21.652 \tabularnewline
71 & 0.0313 & -0.1127 & 0.0094 & 4965.6048 & 413.8004 & 20.3421 \tabularnewline
72 & 0.0324 & -0.1093 & 0.0091 & 4805.743 & 400.4786 & 20.012 \tabularnewline
73 & 0.034 & -0.1417 & 0.0118 & 8004.7679 & 667.064 & 25.8276 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2722&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.0085[/C][C]-0.0341[/C][C]0.0028[/C][C]430.2806[/C][C]35.8567[/C][C]5.988[/C][/ROW]
[ROW][C]63[/C][C]0.0136[/C][C]-0.0424[/C][C]0.0035[/C][C]628.199[/C][C]52.3499[/C][C]7.2353[/C][/ROW]
[ROW][C]64[/C][C]0.0174[/C][C]-0.0621[/C][C]0.0052[/C][C]1360.8894[/C][C]113.4075[/C][C]10.6493[/C][/ROW]
[ROW][C]65[/C][C]0.0205[/C][C]-0.0547[/C][C]0.0046[/C][C]1055.7484[/C][C]87.979[/C][C]9.3797[/C][/ROW]
[ROW][C]66[/C][C]0.0232[/C][C]-0.0716[/C][C]0.006[/C][C]1793.5318[/C][C]149.461[/C][C]12.2254[/C][/ROW]
[ROW][C]67[/C][C]0.0258[/C][C]-0.0889[/C][C]0.0074[/C][C]2694.1202[/C][C]224.51[/C][C]14.9837[/C][/ROW]
[ROW][C]68[/C][C]0.0283[/C][C]-0.0871[/C][C]0.0073[/C][C]2516.0693[/C][C]209.6724[/C][C]14.4801[/C][/ROW]
[ROW][C]69[/C][C]0.0306[/C][C]-0.1065[/C][C]0.0089[/C][C]3709.4665[/C][C]309.1222[/C][C]17.5819[/C][/ROW]
[ROW][C]70[/C][C]0.0323[/C][C]-0.1307[/C][C]0.0109[/C][C]5625.7088[/C][C]468.8091[/C][C]21.652[/C][/ROW]
[ROW][C]71[/C][C]0.0313[/C][C]-0.1127[/C][C]0.0094[/C][C]4965.6048[/C][C]413.8004[/C][C]20.3421[/C][/ROW]
[ROW][C]72[/C][C]0.0324[/C][C]-0.1093[/C][C]0.0091[/C][C]4805.743[/C][C]400.4786[/C][C]20.012[/C][/ROW]
[ROW][C]73[/C][C]0.034[/C][C]-0.1417[/C][C]0.0118[/C][C]8004.7679[/C][C]667.064[/C][C]25.8276[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2722&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2722&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.0085-0.03410.0028430.280635.85675.988
630.0136-0.04240.0035628.19952.34997.2353
640.0174-0.06210.00521360.8894113.407510.6493
650.0205-0.05470.00461055.748487.9799.3797
660.0232-0.07160.0061793.5318149.46112.2254
670.0258-0.08890.00742694.1202224.5114.9837
680.0283-0.08710.00732516.0693209.672414.4801
690.0306-0.10650.00893709.4665309.122217.5819
700.0323-0.13070.01095625.7088468.809121.652
710.0313-0.11270.00944965.6048413.800420.3421
720.0324-0.10930.00914805.743400.478620.012
730.034-0.14170.01188004.7679667.06425.8276



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