Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 09 Apr 2011 16:22:27 +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/2011/Apr/09/t1302366442qf7b61o6fxtydlh.htm/, Retrieved Wed, 08 May 2024 11:20:37 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=120423, Retrieved Wed, 08 May 2024 11:20:37 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact205
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Badge4u 38MM] [2011-04-09 16:22:27] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
5424
5567
5643
12190
13180
7308
7917
16206
10715
7004
8203
6737
8660
8888
9346
19463
21043
11669
12641
25875
17108
11182
13097
10757
14626
14246
15217
32871
35539
19707
21349
43699
28893
18886
22119
18167
22950
23375
23715
51170
55335
30685
33235
68000
44965
29410
34425
28305




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Herman Ole Andreas Wold' @ www.yougetit.org

\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 & 'Herman Ole Andreas Wold' @ www.yougetit.org \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=120423&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]'Herman Ole Andreas Wold' @ www.yougetit.org[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=120423&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=120423&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'Herman Ole Andreas Wold' @ www.yougetit.org







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[36])
2410757-------
2514626-------
2614246-------
2715217-------
2832871-------
2935539-------
3019707-------
3121349-------
3243699-------
3328893-------
3418886-------
3522119-------
3618167-------
372295023945.579123375.343324529.72554e-04111
382337524701.445924111.716525305.5990111
392371525010.192724411.583925623.48030111
405117053816.173952524.868855139.22540111
415533558187.091556787.416759621.26490111
423068532263.64731485.623333060.89611e-04011
433323534952.399134107.451535818.27871e-04111
446800071547.62569813.757173324.55460111
454496547305.829346156.622848483.64880011
462941030922.124430169.098231693.94621e-04011
473442536216.183635332.095637122.39351e-04111
482830529744.137829016.289230490.24391e-04011

\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[36]) \tabularnewline
24 & 10757 & - & - & - & - & - & - & - \tabularnewline
25 & 14626 & - & - & - & - & - & - & - \tabularnewline
26 & 14246 & - & - & - & - & - & - & - \tabularnewline
27 & 15217 & - & - & - & - & - & - & - \tabularnewline
28 & 32871 & - & - & - & - & - & - & - \tabularnewline
29 & 35539 & - & - & - & - & - & - & - \tabularnewline
30 & 19707 & - & - & - & - & - & - & - \tabularnewline
31 & 21349 & - & - & - & - & - & - & - \tabularnewline
32 & 43699 & - & - & - & - & - & - & - \tabularnewline
33 & 28893 & - & - & - & - & - & - & - \tabularnewline
34 & 18886 & - & - & - & - & - & - & - \tabularnewline
35 & 22119 & - & - & - & - & - & - & - \tabularnewline
36 & 18167 & - & - & - & - & - & - & - \tabularnewline
37 & 22950 & 23945.5791 & 23375.3433 & 24529.7255 & 4e-04 & 1 & 1 & 1 \tabularnewline
38 & 23375 & 24701.4459 & 24111.7165 & 25305.599 & 0 & 1 & 1 & 1 \tabularnewline
39 & 23715 & 25010.1927 & 24411.5839 & 25623.4803 & 0 & 1 & 1 & 1 \tabularnewline
40 & 51170 & 53816.1739 & 52524.8688 & 55139.2254 & 0 & 1 & 1 & 1 \tabularnewline
41 & 55335 & 58187.0915 & 56787.4167 & 59621.2649 & 0 & 1 & 1 & 1 \tabularnewline
42 & 30685 & 32263.647 & 31485.6233 & 33060.8961 & 1e-04 & 0 & 1 & 1 \tabularnewline
43 & 33235 & 34952.3991 & 34107.4515 & 35818.2787 & 1e-04 & 1 & 1 & 1 \tabularnewline
44 & 68000 & 71547.625 & 69813.7571 & 73324.5546 & 0 & 1 & 1 & 1 \tabularnewline
45 & 44965 & 47305.8293 & 46156.6228 & 48483.6488 & 0 & 0 & 1 & 1 \tabularnewline
46 & 29410 & 30922.1244 & 30169.0982 & 31693.9462 & 1e-04 & 0 & 1 & 1 \tabularnewline
47 & 34425 & 36216.1836 & 35332.0956 & 37122.3935 & 1e-04 & 1 & 1 & 1 \tabularnewline
48 & 28305 & 29744.1378 & 29016.2892 & 30490.2439 & 1e-04 & 0 & 1 & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=120423&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[36])[/C][/ROW]
[ROW][C]24[/C][C]10757[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]14626[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]26[/C][C]14246[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]27[/C][C]15217[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]32871[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]35539[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]19707[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]21349[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]43699[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]28893[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]18886[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]22119[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]18167[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]22950[/C][C]23945.5791[/C][C]23375.3433[/C][C]24529.7255[/C][C]4e-04[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]38[/C][C]23375[/C][C]24701.4459[/C][C]24111.7165[/C][C]25305.599[/C][C]0[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]39[/C][C]23715[/C][C]25010.1927[/C][C]24411.5839[/C][C]25623.4803[/C][C]0[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]40[/C][C]51170[/C][C]53816.1739[/C][C]52524.8688[/C][C]55139.2254[/C][C]0[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]41[/C][C]55335[/C][C]58187.0915[/C][C]56787.4167[/C][C]59621.2649[/C][C]0[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]42[/C][C]30685[/C][C]32263.647[/C][C]31485.6233[/C][C]33060.8961[/C][C]1e-04[/C][C]0[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]43[/C][C]33235[/C][C]34952.3991[/C][C]34107.4515[/C][C]35818.2787[/C][C]1e-04[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]44[/C][C]68000[/C][C]71547.625[/C][C]69813.7571[/C][C]73324.5546[/C][C]0[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]45[/C][C]44965[/C][C]47305.8293[/C][C]46156.6228[/C][C]48483.6488[/C][C]0[/C][C]0[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]46[/C][C]29410[/C][C]30922.1244[/C][C]30169.0982[/C][C]31693.9462[/C][C]1e-04[/C][C]0[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]47[/C][C]34425[/C][C]36216.1836[/C][C]35332.0956[/C][C]37122.3935[/C][C]1e-04[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]48[/C][C]28305[/C][C]29744.1378[/C][C]29016.2892[/C][C]30490.2439[/C][C]1e-04[/C][C]0[/C][C]1[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=120423&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=120423&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[36])
2410757-------
2514626-------
2614246-------
2715217-------
2832871-------
2935539-------
3019707-------
3121349-------
3243699-------
3328893-------
3418886-------
3522119-------
3618167-------
372295023945.579123375.343324529.72554e-04111
382337524701.445924111.716525305.5990111
392371525010.192724411.583925623.48030111
405117053816.173952524.868855139.22540111
415533558187.091556787.416759621.26490111
423068532263.64731485.623333060.89611e-04011
433323534952.399134107.451535818.27871e-04111
446800071547.62569813.757173324.55460111
454496547305.829346156.622848483.64880011
462941030922.124430169.098231693.94621e-04011
473442536216.183635332.095637122.39351e-04111
482830529744.137829016.289230490.24391e-04011







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
370.0124-0.04160991177.679500
380.0125-0.05370.04761759458.64451375318.1621172.7396
390.0125-0.05180.0491677524.17581476053.49991214.9294
400.0125-0.04920.04917002236.5112857599.25271690.4435
410.0126-0.0490.0498134425.66943912964.5361978.1215
420.0126-0.04890.0492492126.48993676158.1951917.331
430.0126-0.04910.0492949459.79083572344.13731890.0646
440.0127-0.04960.049112585643.37584699006.54212167.7192
450.0127-0.04950.04925479482.02954785726.04072187.6302
460.0127-0.04890.04912286520.15334535805.45192129.743
470.0128-0.04950.04923208338.74274415126.66022101.2203
480.0128-0.04840.04912071117.6014219792.57192054.2134

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
37 & 0.0124 & -0.0416 & 0 & 991177.6795 & 0 & 0 \tabularnewline
38 & 0.0125 & -0.0537 & 0.0476 & 1759458.6445 & 1375318.162 & 1172.7396 \tabularnewline
39 & 0.0125 & -0.0518 & 0.049 & 1677524.1758 & 1476053.4999 & 1214.9294 \tabularnewline
40 & 0.0125 & -0.0492 & 0.0491 & 7002236.511 & 2857599.2527 & 1690.4435 \tabularnewline
41 & 0.0126 & -0.049 & 0.049 & 8134425.6694 & 3912964.536 & 1978.1215 \tabularnewline
42 & 0.0126 & -0.0489 & 0.049 & 2492126.4899 & 3676158.195 & 1917.331 \tabularnewline
43 & 0.0126 & -0.0491 & 0.049 & 2949459.7908 & 3572344.1373 & 1890.0646 \tabularnewline
44 & 0.0127 & -0.0496 & 0.0491 & 12585643.3758 & 4699006.5421 & 2167.7192 \tabularnewline
45 & 0.0127 & -0.0495 & 0.0492 & 5479482.0295 & 4785726.0407 & 2187.6302 \tabularnewline
46 & 0.0127 & -0.0489 & 0.0491 & 2286520.1533 & 4535805.4519 & 2129.743 \tabularnewline
47 & 0.0128 & -0.0495 & 0.0492 & 3208338.7427 & 4415126.6602 & 2101.2203 \tabularnewline
48 & 0.0128 & -0.0484 & 0.0491 & 2071117.601 & 4219792.5719 & 2054.2134 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=120423&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]37[/C][C]0.0124[/C][C]-0.0416[/C][C]0[/C][C]991177.6795[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]38[/C][C]0.0125[/C][C]-0.0537[/C][C]0.0476[/C][C]1759458.6445[/C][C]1375318.162[/C][C]1172.7396[/C][/ROW]
[ROW][C]39[/C][C]0.0125[/C][C]-0.0518[/C][C]0.049[/C][C]1677524.1758[/C][C]1476053.4999[/C][C]1214.9294[/C][/ROW]
[ROW][C]40[/C][C]0.0125[/C][C]-0.0492[/C][C]0.0491[/C][C]7002236.511[/C][C]2857599.2527[/C][C]1690.4435[/C][/ROW]
[ROW][C]41[/C][C]0.0126[/C][C]-0.049[/C][C]0.049[/C][C]8134425.6694[/C][C]3912964.536[/C][C]1978.1215[/C][/ROW]
[ROW][C]42[/C][C]0.0126[/C][C]-0.0489[/C][C]0.049[/C][C]2492126.4899[/C][C]3676158.195[/C][C]1917.331[/C][/ROW]
[ROW][C]43[/C][C]0.0126[/C][C]-0.0491[/C][C]0.049[/C][C]2949459.7908[/C][C]3572344.1373[/C][C]1890.0646[/C][/ROW]
[ROW][C]44[/C][C]0.0127[/C][C]-0.0496[/C][C]0.0491[/C][C]12585643.3758[/C][C]4699006.5421[/C][C]2167.7192[/C][/ROW]
[ROW][C]45[/C][C]0.0127[/C][C]-0.0495[/C][C]0.0492[/C][C]5479482.0295[/C][C]4785726.0407[/C][C]2187.6302[/C][/ROW]
[ROW][C]46[/C][C]0.0127[/C][C]-0.0489[/C][C]0.0491[/C][C]2286520.1533[/C][C]4535805.4519[/C][C]2129.743[/C][/ROW]
[ROW][C]47[/C][C]0.0128[/C][C]-0.0495[/C][C]0.0492[/C][C]3208338.7427[/C][C]4415126.6602[/C][C]2101.2203[/C][/ROW]
[ROW][C]48[/C][C]0.0128[/C][C]-0.0484[/C][C]0.0491[/C][C]2071117.601[/C][C]4219792.5719[/C][C]2054.2134[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=120423&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=120423&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
370.0124-0.04160991177.679500
380.0125-0.05370.04761759458.64451375318.1621172.7396
390.0125-0.05180.0491677524.17581476053.49991214.9294
400.0125-0.04920.04917002236.5112857599.25271690.4435
410.0126-0.0490.0498134425.66943912964.5361978.1215
420.0126-0.04890.0492492126.48993676158.1951917.331
430.0126-0.04910.0492949459.79083572344.13731890.0646
440.0127-0.04960.049112585643.37584699006.54212167.7192
450.0127-0.04950.04925479482.02954785726.04072187.6302
460.0127-0.04890.04912286520.15334535805.45192129.743
470.0128-0.04950.04923208338.74274415126.66022101.2203
480.0128-0.04840.04912071117.6014219792.57192054.2134



Parameters (Session):
par1 = 48 ; par2 = 0.0 ; par3 = 0 ; par4 = 0 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ;
Parameters (R input):
par1 = 12 ; par2 = 0.0 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 2 ; 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')