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 computationSat, 04 Dec 2010 22:46:17 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/04/t1291502715dcylg1dkjncvp60.htm/, Retrieved Sun, 05 May 2024 07:56:21 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=105276, Retrieved Sun, 05 May 2024 07:56:21 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact139
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [W9] [2010-12-04 22:46:17] [6f3869f9d1e39c73f93153f1f7803f84] [Current]
-   P     [ARIMA Forecasting] [] [2010-12-13 19:41:37] [5b5e2f42cf221276958b46f2b8444c18]
Feedback Forum

Post a new message
Dataseries X:
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
575
580
575
563
552
537
545
601
604
586
564




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105276&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' @ 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[49])
37506-------
38502-------
39516-------
40528-------
41533-------
42536-------
43537-------
44524-------
45536-------
46587-------
47597-------
48581-------
49564-------
50558555.0217539.1177570.52560.35330.128210.1282
51575563.1088538.4011586.87710.16340.66320.99990.4707
52580570.9913538.2653602.10990.28520.40030.99660.6702
53575570.612529.6948609.04340.41150.3160.97250.632
54563566.7401517.4041612.48080.43630.36170.90610.5467
55552566.044508.5447618.70770.30060.54510.86010.5303
56537553.3051486.2244613.74990.29850.51690.8290.3644
57545560.7331486.4757627.03110.32090.75850.76770.4615
58601609.0063533.4595676.9220.40860.96760.73730.903
59604617.5764536.0175690.41520.35740.67220.71010.9253
60586602.7391511.9056682.6350.34070.48770.70310.829
61564587.248486.5351674.35510.30050.51120.69950.6995

\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[49]) \tabularnewline
37 & 506 & - & - & - & - & - & - & - \tabularnewline
38 & 502 & - & - & - & - & - & - & - \tabularnewline
39 & 516 & - & - & - & - & - & - & - \tabularnewline
40 & 528 & - & - & - & - & - & - & - \tabularnewline
41 & 533 & - & - & - & - & - & - & - \tabularnewline
42 & 536 & - & - & - & - & - & - & - \tabularnewline
43 & 537 & - & - & - & - & - & - & - \tabularnewline
44 & 524 & - & - & - & - & - & - & - \tabularnewline
45 & 536 & - & - & - & - & - & - & - \tabularnewline
46 & 587 & - & - & - & - & - & - & - \tabularnewline
47 & 597 & - & - & - & - & - & - & - \tabularnewline
48 & 581 & - & - & - & - & - & - & - \tabularnewline
49 & 564 & - & - & - & - & - & - & - \tabularnewline
50 & 558 & 555.0217 & 539.1177 & 570.5256 & 0.3533 & 0.1282 & 1 & 0.1282 \tabularnewline
51 & 575 & 563.1088 & 538.4011 & 586.8771 & 0.1634 & 0.6632 & 0.9999 & 0.4707 \tabularnewline
52 & 580 & 570.9913 & 538.2653 & 602.1099 & 0.2852 & 0.4003 & 0.9966 & 0.6702 \tabularnewline
53 & 575 & 570.612 & 529.6948 & 609.0434 & 0.4115 & 0.316 & 0.9725 & 0.632 \tabularnewline
54 & 563 & 566.7401 & 517.4041 & 612.4808 & 0.4363 & 0.3617 & 0.9061 & 0.5467 \tabularnewline
55 & 552 & 566.044 & 508.5447 & 618.7077 & 0.3006 & 0.5451 & 0.8601 & 0.5303 \tabularnewline
56 & 537 & 553.3051 & 486.2244 & 613.7499 & 0.2985 & 0.5169 & 0.829 & 0.3644 \tabularnewline
57 & 545 & 560.7331 & 486.4757 & 627.0311 & 0.3209 & 0.7585 & 0.7677 & 0.4615 \tabularnewline
58 & 601 & 609.0063 & 533.4595 & 676.922 & 0.4086 & 0.9676 & 0.7373 & 0.903 \tabularnewline
59 & 604 & 617.5764 & 536.0175 & 690.4152 & 0.3574 & 0.6722 & 0.7101 & 0.9253 \tabularnewline
60 & 586 & 602.7391 & 511.9056 & 682.635 & 0.3407 & 0.4877 & 0.7031 & 0.829 \tabularnewline
61 & 564 & 587.248 & 486.5351 & 674.3551 & 0.3005 & 0.5112 & 0.6995 & 0.6995 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105276&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[49])[/C][/ROW]
[ROW][C]37[/C][C]506[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]502[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]516[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]528[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]533[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]536[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]537[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]524[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]536[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]587[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]597[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]581[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]564[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]558[/C][C]555.0217[/C][C]539.1177[/C][C]570.5256[/C][C]0.3533[/C][C]0.1282[/C][C]1[/C][C]0.1282[/C][/ROW]
[ROW][C]51[/C][C]575[/C][C]563.1088[/C][C]538.4011[/C][C]586.8771[/C][C]0.1634[/C][C]0.6632[/C][C]0.9999[/C][C]0.4707[/C][/ROW]
[ROW][C]52[/C][C]580[/C][C]570.9913[/C][C]538.2653[/C][C]602.1099[/C][C]0.2852[/C][C]0.4003[/C][C]0.9966[/C][C]0.6702[/C][/ROW]
[ROW][C]53[/C][C]575[/C][C]570.612[/C][C]529.6948[/C][C]609.0434[/C][C]0.4115[/C][C]0.316[/C][C]0.9725[/C][C]0.632[/C][/ROW]
[ROW][C]54[/C][C]563[/C][C]566.7401[/C][C]517.4041[/C][C]612.4808[/C][C]0.4363[/C][C]0.3617[/C][C]0.9061[/C][C]0.5467[/C][/ROW]
[ROW][C]55[/C][C]552[/C][C]566.044[/C][C]508.5447[/C][C]618.7077[/C][C]0.3006[/C][C]0.5451[/C][C]0.8601[/C][C]0.5303[/C][/ROW]
[ROW][C]56[/C][C]537[/C][C]553.3051[/C][C]486.2244[/C][C]613.7499[/C][C]0.2985[/C][C]0.5169[/C][C]0.829[/C][C]0.3644[/C][/ROW]
[ROW][C]57[/C][C]545[/C][C]560.7331[/C][C]486.4757[/C][C]627.0311[/C][C]0.3209[/C][C]0.7585[/C][C]0.7677[/C][C]0.4615[/C][/ROW]
[ROW][C]58[/C][C]601[/C][C]609.0063[/C][C]533.4595[/C][C]676.922[/C][C]0.4086[/C][C]0.9676[/C][C]0.7373[/C][C]0.903[/C][/ROW]
[ROW][C]59[/C][C]604[/C][C]617.5764[/C][C]536.0175[/C][C]690.4152[/C][C]0.3574[/C][C]0.6722[/C][C]0.7101[/C][C]0.9253[/C][/ROW]
[ROW][C]60[/C][C]586[/C][C]602.7391[/C][C]511.9056[/C][C]682.635[/C][C]0.3407[/C][C]0.4877[/C][C]0.7031[/C][C]0.829[/C][/ROW]
[ROW][C]61[/C][C]564[/C][C]587.248[/C][C]486.5351[/C][C]674.3551[/C][C]0.3005[/C][C]0.5112[/C][C]0.6995[/C][C]0.6995[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105276&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105276&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[49])
37506-------
38502-------
39516-------
40528-------
41533-------
42536-------
43537-------
44524-------
45536-------
46587-------
47597-------
48581-------
49564-------
50558555.0217539.1177570.52560.35330.128210.1282
51575563.1088538.4011586.87710.16340.66320.99990.4707
52580570.9913538.2653602.10990.28520.40030.99660.6702
53575570.612529.6948609.04340.41150.3160.97250.632
54563566.7401517.4041612.48080.43630.36170.90610.5467
55552566.044508.5447618.70770.30060.54510.86010.5303
56537553.3051486.2244613.74990.29850.51690.8290.3644
57545560.7331486.4757627.03110.32090.75850.76770.4615
58601609.0063533.4595676.9220.40860.96760.73730.903
59604617.5764536.0175690.41520.35740.67220.71010.9253
60586602.7391511.9056682.6350.34070.48770.70310.829
61564587.248486.5351674.35510.30050.51120.69950.6995







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.01430.005408.870500
510.02150.02110.0132141.400675.13558.6681
520.02780.01580.014181.155877.14238.7831
530.03440.00770.012519.254762.67047.9165
540.0412-0.00660.011313.988252.9347.2756
550.0475-0.02480.0136197.235276.98428.7741
560.0557-0.02950.0158265.8577103.966110.1964
570.0603-0.02810.0174247.5311121.911711.0414
580.0569-0.01310.016964.1011115.488310.7465
590.0602-0.0220.0174184.3196122.371511.0622
600.0676-0.02780.0183280.1983136.719411.6927
610.0757-0.03960.0201540.4707170.365313.0524

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0143 & 0.0054 & 0 & 8.8705 & 0 & 0 \tabularnewline
51 & 0.0215 & 0.0211 & 0.0132 & 141.4006 & 75.1355 & 8.6681 \tabularnewline
52 & 0.0278 & 0.0158 & 0.0141 & 81.1558 & 77.1423 & 8.7831 \tabularnewline
53 & 0.0344 & 0.0077 & 0.0125 & 19.2547 & 62.6704 & 7.9165 \tabularnewline
54 & 0.0412 & -0.0066 & 0.0113 & 13.9882 & 52.934 & 7.2756 \tabularnewline
55 & 0.0475 & -0.0248 & 0.0136 & 197.2352 & 76.9842 & 8.7741 \tabularnewline
56 & 0.0557 & -0.0295 & 0.0158 & 265.8577 & 103.9661 & 10.1964 \tabularnewline
57 & 0.0603 & -0.0281 & 0.0174 & 247.5311 & 121.9117 & 11.0414 \tabularnewline
58 & 0.0569 & -0.0131 & 0.0169 & 64.1011 & 115.4883 & 10.7465 \tabularnewline
59 & 0.0602 & -0.022 & 0.0174 & 184.3196 & 122.3715 & 11.0622 \tabularnewline
60 & 0.0676 & -0.0278 & 0.0183 & 280.1983 & 136.7194 & 11.6927 \tabularnewline
61 & 0.0757 & -0.0396 & 0.0201 & 540.4707 & 170.3653 & 13.0524 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105276&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]50[/C][C]0.0143[/C][C]0.0054[/C][C]0[/C][C]8.8705[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.0215[/C][C]0.0211[/C][C]0.0132[/C][C]141.4006[/C][C]75.1355[/C][C]8.6681[/C][/ROW]
[ROW][C]52[/C][C]0.0278[/C][C]0.0158[/C][C]0.0141[/C][C]81.1558[/C][C]77.1423[/C][C]8.7831[/C][/ROW]
[ROW][C]53[/C][C]0.0344[/C][C]0.0077[/C][C]0.0125[/C][C]19.2547[/C][C]62.6704[/C][C]7.9165[/C][/ROW]
[ROW][C]54[/C][C]0.0412[/C][C]-0.0066[/C][C]0.0113[/C][C]13.9882[/C][C]52.934[/C][C]7.2756[/C][/ROW]
[ROW][C]55[/C][C]0.0475[/C][C]-0.0248[/C][C]0.0136[/C][C]197.2352[/C][C]76.9842[/C][C]8.7741[/C][/ROW]
[ROW][C]56[/C][C]0.0557[/C][C]-0.0295[/C][C]0.0158[/C][C]265.8577[/C][C]103.9661[/C][C]10.1964[/C][/ROW]
[ROW][C]57[/C][C]0.0603[/C][C]-0.0281[/C][C]0.0174[/C][C]247.5311[/C][C]121.9117[/C][C]11.0414[/C][/ROW]
[ROW][C]58[/C][C]0.0569[/C][C]-0.0131[/C][C]0.0169[/C][C]64.1011[/C][C]115.4883[/C][C]10.7465[/C][/ROW]
[ROW][C]59[/C][C]0.0602[/C][C]-0.022[/C][C]0.0174[/C][C]184.3196[/C][C]122.3715[/C][C]11.0622[/C][/ROW]
[ROW][C]60[/C][C]0.0676[/C][C]-0.0278[/C][C]0.0183[/C][C]280.1983[/C][C]136.7194[/C][C]11.6927[/C][/ROW]
[ROW][C]61[/C][C]0.0757[/C][C]-0.0396[/C][C]0.0201[/C][C]540.4707[/C][C]170.3653[/C][C]13.0524[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105276&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105276&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
500.01430.005408.870500
510.02150.02110.0132141.400675.13558.6681
520.02780.01580.014181.155877.14238.7831
530.03440.00770.012519.254762.67047.9165
540.0412-0.00660.011313.988252.9347.2756
550.0475-0.02480.0136197.235276.98428.7741
560.0557-0.02950.0158265.8577103.966110.1964
570.0603-0.02810.0174247.5311121.911711.0414
580.0569-0.01310.016964.1011115.488310.7465
590.0602-0.0220.0174184.3196122.371511.0622
600.0676-0.02780.0183280.1983136.719411.6927
610.0757-0.03960.0201540.4707170.365313.0524



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