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, 18 Dec 2008 09:37:07 -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/18/t1229618362k54p3s21wk4yzio.htm/, Retrieved Sat, 11 May 2024 08:38:08 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34883, Retrieved Sat, 11 May 2024 08:38:08 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact142
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Arima forecasting...] [2008-12-18 16:22:35] [4ddbf81f78ea7c738951638c7e93f6ee]
-   PD    [ARIMA Forecasting] [Arima forecasting...] [2008-12-18 16:37:07] [e8f764b122b426f433a1e1038b457077] [Current]
-   PD      [ARIMA Forecasting] [Arima forecasting...] [2008-12-18 16:45:58] [4ddbf81f78ea7c738951638c7e93f6ee]
Feedback Forum

Post a new message
Dataseries X:
9,4
9,5
9,1
9
9,3
9,9
9,8
9,4
8,3
8
8,5
10,4
11,1
10,9
9,9
9,2
9,2
9,5
9,6
9,5
9,1
8,9
9
10,1
10,3
10,2
9,6
9,2
9,3
9,4
9,4
9,2
9
9
9
9,8
10
9,9
9,3
9
9
9,1
9,1
9,1
9,2
8,8
8,3
8,4
8,1
7,8
7,9
7,9
8
7,9
7,5
7,2
6,9
6,6
6,7
7,3




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34883&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34883&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34883&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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])
369.8-------
3710-------
389.9-------
399.3-------
409-------
419-------
429.1-------
439.1-------
449.1-------
459.2-------
468.8-------
478.3-------
488.4-------
498.18.39667.99858.79470.07210.493400.4934
507.88.42857.64379.21320.05820.7941e-040.5283
517.98.22247.08399.36080.28950.76640.03180.3799
527.98.24786.91229.58330.30490.69510.13480.4116
5388.26926.85599.68250.35440.69570.15540.428
547.98.10616.67089.54130.38920.55760.08730.3441
557.57.71226.26159.1630.38720.39990.03040.1764
567.27.44695.95498.93890.37290.47220.01490.1053
576.97.52835.93499.12170.21980.65680.01990.1418
586.67.19085.44598.93560.25350.6280.03530.0872
596.76.80984.91858.7010.45470.5860.06120.0497
607.36.89574.90388.88770.34540.57640.06940.0694

\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 & 9.8 & - & - & - & - & - & - & - \tabularnewline
37 & 10 & - & - & - & - & - & - & - \tabularnewline
38 & 9.9 & - & - & - & - & - & - & - \tabularnewline
39 & 9.3 & - & - & - & - & - & - & - \tabularnewline
40 & 9 & - & - & - & - & - & - & - \tabularnewline
41 & 9 & - & - & - & - & - & - & - \tabularnewline
42 & 9.1 & - & - & - & - & - & - & - \tabularnewline
43 & 9.1 & - & - & - & - & - & - & - \tabularnewline
44 & 9.1 & - & - & - & - & - & - & - \tabularnewline
45 & 9.2 & - & - & - & - & - & - & - \tabularnewline
46 & 8.8 & - & - & - & - & - & - & - \tabularnewline
47 & 8.3 & - & - & - & - & - & - & - \tabularnewline
48 & 8.4 & - & - & - & - & - & - & - \tabularnewline
49 & 8.1 & 8.3966 & 7.9985 & 8.7947 & 0.0721 & 0.4934 & 0 & 0.4934 \tabularnewline
50 & 7.8 & 8.4285 & 7.6437 & 9.2132 & 0.0582 & 0.794 & 1e-04 & 0.5283 \tabularnewline
51 & 7.9 & 8.2224 & 7.0839 & 9.3608 & 0.2895 & 0.7664 & 0.0318 & 0.3799 \tabularnewline
52 & 7.9 & 8.2478 & 6.9122 & 9.5833 & 0.3049 & 0.6951 & 0.1348 & 0.4116 \tabularnewline
53 & 8 & 8.2692 & 6.8559 & 9.6825 & 0.3544 & 0.6957 & 0.1554 & 0.428 \tabularnewline
54 & 7.9 & 8.1061 & 6.6708 & 9.5413 & 0.3892 & 0.5576 & 0.0873 & 0.3441 \tabularnewline
55 & 7.5 & 7.7122 & 6.2615 & 9.163 & 0.3872 & 0.3999 & 0.0304 & 0.1764 \tabularnewline
56 & 7.2 & 7.4469 & 5.9549 & 8.9389 & 0.3729 & 0.4722 & 0.0149 & 0.1053 \tabularnewline
57 & 6.9 & 7.5283 & 5.9349 & 9.1217 & 0.2198 & 0.6568 & 0.0199 & 0.1418 \tabularnewline
58 & 6.6 & 7.1908 & 5.4459 & 8.9356 & 0.2535 & 0.628 & 0.0353 & 0.0872 \tabularnewline
59 & 6.7 & 6.8098 & 4.9185 & 8.701 & 0.4547 & 0.586 & 0.0612 & 0.0497 \tabularnewline
60 & 7.3 & 6.8957 & 4.9038 & 8.8877 & 0.3454 & 0.5764 & 0.0694 & 0.0694 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34883&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]9.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]10[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]9.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]9.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]9.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]9.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]9.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]9.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]8.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]8.1[/C][C]8.3966[/C][C]7.9985[/C][C]8.7947[/C][C]0.0721[/C][C]0.4934[/C][C]0[/C][C]0.4934[/C][/ROW]
[ROW][C]50[/C][C]7.8[/C][C]8.4285[/C][C]7.6437[/C][C]9.2132[/C][C]0.0582[/C][C]0.794[/C][C]1e-04[/C][C]0.5283[/C][/ROW]
[ROW][C]51[/C][C]7.9[/C][C]8.2224[/C][C]7.0839[/C][C]9.3608[/C][C]0.2895[/C][C]0.7664[/C][C]0.0318[/C][C]0.3799[/C][/ROW]
[ROW][C]52[/C][C]7.9[/C][C]8.2478[/C][C]6.9122[/C][C]9.5833[/C][C]0.3049[/C][C]0.6951[/C][C]0.1348[/C][C]0.4116[/C][/ROW]
[ROW][C]53[/C][C]8[/C][C]8.2692[/C][C]6.8559[/C][C]9.6825[/C][C]0.3544[/C][C]0.6957[/C][C]0.1554[/C][C]0.428[/C][/ROW]
[ROW][C]54[/C][C]7.9[/C][C]8.1061[/C][C]6.6708[/C][C]9.5413[/C][C]0.3892[/C][C]0.5576[/C][C]0.0873[/C][C]0.3441[/C][/ROW]
[ROW][C]55[/C][C]7.5[/C][C]7.7122[/C][C]6.2615[/C][C]9.163[/C][C]0.3872[/C][C]0.3999[/C][C]0.0304[/C][C]0.1764[/C][/ROW]
[ROW][C]56[/C][C]7.2[/C][C]7.4469[/C][C]5.9549[/C][C]8.9389[/C][C]0.3729[/C][C]0.4722[/C][C]0.0149[/C][C]0.1053[/C][/ROW]
[ROW][C]57[/C][C]6.9[/C][C]7.5283[/C][C]5.9349[/C][C]9.1217[/C][C]0.2198[/C][C]0.6568[/C][C]0.0199[/C][C]0.1418[/C][/ROW]
[ROW][C]58[/C][C]6.6[/C][C]7.1908[/C][C]5.4459[/C][C]8.9356[/C][C]0.2535[/C][C]0.628[/C][C]0.0353[/C][C]0.0872[/C][/ROW]
[ROW][C]59[/C][C]6.7[/C][C]6.8098[/C][C]4.9185[/C][C]8.701[/C][C]0.4547[/C][C]0.586[/C][C]0.0612[/C][C]0.0497[/C][/ROW]
[ROW][C]60[/C][C]7.3[/C][C]6.8957[/C][C]4.9038[/C][C]8.8877[/C][C]0.3454[/C][C]0.5764[/C][C]0.0694[/C][C]0.0694[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34883&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34883&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])
369.8-------
3710-------
389.9-------
399.3-------
409-------
419-------
429.1-------
439.1-------
449.1-------
459.2-------
468.8-------
478.3-------
488.4-------
498.18.39667.99858.79470.07210.493400.4934
507.88.42857.64379.21320.05820.7941e-040.5283
517.98.22247.08399.36080.28950.76640.03180.3799
527.98.24786.91229.58330.30490.69510.13480.4116
5388.26926.85599.68250.35440.69570.15540.428
547.98.10616.67089.54130.38920.55760.08730.3441
557.57.71226.26159.1630.38720.39990.03040.1764
567.27.44695.95498.93890.37290.47220.01490.1053
576.97.52835.93499.12170.21980.65680.01990.1418
586.67.19085.44598.93560.25350.6280.03530.0872
596.76.80984.91858.7010.45470.5860.06120.0497
607.36.89574.90388.88770.34540.57640.06940.0694







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0242-0.03530.00290.0880.00730.0856
500.0475-0.07460.00620.3950.03290.1814
510.0706-0.03920.00330.10390.00870.0931
520.0826-0.04220.00350.1210.01010.1004
530.0872-0.03260.00270.07250.0060.0777
540.0903-0.02540.00210.04250.00350.0595
550.096-0.02750.00230.0450.00380.0613
560.1022-0.03310.00280.06090.00510.0713
570.108-0.08350.0070.39470.03290.1814
580.1238-0.08220.00680.3490.02910.1705
590.1417-0.01610.00130.0120.0010.0317
600.14740.05860.00490.16340.01360.1167

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0242 & -0.0353 & 0.0029 & 0.088 & 0.0073 & 0.0856 \tabularnewline
50 & 0.0475 & -0.0746 & 0.0062 & 0.395 & 0.0329 & 0.1814 \tabularnewline
51 & 0.0706 & -0.0392 & 0.0033 & 0.1039 & 0.0087 & 0.0931 \tabularnewline
52 & 0.0826 & -0.0422 & 0.0035 & 0.121 & 0.0101 & 0.1004 \tabularnewline
53 & 0.0872 & -0.0326 & 0.0027 & 0.0725 & 0.006 & 0.0777 \tabularnewline
54 & 0.0903 & -0.0254 & 0.0021 & 0.0425 & 0.0035 & 0.0595 \tabularnewline
55 & 0.096 & -0.0275 & 0.0023 & 0.045 & 0.0038 & 0.0613 \tabularnewline
56 & 0.1022 & -0.0331 & 0.0028 & 0.0609 & 0.0051 & 0.0713 \tabularnewline
57 & 0.108 & -0.0835 & 0.007 & 0.3947 & 0.0329 & 0.1814 \tabularnewline
58 & 0.1238 & -0.0822 & 0.0068 & 0.349 & 0.0291 & 0.1705 \tabularnewline
59 & 0.1417 & -0.0161 & 0.0013 & 0.012 & 0.001 & 0.0317 \tabularnewline
60 & 0.1474 & 0.0586 & 0.0049 & 0.1634 & 0.0136 & 0.1167 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34883&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.0242[/C][C]-0.0353[/C][C]0.0029[/C][C]0.088[/C][C]0.0073[/C][C]0.0856[/C][/ROW]
[ROW][C]50[/C][C]0.0475[/C][C]-0.0746[/C][C]0.0062[/C][C]0.395[/C][C]0.0329[/C][C]0.1814[/C][/ROW]
[ROW][C]51[/C][C]0.0706[/C][C]-0.0392[/C][C]0.0033[/C][C]0.1039[/C][C]0.0087[/C][C]0.0931[/C][/ROW]
[ROW][C]52[/C][C]0.0826[/C][C]-0.0422[/C][C]0.0035[/C][C]0.121[/C][C]0.0101[/C][C]0.1004[/C][/ROW]
[ROW][C]53[/C][C]0.0872[/C][C]-0.0326[/C][C]0.0027[/C][C]0.0725[/C][C]0.006[/C][C]0.0777[/C][/ROW]
[ROW][C]54[/C][C]0.0903[/C][C]-0.0254[/C][C]0.0021[/C][C]0.0425[/C][C]0.0035[/C][C]0.0595[/C][/ROW]
[ROW][C]55[/C][C]0.096[/C][C]-0.0275[/C][C]0.0023[/C][C]0.045[/C][C]0.0038[/C][C]0.0613[/C][/ROW]
[ROW][C]56[/C][C]0.1022[/C][C]-0.0331[/C][C]0.0028[/C][C]0.0609[/C][C]0.0051[/C][C]0.0713[/C][/ROW]
[ROW][C]57[/C][C]0.108[/C][C]-0.0835[/C][C]0.007[/C][C]0.3947[/C][C]0.0329[/C][C]0.1814[/C][/ROW]
[ROW][C]58[/C][C]0.1238[/C][C]-0.0822[/C][C]0.0068[/C][C]0.349[/C][C]0.0291[/C][C]0.1705[/C][/ROW]
[ROW][C]59[/C][C]0.1417[/C][C]-0.0161[/C][C]0.0013[/C][C]0.012[/C][C]0.001[/C][C]0.0317[/C][/ROW]
[ROW][C]60[/C][C]0.1474[/C][C]0.0586[/C][C]0.0049[/C][C]0.1634[/C][C]0.0136[/C][C]0.1167[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34883&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34883&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.0242-0.03530.00290.0880.00730.0856
500.0475-0.07460.00620.3950.03290.1814
510.0706-0.03920.00330.10390.00870.0931
520.0826-0.04220.00350.1210.01010.1004
530.0872-0.03260.00270.07250.0060.0777
540.0903-0.02540.00210.04250.00350.0595
550.096-0.02750.00230.0450.00380.0613
560.1022-0.03310.00280.06090.00510.0713
570.108-0.08350.0070.39470.03290.1814
580.1238-0.08220.00680.3490.02910.1705
590.1417-0.01610.00130.0120.0010.0317
600.14740.05860.00490.16340.01360.1167



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