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 computationSun, 14 Dec 2008 03:55:51 -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/2008/Dec/14/t1229252189cghfcrqehv1de2y.htm/, Retrieved Thu, 23 May 2024 07:36:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33278, Retrieved Thu, 23 May 2024 07:36:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact217
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Taak 11 ARIMA For...] [2008-12-09 19:00:10] [819b576fab25b35cfda70f80599828ec]
-   P   [ARIMA Forecasting] [Paper Hoofdstuk 4...] [2008-12-13 16:02:49] [6fea0e9a9b3b29a63badf2c274e82506]
-   PD      [ARIMA Forecasting] [Paper, hoofdstuk ...] [2008-12-14 10:55:51] [3bb0537fcae9c337e49b9ce75ff3d4da] [Current]
Feedback Forum

Post a new message
Dataseries X:
493.000
481.000
462.000
457.000
442.000
439.000
488.000
521.000
501.000
485.000
464.000
460.000
467.000
460.000
448.000
443.000
436.000
431.000
484.000
510.000
513.000
503.000
471.000
471.000
476.000
475.000
470.000
461.000
455.000
456.000
517.000
525.000
523.000
519.000
509.000
512.000
519.000
517.000
510.000
509.000
501.000
507.000
569.000
580.000
578.000
565.000
547.000
555.000
562.000
561.000
555.000
544.000
537.000
543.000
594.000
611.000
613.000
611.000
594.000
595.000




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=33278&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=33278&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33278&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[48])
36512-------
37519-------
38517-------
39510-------
40509-------
41501-------
42507-------
43569-------
44580-------
45578-------
46565-------
47547-------
48555-------
49562561.6674546.2435577.09120.48310.801610.8016
50561559.5728537.7606581.38510.4490.41370.99990.6594
51555552.6259525.9116579.34020.43090.26950.99910.4309
52544550.1336519.2867580.98050.34840.37860.99550.3786
53537542.4376507.9498576.92550.37860.46460.99070.2376
54543547.1545509.3751584.9340.41470.70080.98140.342
55594608.5658567.7593649.37220.24210.99920.97130.995
56611619.7804576.1565663.40420.34660.87660.96310.9982
57613617.7981571.528664.06820.41950.61330.95410.9961
58611606.3603557.5873655.13330.4260.39480.95180.9805
59594589.1689538.0154640.32240.42660.20140.94690.9048
60595595.9638542.5357649.39180.48590.52870.93350.9335

\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 & 512 & - & - & - & - & - & - & - \tabularnewline
37 & 519 & - & - & - & - & - & - & - \tabularnewline
38 & 517 & - & - & - & - & - & - & - \tabularnewline
39 & 510 & - & - & - & - & - & - & - \tabularnewline
40 & 509 & - & - & - & - & - & - & - \tabularnewline
41 & 501 & - & - & - & - & - & - & - \tabularnewline
42 & 507 & - & - & - & - & - & - & - \tabularnewline
43 & 569 & - & - & - & - & - & - & - \tabularnewline
44 & 580 & - & - & - & - & - & - & - \tabularnewline
45 & 578 & - & - & - & - & - & - & - \tabularnewline
46 & 565 & - & - & - & - & - & - & - \tabularnewline
47 & 547 & - & - & - & - & - & - & - \tabularnewline
48 & 555 & - & - & - & - & - & - & - \tabularnewline
49 & 562 & 561.6674 & 546.2435 & 577.0912 & 0.4831 & 0.8016 & 1 & 0.8016 \tabularnewline
50 & 561 & 559.5728 & 537.7606 & 581.3851 & 0.449 & 0.4137 & 0.9999 & 0.6594 \tabularnewline
51 & 555 & 552.6259 & 525.9116 & 579.3402 & 0.4309 & 0.2695 & 0.9991 & 0.4309 \tabularnewline
52 & 544 & 550.1336 & 519.2867 & 580.9805 & 0.3484 & 0.3786 & 0.9955 & 0.3786 \tabularnewline
53 & 537 & 542.4376 & 507.9498 & 576.9255 & 0.3786 & 0.4646 & 0.9907 & 0.2376 \tabularnewline
54 & 543 & 547.1545 & 509.3751 & 584.934 & 0.4147 & 0.7008 & 0.9814 & 0.342 \tabularnewline
55 & 594 & 608.5658 & 567.7593 & 649.3722 & 0.2421 & 0.9992 & 0.9713 & 0.995 \tabularnewline
56 & 611 & 619.7804 & 576.1565 & 663.4042 & 0.3466 & 0.8766 & 0.9631 & 0.9982 \tabularnewline
57 & 613 & 617.7981 & 571.528 & 664.0682 & 0.4195 & 0.6133 & 0.9541 & 0.9961 \tabularnewline
58 & 611 & 606.3603 & 557.5873 & 655.1333 & 0.426 & 0.3948 & 0.9518 & 0.9805 \tabularnewline
59 & 594 & 589.1689 & 538.0154 & 640.3224 & 0.4266 & 0.2014 & 0.9469 & 0.9048 \tabularnewline
60 & 595 & 595.9638 & 542.5357 & 649.3918 & 0.4859 & 0.5287 & 0.9335 & 0.9335 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33278&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]512[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]519[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]517[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]510[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]509[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]501[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]507[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]569[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]580[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]578[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]565[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]547[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]555[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]562[/C][C]561.6674[/C][C]546.2435[/C][C]577.0912[/C][C]0.4831[/C][C]0.8016[/C][C]1[/C][C]0.8016[/C][/ROW]
[ROW][C]50[/C][C]561[/C][C]559.5728[/C][C]537.7606[/C][C]581.3851[/C][C]0.449[/C][C]0.4137[/C][C]0.9999[/C][C]0.6594[/C][/ROW]
[ROW][C]51[/C][C]555[/C][C]552.6259[/C][C]525.9116[/C][C]579.3402[/C][C]0.4309[/C][C]0.2695[/C][C]0.9991[/C][C]0.4309[/C][/ROW]
[ROW][C]52[/C][C]544[/C][C]550.1336[/C][C]519.2867[/C][C]580.9805[/C][C]0.3484[/C][C]0.3786[/C][C]0.9955[/C][C]0.3786[/C][/ROW]
[ROW][C]53[/C][C]537[/C][C]542.4376[/C][C]507.9498[/C][C]576.9255[/C][C]0.3786[/C][C]0.4646[/C][C]0.9907[/C][C]0.2376[/C][/ROW]
[ROW][C]54[/C][C]543[/C][C]547.1545[/C][C]509.3751[/C][C]584.934[/C][C]0.4147[/C][C]0.7008[/C][C]0.9814[/C][C]0.342[/C][/ROW]
[ROW][C]55[/C][C]594[/C][C]608.5658[/C][C]567.7593[/C][C]649.3722[/C][C]0.2421[/C][C]0.9992[/C][C]0.9713[/C][C]0.995[/C][/ROW]
[ROW][C]56[/C][C]611[/C][C]619.7804[/C][C]576.1565[/C][C]663.4042[/C][C]0.3466[/C][C]0.8766[/C][C]0.9631[/C][C]0.9982[/C][/ROW]
[ROW][C]57[/C][C]613[/C][C]617.7981[/C][C]571.528[/C][C]664.0682[/C][C]0.4195[/C][C]0.6133[/C][C]0.9541[/C][C]0.9961[/C][/ROW]
[ROW][C]58[/C][C]611[/C][C]606.3603[/C][C]557.5873[/C][C]655.1333[/C][C]0.426[/C][C]0.3948[/C][C]0.9518[/C][C]0.9805[/C][/ROW]
[ROW][C]59[/C][C]594[/C][C]589.1689[/C][C]538.0154[/C][C]640.3224[/C][C]0.4266[/C][C]0.2014[/C][C]0.9469[/C][C]0.9048[/C][/ROW]
[ROW][C]60[/C][C]595[/C][C]595.9638[/C][C]542.5357[/C][C]649.3918[/C][C]0.4859[/C][C]0.5287[/C][C]0.9335[/C][C]0.9335[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33278&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33278&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])
36512-------
37519-------
38517-------
39510-------
40509-------
41501-------
42507-------
43569-------
44580-------
45578-------
46565-------
47547-------
48555-------
49562561.6674546.2435577.09120.48310.801610.8016
50561559.5728537.7606581.38510.4490.41370.99990.6594
51555552.6259525.9116579.34020.43090.26950.99910.4309
52544550.1336519.2867580.98050.34840.37860.99550.3786
53537542.4376507.9498576.92550.37860.46460.99070.2376
54543547.1545509.3751584.9340.41470.70080.98140.342
55594608.5658567.7593649.37220.24210.99920.97130.995
56611619.7804576.1565663.40420.34660.87660.96310.9982
57613617.7981571.528664.06820.41950.61330.95410.9961
58611606.3603557.5873655.13330.4260.39480.95180.9805
59594589.1689538.0154640.32240.42660.20140.94690.9048
60595595.9638542.5357649.39180.48590.52870.93350.9335







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0146e-0400.11060.00920.096
500.01990.00262e-042.03680.16970.412
510.02470.00434e-045.63620.46970.6853
520.0286-0.01119e-0437.62133.13511.7706
530.0324-0.018e-0429.5682.4641.5697
540.0352-0.00766e-0417.26011.43831.1993
550.0342-0.02390.002212.161317.68014.2048
560.0359-0.01420.001277.09466.42452.5347
570.0382-0.00786e-0423.0221.91851.3851
580.0410.00776e-0421.52681.79391.3394
590.04430.00827e-0423.33961.9451.3946
600.0457-0.00161e-040.92880.07740.2782

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.014 & 6e-04 & 0 & 0.1106 & 0.0092 & 0.096 \tabularnewline
50 & 0.0199 & 0.0026 & 2e-04 & 2.0368 & 0.1697 & 0.412 \tabularnewline
51 & 0.0247 & 0.0043 & 4e-04 & 5.6362 & 0.4697 & 0.6853 \tabularnewline
52 & 0.0286 & -0.0111 & 9e-04 & 37.6213 & 3.1351 & 1.7706 \tabularnewline
53 & 0.0324 & -0.01 & 8e-04 & 29.568 & 2.464 & 1.5697 \tabularnewline
54 & 0.0352 & -0.0076 & 6e-04 & 17.2601 & 1.4383 & 1.1993 \tabularnewline
55 & 0.0342 & -0.0239 & 0.002 & 212.1613 & 17.6801 & 4.2048 \tabularnewline
56 & 0.0359 & -0.0142 & 0.0012 & 77.0946 & 6.4245 & 2.5347 \tabularnewline
57 & 0.0382 & -0.0078 & 6e-04 & 23.022 & 1.9185 & 1.3851 \tabularnewline
58 & 0.041 & 0.0077 & 6e-04 & 21.5268 & 1.7939 & 1.3394 \tabularnewline
59 & 0.0443 & 0.0082 & 7e-04 & 23.3396 & 1.945 & 1.3946 \tabularnewline
60 & 0.0457 & -0.0016 & 1e-04 & 0.9288 & 0.0774 & 0.2782 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33278&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.014[/C][C]6e-04[/C][C]0[/C][C]0.1106[/C][C]0.0092[/C][C]0.096[/C][/ROW]
[ROW][C]50[/C][C]0.0199[/C][C]0.0026[/C][C]2e-04[/C][C]2.0368[/C][C]0.1697[/C][C]0.412[/C][/ROW]
[ROW][C]51[/C][C]0.0247[/C][C]0.0043[/C][C]4e-04[/C][C]5.6362[/C][C]0.4697[/C][C]0.6853[/C][/ROW]
[ROW][C]52[/C][C]0.0286[/C][C]-0.0111[/C][C]9e-04[/C][C]37.6213[/C][C]3.1351[/C][C]1.7706[/C][/ROW]
[ROW][C]53[/C][C]0.0324[/C][C]-0.01[/C][C]8e-04[/C][C]29.568[/C][C]2.464[/C][C]1.5697[/C][/ROW]
[ROW][C]54[/C][C]0.0352[/C][C]-0.0076[/C][C]6e-04[/C][C]17.2601[/C][C]1.4383[/C][C]1.1993[/C][/ROW]
[ROW][C]55[/C][C]0.0342[/C][C]-0.0239[/C][C]0.002[/C][C]212.1613[/C][C]17.6801[/C][C]4.2048[/C][/ROW]
[ROW][C]56[/C][C]0.0359[/C][C]-0.0142[/C][C]0.0012[/C][C]77.0946[/C][C]6.4245[/C][C]2.5347[/C][/ROW]
[ROW][C]57[/C][C]0.0382[/C][C]-0.0078[/C][C]6e-04[/C][C]23.022[/C][C]1.9185[/C][C]1.3851[/C][/ROW]
[ROW][C]58[/C][C]0.041[/C][C]0.0077[/C][C]6e-04[/C][C]21.5268[/C][C]1.7939[/C][C]1.3394[/C][/ROW]
[ROW][C]59[/C][C]0.0443[/C][C]0.0082[/C][C]7e-04[/C][C]23.3396[/C][C]1.945[/C][C]1.3946[/C][/ROW]
[ROW][C]60[/C][C]0.0457[/C][C]-0.0016[/C][C]1e-04[/C][C]0.9288[/C][C]0.0774[/C][C]0.2782[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33278&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33278&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.0146e-0400.11060.00920.096
500.01990.00262e-042.03680.16970.412
510.02470.00434e-045.63620.46970.6853
520.0286-0.01119e-0437.62133.13511.7706
530.0324-0.018e-0429.5682.4641.5697
540.0352-0.00766e-0417.26011.43831.1993
550.0342-0.02390.002212.161317.68014.2048
560.0359-0.01420.001277.09466.42452.5347
570.0382-0.00786e-0423.0221.91851.3851
580.0410.00776e-0421.52681.79391.3394
590.04430.00827e-0423.33961.9451.3946
600.0457-0.00161e-040.92880.07740.2782



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