Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 23 Dec 2008 17:23:24 -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/24/t12300782398q71208zhyb2xz0.htm/, Retrieved Sun, 19 May 2024 08:48:51 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36429, Retrieved Sun, 19 May 2024 08:48:51 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact215
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [ARIMA backward se...] [2008-12-23 23:50:47] [a93e1996f687b149ef667064c2d7b9ef]
- RMP     [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-24 00:23:24] [af8fa2ce3787e7eb62013778260b011d] [Current]
Feedback Forum

Post a new message
Dataseries X:
467
460
448
443
436
431
484
510
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




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36429&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[48])
36555-------
37562-------
38561-------
39555-------
40544-------
41537-------
42543-------
43594-------
44611-------
45613-------
46611-------
47594-------
48595-------
49591601.0863590.8055611.36710.02720.87710.877
50589599.6105585.0713614.14980.07630.877110.7329
51584593.5915575.7847611.39840.14550.693410.4384
52573588.2634567.7018608.8250.07280.657810.2604
53567581.2444558.2559604.2330.11230.75890.99990.1204
54569584.9603559.7776610.1430.10710.91890.99950.2173
55621645.7627618.5622672.96310.037210.99990.9999
56629655.7963626.7178684.87470.03540.99050.99871
57628654.0656623.2232684.9080.04880.94440.99550.9999
58612645.9179613.4072678.42860.02040.860.98240.9989
59595631.6399597.5423665.73740.01760.87050.98480.9824
60597636.8843601.2706672.4980.01410.98940.98940.9894

\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 & 555 & - & - & - & - & - & - & - \tabularnewline
37 & 562 & - & - & - & - & - & - & - \tabularnewline
38 & 561 & - & - & - & - & - & - & - \tabularnewline
39 & 555 & - & - & - & - & - & - & - \tabularnewline
40 & 544 & - & - & - & - & - & - & - \tabularnewline
41 & 537 & - & - & - & - & - & - & - \tabularnewline
42 & 543 & - & - & - & - & - & - & - \tabularnewline
43 & 594 & - & - & - & - & - & - & - \tabularnewline
44 & 611 & - & - & - & - & - & - & - \tabularnewline
45 & 613 & - & - & - & - & - & - & - \tabularnewline
46 & 611 & - & - & - & - & - & - & - \tabularnewline
47 & 594 & - & - & - & - & - & - & - \tabularnewline
48 & 595 & - & - & - & - & - & - & - \tabularnewline
49 & 591 & 601.0863 & 590.8055 & 611.3671 & 0.0272 & 0.877 & 1 & 0.877 \tabularnewline
50 & 589 & 599.6105 & 585.0713 & 614.1498 & 0.0763 & 0.8771 & 1 & 0.7329 \tabularnewline
51 & 584 & 593.5915 & 575.7847 & 611.3984 & 0.1455 & 0.6934 & 1 & 0.4384 \tabularnewline
52 & 573 & 588.2634 & 567.7018 & 608.825 & 0.0728 & 0.6578 & 1 & 0.2604 \tabularnewline
53 & 567 & 581.2444 & 558.2559 & 604.233 & 0.1123 & 0.7589 & 0.9999 & 0.1204 \tabularnewline
54 & 569 & 584.9603 & 559.7776 & 610.143 & 0.1071 & 0.9189 & 0.9995 & 0.2173 \tabularnewline
55 & 621 & 645.7627 & 618.5622 & 672.9631 & 0.0372 & 1 & 0.9999 & 0.9999 \tabularnewline
56 & 629 & 655.7963 & 626.7178 & 684.8747 & 0.0354 & 0.9905 & 0.9987 & 1 \tabularnewline
57 & 628 & 654.0656 & 623.2232 & 684.908 & 0.0488 & 0.9444 & 0.9955 & 0.9999 \tabularnewline
58 & 612 & 645.9179 & 613.4072 & 678.4286 & 0.0204 & 0.86 & 0.9824 & 0.9989 \tabularnewline
59 & 595 & 631.6399 & 597.5423 & 665.7374 & 0.0176 & 0.8705 & 0.9848 & 0.9824 \tabularnewline
60 & 597 & 636.8843 & 601.2706 & 672.498 & 0.0141 & 0.9894 & 0.9894 & 0.9894 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36429&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]555[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]562[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]561[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]555[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]544[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]537[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]543[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]611[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]613[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]611[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]595[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]591[/C][C]601.0863[/C][C]590.8055[/C][C]611.3671[/C][C]0.0272[/C][C]0.877[/C][C]1[/C][C]0.877[/C][/ROW]
[ROW][C]50[/C][C]589[/C][C]599.6105[/C][C]585.0713[/C][C]614.1498[/C][C]0.0763[/C][C]0.8771[/C][C]1[/C][C]0.7329[/C][/ROW]
[ROW][C]51[/C][C]584[/C][C]593.5915[/C][C]575.7847[/C][C]611.3984[/C][C]0.1455[/C][C]0.6934[/C][C]1[/C][C]0.4384[/C][/ROW]
[ROW][C]52[/C][C]573[/C][C]588.2634[/C][C]567.7018[/C][C]608.825[/C][C]0.0728[/C][C]0.6578[/C][C]1[/C][C]0.2604[/C][/ROW]
[ROW][C]53[/C][C]567[/C][C]581.2444[/C][C]558.2559[/C][C]604.233[/C][C]0.1123[/C][C]0.7589[/C][C]0.9999[/C][C]0.1204[/C][/ROW]
[ROW][C]54[/C][C]569[/C][C]584.9603[/C][C]559.7776[/C][C]610.143[/C][C]0.1071[/C][C]0.9189[/C][C]0.9995[/C][C]0.2173[/C][/ROW]
[ROW][C]55[/C][C]621[/C][C]645.7627[/C][C]618.5622[/C][C]672.9631[/C][C]0.0372[/C][C]1[/C][C]0.9999[/C][C]0.9999[/C][/ROW]
[ROW][C]56[/C][C]629[/C][C]655.7963[/C][C]626.7178[/C][C]684.8747[/C][C]0.0354[/C][C]0.9905[/C][C]0.9987[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]628[/C][C]654.0656[/C][C]623.2232[/C][C]684.908[/C][C]0.0488[/C][C]0.9444[/C][C]0.9955[/C][C]0.9999[/C][/ROW]
[ROW][C]58[/C][C]612[/C][C]645.9179[/C][C]613.4072[/C][C]678.4286[/C][C]0.0204[/C][C]0.86[/C][C]0.9824[/C][C]0.9989[/C][/ROW]
[ROW][C]59[/C][C]595[/C][C]631.6399[/C][C]597.5423[/C][C]665.7374[/C][C]0.0176[/C][C]0.8705[/C][C]0.9848[/C][C]0.9824[/C][/ROW]
[ROW][C]60[/C][C]597[/C][C]636.8843[/C][C]601.2706[/C][C]672.498[/C][C]0.0141[/C][C]0.9894[/C][C]0.9894[/C][C]0.9894[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36429&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36429&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])
36555-------
37562-------
38561-------
39555-------
40544-------
41537-------
42543-------
43594-------
44611-------
45613-------
46611-------
47594-------
48595-------
49591601.0863590.8055611.36710.02720.87710.877
50589599.6105585.0713614.14980.07630.877110.7329
51584593.5915575.7847611.39840.14550.693410.4384
52573588.2634567.7018608.8250.07280.657810.2604
53567581.2444558.2559604.2330.11230.75890.99990.1204
54569584.9603559.7776610.1430.10710.91890.99950.2173
55621645.7627618.5622672.96310.037210.99990.9999
56629655.7963626.7178684.87470.03540.99050.99871
57628654.0656623.2232684.9080.04880.94440.99550.9999
58612645.9179613.4072678.42860.02040.860.98240.9989
59595631.6399597.5423665.73740.01760.87050.98480.9824
60597636.8843601.2706672.4980.01410.98940.98940.9894







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0087-0.01680.0014101.73448.47792.9117
500.0124-0.01770.0015112.58319.38193.063
510.0153-0.01620.001391.99737.66642.7688
520.0178-0.02590.0022232.972519.41444.4062
530.0202-0.02450.002202.90416.90874.112
540.022-0.02730.0023254.731221.22764.6073
550.0215-0.03830.0032613.189451.09917.1484
560.0226-0.04090.0034718.039459.83667.7354
570.0241-0.03990.0033679.417856.61817.5245
580.0257-0.05250.00441150.424195.86879.7913
590.0275-0.0580.00481342.48111.873310.577
600.0285-0.06260.00521590.7578132.563211.5136

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0087 & -0.0168 & 0.0014 & 101.7344 & 8.4779 & 2.9117 \tabularnewline
50 & 0.0124 & -0.0177 & 0.0015 & 112.5831 & 9.3819 & 3.063 \tabularnewline
51 & 0.0153 & -0.0162 & 0.0013 & 91.9973 & 7.6664 & 2.7688 \tabularnewline
52 & 0.0178 & -0.0259 & 0.0022 & 232.9725 & 19.4144 & 4.4062 \tabularnewline
53 & 0.0202 & -0.0245 & 0.002 & 202.904 & 16.9087 & 4.112 \tabularnewline
54 & 0.022 & -0.0273 & 0.0023 & 254.7312 & 21.2276 & 4.6073 \tabularnewline
55 & 0.0215 & -0.0383 & 0.0032 & 613.1894 & 51.0991 & 7.1484 \tabularnewline
56 & 0.0226 & -0.0409 & 0.0034 & 718.0394 & 59.8366 & 7.7354 \tabularnewline
57 & 0.0241 & -0.0399 & 0.0033 & 679.4178 & 56.6181 & 7.5245 \tabularnewline
58 & 0.0257 & -0.0525 & 0.0044 & 1150.4241 & 95.8687 & 9.7913 \tabularnewline
59 & 0.0275 & -0.058 & 0.0048 & 1342.48 & 111.8733 & 10.577 \tabularnewline
60 & 0.0285 & -0.0626 & 0.0052 & 1590.7578 & 132.5632 & 11.5136 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36429&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.0087[/C][C]-0.0168[/C][C]0.0014[/C][C]101.7344[/C][C]8.4779[/C][C]2.9117[/C][/ROW]
[ROW][C]50[/C][C]0.0124[/C][C]-0.0177[/C][C]0.0015[/C][C]112.5831[/C][C]9.3819[/C][C]3.063[/C][/ROW]
[ROW][C]51[/C][C]0.0153[/C][C]-0.0162[/C][C]0.0013[/C][C]91.9973[/C][C]7.6664[/C][C]2.7688[/C][/ROW]
[ROW][C]52[/C][C]0.0178[/C][C]-0.0259[/C][C]0.0022[/C][C]232.9725[/C][C]19.4144[/C][C]4.4062[/C][/ROW]
[ROW][C]53[/C][C]0.0202[/C][C]-0.0245[/C][C]0.002[/C][C]202.904[/C][C]16.9087[/C][C]4.112[/C][/ROW]
[ROW][C]54[/C][C]0.022[/C][C]-0.0273[/C][C]0.0023[/C][C]254.7312[/C][C]21.2276[/C][C]4.6073[/C][/ROW]
[ROW][C]55[/C][C]0.0215[/C][C]-0.0383[/C][C]0.0032[/C][C]613.1894[/C][C]51.0991[/C][C]7.1484[/C][/ROW]
[ROW][C]56[/C][C]0.0226[/C][C]-0.0409[/C][C]0.0034[/C][C]718.0394[/C][C]59.8366[/C][C]7.7354[/C][/ROW]
[ROW][C]57[/C][C]0.0241[/C][C]-0.0399[/C][C]0.0033[/C][C]679.4178[/C][C]56.6181[/C][C]7.5245[/C][/ROW]
[ROW][C]58[/C][C]0.0257[/C][C]-0.0525[/C][C]0.0044[/C][C]1150.4241[/C][C]95.8687[/C][C]9.7913[/C][/ROW]
[ROW][C]59[/C][C]0.0275[/C][C]-0.058[/C][C]0.0048[/C][C]1342.48[/C][C]111.8733[/C][C]10.577[/C][/ROW]
[ROW][C]60[/C][C]0.0285[/C][C]-0.0626[/C][C]0.0052[/C][C]1590.7578[/C][C]132.5632[/C][C]11.5136[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36429&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36429&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.0087-0.01680.0014101.73448.47792.9117
500.0124-0.01770.0015112.58319.38193.063
510.0153-0.01620.001391.99737.66642.7688
520.0178-0.02590.0022232.972519.41444.4062
530.0202-0.02450.002202.90416.90874.112
540.022-0.02730.0023254.731221.22764.6073
550.0215-0.03830.0032613.189451.09917.1484
560.0226-0.04090.0034718.039459.83667.7354
570.0241-0.03990.0033679.417856.61817.5245
580.0257-0.05250.00441150.424195.86879.7913
590.0275-0.0580.00481342.48111.873310.577
600.0285-0.06260.00521590.7578132.563211.5136



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