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 computationThu, 23 Dec 2010 08:13:53 +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/23/t1293091889onmvy50f31ct53k.htm/, Retrieved Sun, 05 May 2024 05:31:16 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114641, Retrieved Sun, 05 May 2024 05:31:16 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact161
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Paper] [2010-12-23 08:13:53] [ca0a9c6c6ac3cc5623c7945c1ccf8fd2] [Current]
- R PD    [ARIMA Forecasting] [] [2010-12-29 19:30:26] [70635d2e8be5a44e0387ac70a19b85b5]
Feedback Forum

Post a new message
Dataseries X:
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




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114641&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114641&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114641&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[48])
36542-------
37527-------
38510-------
39514-------
40517-------
41508-------
42493-------
43490-------
44469-------
45478-------
46528-------
47534-------
48518-------
49506500.3794484.3941516.36460.24540.01545e-040.0154
50502483.2454461.8594504.63140.04280.01850.00717e-04
51516488.8042462.2555515.3530.02230.1650.03140.0156
52528490.9603458.0571523.86340.01370.06790.06040.0536
53533482.1498444.3023519.99740.00420.00880.09030.0317
54536467.4509424.8862510.01578e-040.00130.11970.01
55537464.2208417.0796511.3620.00120.00140.14190.0127
56524443.3191392.0897494.54850.0012e-040.16290.0021
57536452.3648397.2465507.48320.00150.00540.1810.0098
58587502.31443.5078561.11220.00240.13070.19590.3005
59597508.3446446.0911570.59810.00260.00660.20960.3806
60581492.3477426.7967557.89870.0049e-040.22150.2215

\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[48]) \tabularnewline
36 & 542 & - & - & - & - & - & - & - \tabularnewline
37 & 527 & - & - & - & - & - & - & - \tabularnewline
38 & 510 & - & - & - & - & - & - & - \tabularnewline
39 & 514 & - & - & - & - & - & - & - \tabularnewline
40 & 517 & - & - & - & - & - & - & - \tabularnewline
41 & 508 & - & - & - & - & - & - & - \tabularnewline
42 & 493 & - & - & - & - & - & - & - \tabularnewline
43 & 490 & - & - & - & - & - & - & - \tabularnewline
44 & 469 & - & - & - & - & - & - & - \tabularnewline
45 & 478 & - & - & - & - & - & - & - \tabularnewline
46 & 528 & - & - & - & - & - & - & - \tabularnewline
47 & 534 & - & - & - & - & - & - & - \tabularnewline
48 & 518 & - & - & - & - & - & - & - \tabularnewline
49 & 506 & 500.3794 & 484.3941 & 516.3646 & 0.2454 & 0.0154 & 5e-04 & 0.0154 \tabularnewline
50 & 502 & 483.2454 & 461.8594 & 504.6314 & 0.0428 & 0.0185 & 0.0071 & 7e-04 \tabularnewline
51 & 516 & 488.8042 & 462.2555 & 515.353 & 0.0223 & 0.165 & 0.0314 & 0.0156 \tabularnewline
52 & 528 & 490.9603 & 458.0571 & 523.8634 & 0.0137 & 0.0679 & 0.0604 & 0.0536 \tabularnewline
53 & 533 & 482.1498 & 444.3023 & 519.9974 & 0.0042 & 0.0088 & 0.0903 & 0.0317 \tabularnewline
54 & 536 & 467.4509 & 424.8862 & 510.0157 & 8e-04 & 0.0013 & 0.1197 & 0.01 \tabularnewline
55 & 537 & 464.2208 & 417.0796 & 511.362 & 0.0012 & 0.0014 & 0.1419 & 0.0127 \tabularnewline
56 & 524 & 443.3191 & 392.0897 & 494.5485 & 0.001 & 2e-04 & 0.1629 & 0.0021 \tabularnewline
57 & 536 & 452.3648 & 397.2465 & 507.4832 & 0.0015 & 0.0054 & 0.181 & 0.0098 \tabularnewline
58 & 587 & 502.31 & 443.5078 & 561.1122 & 0.0024 & 0.1307 & 0.1959 & 0.3005 \tabularnewline
59 & 597 & 508.3446 & 446.0911 & 570.5981 & 0.0026 & 0.0066 & 0.2096 & 0.3806 \tabularnewline
60 & 581 & 492.3477 & 426.7967 & 557.8987 & 0.004 & 9e-04 & 0.2215 & 0.2215 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114641&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[48])[/C][/ROW]
[ROW][C]36[/C][C]542[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]527[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]510[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]514[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]517[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]508[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]493[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]490[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]469[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]478[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]528[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]534[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]518[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]506[/C][C]500.3794[/C][C]484.3941[/C][C]516.3646[/C][C]0.2454[/C][C]0.0154[/C][C]5e-04[/C][C]0.0154[/C][/ROW]
[ROW][C]50[/C][C]502[/C][C]483.2454[/C][C]461.8594[/C][C]504.6314[/C][C]0.0428[/C][C]0.0185[/C][C]0.0071[/C][C]7e-04[/C][/ROW]
[ROW][C]51[/C][C]516[/C][C]488.8042[/C][C]462.2555[/C][C]515.353[/C][C]0.0223[/C][C]0.165[/C][C]0.0314[/C][C]0.0156[/C][/ROW]
[ROW][C]52[/C][C]528[/C][C]490.9603[/C][C]458.0571[/C][C]523.8634[/C][C]0.0137[/C][C]0.0679[/C][C]0.0604[/C][C]0.0536[/C][/ROW]
[ROW][C]53[/C][C]533[/C][C]482.1498[/C][C]444.3023[/C][C]519.9974[/C][C]0.0042[/C][C]0.0088[/C][C]0.0903[/C][C]0.0317[/C][/ROW]
[ROW][C]54[/C][C]536[/C][C]467.4509[/C][C]424.8862[/C][C]510.0157[/C][C]8e-04[/C][C]0.0013[/C][C]0.1197[/C][C]0.01[/C][/ROW]
[ROW][C]55[/C][C]537[/C][C]464.2208[/C][C]417.0796[/C][C]511.362[/C][C]0.0012[/C][C]0.0014[/C][C]0.1419[/C][C]0.0127[/C][/ROW]
[ROW][C]56[/C][C]524[/C][C]443.3191[/C][C]392.0897[/C][C]494.5485[/C][C]0.001[/C][C]2e-04[/C][C]0.1629[/C][C]0.0021[/C][/ROW]
[ROW][C]57[/C][C]536[/C][C]452.3648[/C][C]397.2465[/C][C]507.4832[/C][C]0.0015[/C][C]0.0054[/C][C]0.181[/C][C]0.0098[/C][/ROW]
[ROW][C]58[/C][C]587[/C][C]502.31[/C][C]443.5078[/C][C]561.1122[/C][C]0.0024[/C][C]0.1307[/C][C]0.1959[/C][C]0.3005[/C][/ROW]
[ROW][C]59[/C][C]597[/C][C]508.3446[/C][C]446.0911[/C][C]570.5981[/C][C]0.0026[/C][C]0.0066[/C][C]0.2096[/C][C]0.3806[/C][/ROW]
[ROW][C]60[/C][C]581[/C][C]492.3477[/C][C]426.7967[/C][C]557.8987[/C][C]0.004[/C][C]9e-04[/C][C]0.2215[/C][C]0.2215[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114641&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114641&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[48])
36542-------
37527-------
38510-------
39514-------
40517-------
41508-------
42493-------
43490-------
44469-------
45478-------
46528-------
47534-------
48518-------
49506500.3794484.3941516.36460.24540.01545e-040.0154
50502483.2454461.8594504.63140.04280.01850.00717e-04
51516488.8042462.2555515.3530.02230.1650.03140.0156
52528490.9603458.0571523.86340.01370.06790.06040.0536
53533482.1498444.3023519.99740.00420.00880.09030.0317
54536467.4509424.8862510.01578e-040.00130.11970.01
55537464.2208417.0796511.3620.00120.00140.14190.0127
56524443.3191392.0897494.54850.0012e-040.16290.0021
57536452.3648397.2465507.48320.00150.00540.1810.0098
58587502.31443.5078561.11220.00240.13070.19590.3005
59597508.3446446.0911570.59810.00260.00660.20960.3806
60581492.3477426.7967557.89870.0049e-040.22150.2215







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.01630.0112031.591400
500.02260.03880.025351.7347191.663113.8442
510.02770.05560.0352739.6091374.311719.3471
520.03420.07540.04531371.9431623.719624.9744
530.040.10550.05732585.74031016.123731.8767
540.04650.14660.07224698.97371629.93240.3724
550.05180.15680.08435296.81282153.772246.4088
560.0590.1820.09656509.40822698.226751.9445
570.06220.18490.10636994.8423175.628456.3527
580.05970.16860.11257172.39843575.305459.7939
590.06250.17440.11827859.77643964.802762.9667
600.06790.18010.12337859.22634289.33865.493

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0163 & 0.0112 & 0 & 31.5914 & 0 & 0 \tabularnewline
50 & 0.0226 & 0.0388 & 0.025 & 351.7347 & 191.6631 & 13.8442 \tabularnewline
51 & 0.0277 & 0.0556 & 0.0352 & 739.6091 & 374.3117 & 19.3471 \tabularnewline
52 & 0.0342 & 0.0754 & 0.0453 & 1371.9431 & 623.7196 & 24.9744 \tabularnewline
53 & 0.04 & 0.1055 & 0.0573 & 2585.7403 & 1016.1237 & 31.8767 \tabularnewline
54 & 0.0465 & 0.1466 & 0.0722 & 4698.9737 & 1629.932 & 40.3724 \tabularnewline
55 & 0.0518 & 0.1568 & 0.0843 & 5296.8128 & 2153.7722 & 46.4088 \tabularnewline
56 & 0.059 & 0.182 & 0.0965 & 6509.4082 & 2698.2267 & 51.9445 \tabularnewline
57 & 0.0622 & 0.1849 & 0.1063 & 6994.842 & 3175.6284 & 56.3527 \tabularnewline
58 & 0.0597 & 0.1686 & 0.1125 & 7172.3984 & 3575.3054 & 59.7939 \tabularnewline
59 & 0.0625 & 0.1744 & 0.1182 & 7859.7764 & 3964.8027 & 62.9667 \tabularnewline
60 & 0.0679 & 0.1801 & 0.1233 & 7859.2263 & 4289.338 & 65.493 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114641&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]49[/C][C]0.0163[/C][C]0.0112[/C][C]0[/C][C]31.5914[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0226[/C][C]0.0388[/C][C]0.025[/C][C]351.7347[/C][C]191.6631[/C][C]13.8442[/C][/ROW]
[ROW][C]51[/C][C]0.0277[/C][C]0.0556[/C][C]0.0352[/C][C]739.6091[/C][C]374.3117[/C][C]19.3471[/C][/ROW]
[ROW][C]52[/C][C]0.0342[/C][C]0.0754[/C][C]0.0453[/C][C]1371.9431[/C][C]623.7196[/C][C]24.9744[/C][/ROW]
[ROW][C]53[/C][C]0.04[/C][C]0.1055[/C][C]0.0573[/C][C]2585.7403[/C][C]1016.1237[/C][C]31.8767[/C][/ROW]
[ROW][C]54[/C][C]0.0465[/C][C]0.1466[/C][C]0.0722[/C][C]4698.9737[/C][C]1629.932[/C][C]40.3724[/C][/ROW]
[ROW][C]55[/C][C]0.0518[/C][C]0.1568[/C][C]0.0843[/C][C]5296.8128[/C][C]2153.7722[/C][C]46.4088[/C][/ROW]
[ROW][C]56[/C][C]0.059[/C][C]0.182[/C][C]0.0965[/C][C]6509.4082[/C][C]2698.2267[/C][C]51.9445[/C][/ROW]
[ROW][C]57[/C][C]0.0622[/C][C]0.1849[/C][C]0.1063[/C][C]6994.842[/C][C]3175.6284[/C][C]56.3527[/C][/ROW]
[ROW][C]58[/C][C]0.0597[/C][C]0.1686[/C][C]0.1125[/C][C]7172.3984[/C][C]3575.3054[/C][C]59.7939[/C][/ROW]
[ROW][C]59[/C][C]0.0625[/C][C]0.1744[/C][C]0.1182[/C][C]7859.7764[/C][C]3964.8027[/C][C]62.9667[/C][/ROW]
[ROW][C]60[/C][C]0.0679[/C][C]0.1801[/C][C]0.1233[/C][C]7859.2263[/C][C]4289.338[/C][C]65.493[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114641&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114641&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
490.01630.0112031.591400
500.02260.03880.025351.7347191.663113.8442
510.02770.05560.0352739.6091374.311719.3471
520.03420.07540.04531371.9431623.719624.9744
530.040.10550.05732585.74031016.123731.8767
540.04650.14660.07224698.97371629.93240.3724
550.05180.15680.08435296.81282153.772246.4088
560.0590.1820.09656509.40822698.226751.9445
570.06220.18490.10636994.8423175.628456.3527
580.05970.16860.11257172.39843575.305459.7939
590.06250.17440.11827859.77643964.802762.9667
600.06790.18010.12337859.22634289.33865.493



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