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 computationTue, 15 Dec 2009 08:48:35 -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/2009/Dec/15/t12608921770jfkmoiaru2wfei.htm/, Retrieved Wed, 08 May 2024 23:48:11 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=67998, Retrieved Wed, 08 May 2024 23:48:11 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact144
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [ARIMA bel20] [2008-12-13 15:32:40] [74be16979710d4c4e7c6647856088456]
F RMP   [ARIMA Forecasting] [] [2008-12-13 15:36:11] [74be16979710d4c4e7c6647856088456]
-  MPD    [ARIMA Forecasting] [] [2009-12-15 15:40:27] [2f674a53c3d7aaa1bcf80e66074d3c9b]
-    D        [ARIMA Forecasting] [] [2009-12-15 15:48:35] [5858ea01c9bd81debbf921a11363ad90] [Current]
Feedback Forum

Post a new message
Dataseries X:
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
527
510
514
517
508
493
490
469
478
528
534
518
506
502
516
528
533
536
537
524
536
587
597
581
564
558




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67998&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]1 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=67998&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67998&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 time1 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[59])
47510-------
48514-------
49517-------
50508-------
51493-------
52490-------
53469-------
54478-------
55528-------
56534-------
57518-------
58506-------
59502-------
60516507.0143491.5985522.430.12660.73810.18720.7381
61528512.4166491.2582533.5750.07440.370.33560.8327
62533505.9429478.9396532.94630.02480.05470.44070.6126
63536491.3361458.028524.64420.00430.00710.4610.2652
64537489.1443450.5538527.73480.00750.00870.48270.2569
65524468.6432425.0267512.25970.00640.00110.49360.0669
66536477.8066429.483526.13010.00910.03050.49690.1632
67587528.0258475.3789580.67280.01410.38330.50040.8337
68597534.1332477.408590.85830.01490.03390.50180.8666
69581518.1902457.6288578.75160.0210.00540.50250.6999
70564506.2449442.0614570.42840.03890.01120.5030.5516
71558502.2707434.6417569.89970.05310.03680.50310.5031

\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[59]) \tabularnewline
47 & 510 & - & - & - & - & - & - & - \tabularnewline
48 & 514 & - & - & - & - & - & - & - \tabularnewline
49 & 517 & - & - & - & - & - & - & - \tabularnewline
50 & 508 & - & - & - & - & - & - & - \tabularnewline
51 & 493 & - & - & - & - & - & - & - \tabularnewline
52 & 490 & - & - & - & - & - & - & - \tabularnewline
53 & 469 & - & - & - & - & - & - & - \tabularnewline
54 & 478 & - & - & - & - & - & - & - \tabularnewline
55 & 528 & - & - & - & - & - & - & - \tabularnewline
56 & 534 & - & - & - & - & - & - & - \tabularnewline
57 & 518 & - & - & - & - & - & - & - \tabularnewline
58 & 506 & - & - & - & - & - & - & - \tabularnewline
59 & 502 & - & - & - & - & - & - & - \tabularnewline
60 & 516 & 507.0143 & 491.5985 & 522.43 & 0.1266 & 0.7381 & 0.1872 & 0.7381 \tabularnewline
61 & 528 & 512.4166 & 491.2582 & 533.575 & 0.0744 & 0.37 & 0.3356 & 0.8327 \tabularnewline
62 & 533 & 505.9429 & 478.9396 & 532.9463 & 0.0248 & 0.0547 & 0.4407 & 0.6126 \tabularnewline
63 & 536 & 491.3361 & 458.028 & 524.6442 & 0.0043 & 0.0071 & 0.461 & 0.2652 \tabularnewline
64 & 537 & 489.1443 & 450.5538 & 527.7348 & 0.0075 & 0.0087 & 0.4827 & 0.2569 \tabularnewline
65 & 524 & 468.6432 & 425.0267 & 512.2597 & 0.0064 & 0.0011 & 0.4936 & 0.0669 \tabularnewline
66 & 536 & 477.8066 & 429.483 & 526.1301 & 0.0091 & 0.0305 & 0.4969 & 0.1632 \tabularnewline
67 & 587 & 528.0258 & 475.3789 & 580.6728 & 0.0141 & 0.3833 & 0.5004 & 0.8337 \tabularnewline
68 & 597 & 534.1332 & 477.408 & 590.8583 & 0.0149 & 0.0339 & 0.5018 & 0.8666 \tabularnewline
69 & 581 & 518.1902 & 457.6288 & 578.7516 & 0.021 & 0.0054 & 0.5025 & 0.6999 \tabularnewline
70 & 564 & 506.2449 & 442.0614 & 570.4284 & 0.0389 & 0.0112 & 0.503 & 0.5516 \tabularnewline
71 & 558 & 502.2707 & 434.6417 & 569.8997 & 0.0531 & 0.0368 & 0.5031 & 0.5031 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67998&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[59])[/C][/ROW]
[ROW][C]47[/C][C]510[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]514[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]517[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]508[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]493[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]490[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]469[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]478[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]528[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]534[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]518[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]506[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]502[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]516[/C][C]507.0143[/C][C]491.5985[/C][C]522.43[/C][C]0.1266[/C][C]0.7381[/C][C]0.1872[/C][C]0.7381[/C][/ROW]
[ROW][C]61[/C][C]528[/C][C]512.4166[/C][C]491.2582[/C][C]533.575[/C][C]0.0744[/C][C]0.37[/C][C]0.3356[/C][C]0.8327[/C][/ROW]
[ROW][C]62[/C][C]533[/C][C]505.9429[/C][C]478.9396[/C][C]532.9463[/C][C]0.0248[/C][C]0.0547[/C][C]0.4407[/C][C]0.6126[/C][/ROW]
[ROW][C]63[/C][C]536[/C][C]491.3361[/C][C]458.028[/C][C]524.6442[/C][C]0.0043[/C][C]0.0071[/C][C]0.461[/C][C]0.2652[/C][/ROW]
[ROW][C]64[/C][C]537[/C][C]489.1443[/C][C]450.5538[/C][C]527.7348[/C][C]0.0075[/C][C]0.0087[/C][C]0.4827[/C][C]0.2569[/C][/ROW]
[ROW][C]65[/C][C]524[/C][C]468.6432[/C][C]425.0267[/C][C]512.2597[/C][C]0.0064[/C][C]0.0011[/C][C]0.4936[/C][C]0.0669[/C][/ROW]
[ROW][C]66[/C][C]536[/C][C]477.8066[/C][C]429.483[/C][C]526.1301[/C][C]0.0091[/C][C]0.0305[/C][C]0.4969[/C][C]0.1632[/C][/ROW]
[ROW][C]67[/C][C]587[/C][C]528.0258[/C][C]475.3789[/C][C]580.6728[/C][C]0.0141[/C][C]0.3833[/C][C]0.5004[/C][C]0.8337[/C][/ROW]
[ROW][C]68[/C][C]597[/C][C]534.1332[/C][C]477.408[/C][C]590.8583[/C][C]0.0149[/C][C]0.0339[/C][C]0.5018[/C][C]0.8666[/C][/ROW]
[ROW][C]69[/C][C]581[/C][C]518.1902[/C][C]457.6288[/C][C]578.7516[/C][C]0.021[/C][C]0.0054[/C][C]0.5025[/C][C]0.6999[/C][/ROW]
[ROW][C]70[/C][C]564[/C][C]506.2449[/C][C]442.0614[/C][C]570.4284[/C][C]0.0389[/C][C]0.0112[/C][C]0.503[/C][C]0.5516[/C][/ROW]
[ROW][C]71[/C][C]558[/C][C]502.2707[/C][C]434.6417[/C][C]569.8997[/C][C]0.0531[/C][C]0.0368[/C][C]0.5031[/C][C]0.5031[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67998&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67998&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[59])
47510-------
48514-------
49517-------
50508-------
51493-------
52490-------
53469-------
54478-------
55528-------
56534-------
57518-------
58506-------
59502-------
60516507.0143491.5985522.430.12660.73810.18720.7381
61528512.4166491.2582533.5750.07440.370.33560.8327
62533505.9429478.9396532.94630.02480.05470.44070.6126
63536491.3361458.028524.64420.00430.00710.4610.2652
64537489.1443450.5538527.73480.00750.00870.48270.2569
65524468.6432425.0267512.25970.00640.00110.49360.0669
66536477.8066429.483526.13010.00910.03050.49690.1632
67587528.0258475.3789580.67280.01410.38330.50040.8337
68597534.1332477.408590.85830.01490.03390.50180.8666
69581518.1902457.6288578.75160.0210.00540.50250.6999
70564506.2449442.0614570.42840.03890.01120.5030.5516
71558502.2707434.6417569.89970.05310.03680.50310.5031







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
600.01550.01770.001580.74326.72862.594
610.02110.03040.0025242.842720.23694.4985
620.02720.05350.0045732.085261.00717.8107
630.03460.09090.00761994.8674166.23912.8934
640.04030.09780.00822290.1656190.847113.8147
650.04750.11810.00983064.3763255.364715.9801
660.05160.12180.01013386.4765282.206416.799
670.05090.11170.00933477.9514289.829317.0244
680.05420.11770.00983952.237329.353118.1481
690.05960.12120.01013945.0725328.75618.1316
700.06470.11410.00953335.6552277.971316.6725
710.06870.1110.00923105.7575258.813116.0877

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
60 & 0.0155 & 0.0177 & 0.0015 & 80.7432 & 6.7286 & 2.594 \tabularnewline
61 & 0.0211 & 0.0304 & 0.0025 & 242.8427 & 20.2369 & 4.4985 \tabularnewline
62 & 0.0272 & 0.0535 & 0.0045 & 732.0852 & 61.0071 & 7.8107 \tabularnewline
63 & 0.0346 & 0.0909 & 0.0076 & 1994.8674 & 166.239 & 12.8934 \tabularnewline
64 & 0.0403 & 0.0978 & 0.0082 & 2290.1656 & 190.8471 & 13.8147 \tabularnewline
65 & 0.0475 & 0.1181 & 0.0098 & 3064.3763 & 255.3647 & 15.9801 \tabularnewline
66 & 0.0516 & 0.1218 & 0.0101 & 3386.4765 & 282.2064 & 16.799 \tabularnewline
67 & 0.0509 & 0.1117 & 0.0093 & 3477.9514 & 289.8293 & 17.0244 \tabularnewline
68 & 0.0542 & 0.1177 & 0.0098 & 3952.237 & 329.3531 & 18.1481 \tabularnewline
69 & 0.0596 & 0.1212 & 0.0101 & 3945.0725 & 328.756 & 18.1316 \tabularnewline
70 & 0.0647 & 0.1141 & 0.0095 & 3335.6552 & 277.9713 & 16.6725 \tabularnewline
71 & 0.0687 & 0.111 & 0.0092 & 3105.7575 & 258.8131 & 16.0877 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67998&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]60[/C][C]0.0155[/C][C]0.0177[/C][C]0.0015[/C][C]80.7432[/C][C]6.7286[/C][C]2.594[/C][/ROW]
[ROW][C]61[/C][C]0.0211[/C][C]0.0304[/C][C]0.0025[/C][C]242.8427[/C][C]20.2369[/C][C]4.4985[/C][/ROW]
[ROW][C]62[/C][C]0.0272[/C][C]0.0535[/C][C]0.0045[/C][C]732.0852[/C][C]61.0071[/C][C]7.8107[/C][/ROW]
[ROW][C]63[/C][C]0.0346[/C][C]0.0909[/C][C]0.0076[/C][C]1994.8674[/C][C]166.239[/C][C]12.8934[/C][/ROW]
[ROW][C]64[/C][C]0.0403[/C][C]0.0978[/C][C]0.0082[/C][C]2290.1656[/C][C]190.8471[/C][C]13.8147[/C][/ROW]
[ROW][C]65[/C][C]0.0475[/C][C]0.1181[/C][C]0.0098[/C][C]3064.3763[/C][C]255.3647[/C][C]15.9801[/C][/ROW]
[ROW][C]66[/C][C]0.0516[/C][C]0.1218[/C][C]0.0101[/C][C]3386.4765[/C][C]282.2064[/C][C]16.799[/C][/ROW]
[ROW][C]67[/C][C]0.0509[/C][C]0.1117[/C][C]0.0093[/C][C]3477.9514[/C][C]289.8293[/C][C]17.0244[/C][/ROW]
[ROW][C]68[/C][C]0.0542[/C][C]0.1177[/C][C]0.0098[/C][C]3952.237[/C][C]329.3531[/C][C]18.1481[/C][/ROW]
[ROW][C]69[/C][C]0.0596[/C][C]0.1212[/C][C]0.0101[/C][C]3945.0725[/C][C]328.756[/C][C]18.1316[/C][/ROW]
[ROW][C]70[/C][C]0.0647[/C][C]0.1141[/C][C]0.0095[/C][C]3335.6552[/C][C]277.9713[/C][C]16.6725[/C][/ROW]
[ROW][C]71[/C][C]0.0687[/C][C]0.111[/C][C]0.0092[/C][C]3105.7575[/C][C]258.8131[/C][C]16.0877[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67998&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67998&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
600.01550.01770.001580.74326.72862.594
610.02110.03040.0025242.842720.23694.4985
620.02720.05350.0045732.085261.00717.8107
630.03460.09090.00761994.8674166.23912.8934
640.04030.09780.00822290.1656190.847113.8147
650.04750.11810.00983064.3763255.364715.9801
660.05160.12180.01013386.4765282.206416.799
670.05090.11170.00933477.9514289.829317.0244
680.05420.11770.00983952.237329.353118.1481
690.05960.12120.01013945.0725328.75618.1316
700.06470.11410.00953335.6552277.971316.6725
710.06870.1110.00923105.7575258.813116.0877



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