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, 11 Dec 2008 09:36:17 -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/11/t1229013477ejdlg5w1ks4cvyr.htm/, Retrieved Sun, 19 May 2024 06:29:26 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=32337, Retrieved Sun, 19 May 2024 06:29:26 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact159
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Q1 Arima forecasting] [2008-12-11 16:36:17] [70ba55c7ff8e068610dc28fc16e6d1e2] [Current]
Feedback Forum

Post a new message
Dataseries X:
7.8
7.6
7.5
7.6
7.5
7.3
7.6
7.5
7.6
7.9
7.9
8.1
8.2
8.0
7.5
6.8
6.5
6.6
7.6
8.0
8.0
7.7
7.5
7.6
7.7
7.9
7.8
7.5
7.5
7.1
7.5
7.5
7.6
7.7
7.7
7.9
8.1
8.2
8.2
8.1
7.9
7.3
6.9
6.6
6.7
6.9
7.0
7.1
7.2
7.1
6.9
7.0
6.8
6.4
6.7
6.7
6.4
6.3
6.2
6.5
6.8
6.8
6.5
6.3
5.9
5.9
6.4
6.4




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32337&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[56])
446.6-------
456.7-------
466.9-------
477-------
487.1-------
497.2-------
507.1-------
516.9-------
527-------
536.8-------
546.4-------
556.7-------
566.7-------
576.46.67736.17837.17620.1380.46440.46440.4644
586.36.6235.59447.65160.26910.66450.29880.4417
596.26.58265.17447.99080.29720.6530.28060.4351
606.56.7025.08058.32340.40350.7280.31520.501
616.86.89055.14568.63540.45950.66950.3640.5847
626.86.85145.00658.69620.47820.52180.39580.5639
636.56.65444.78.60870.43850.44190.40270.4817
646.36.72514.64738.80290.34420.58410.39770.5094
655.96.50014.29778.70250.29670.57070.39480.4294
665.96.09523.77848.41190.43440.56560.39820.3044
676.46.40423.98518.82340.49860.65860.40530.4053
686.46.41413.89988.92830.49560.50440.41180.4118

\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[56]) \tabularnewline
44 & 6.6 & - & - & - & - & - & - & - \tabularnewline
45 & 6.7 & - & - & - & - & - & - & - \tabularnewline
46 & 6.9 & - & - & - & - & - & - & - \tabularnewline
47 & 7 & - & - & - & - & - & - & - \tabularnewline
48 & 7.1 & - & - & - & - & - & - & - \tabularnewline
49 & 7.2 & - & - & - & - & - & - & - \tabularnewline
50 & 7.1 & - & - & - & - & - & - & - \tabularnewline
51 & 6.9 & - & - & - & - & - & - & - \tabularnewline
52 & 7 & - & - & - & - & - & - & - \tabularnewline
53 & 6.8 & - & - & - & - & - & - & - \tabularnewline
54 & 6.4 & - & - & - & - & - & - & - \tabularnewline
55 & 6.7 & - & - & - & - & - & - & - \tabularnewline
56 & 6.7 & - & - & - & - & - & - & - \tabularnewline
57 & 6.4 & 6.6773 & 6.1783 & 7.1762 & 0.138 & 0.4644 & 0.4644 & 0.4644 \tabularnewline
58 & 6.3 & 6.623 & 5.5944 & 7.6516 & 0.2691 & 0.6645 & 0.2988 & 0.4417 \tabularnewline
59 & 6.2 & 6.5826 & 5.1744 & 7.9908 & 0.2972 & 0.653 & 0.2806 & 0.4351 \tabularnewline
60 & 6.5 & 6.702 & 5.0805 & 8.3234 & 0.4035 & 0.728 & 0.3152 & 0.501 \tabularnewline
61 & 6.8 & 6.8905 & 5.1456 & 8.6354 & 0.4595 & 0.6695 & 0.364 & 0.5847 \tabularnewline
62 & 6.8 & 6.8514 & 5.0065 & 8.6962 & 0.4782 & 0.5218 & 0.3958 & 0.5639 \tabularnewline
63 & 6.5 & 6.6544 & 4.7 & 8.6087 & 0.4385 & 0.4419 & 0.4027 & 0.4817 \tabularnewline
64 & 6.3 & 6.7251 & 4.6473 & 8.8029 & 0.3442 & 0.5841 & 0.3977 & 0.5094 \tabularnewline
65 & 5.9 & 6.5001 & 4.2977 & 8.7025 & 0.2967 & 0.5707 & 0.3948 & 0.4294 \tabularnewline
66 & 5.9 & 6.0952 & 3.7784 & 8.4119 & 0.4344 & 0.5656 & 0.3982 & 0.3044 \tabularnewline
67 & 6.4 & 6.4042 & 3.9851 & 8.8234 & 0.4986 & 0.6586 & 0.4053 & 0.4053 \tabularnewline
68 & 6.4 & 6.4141 & 3.8998 & 8.9283 & 0.4956 & 0.5044 & 0.4118 & 0.4118 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32337&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[56])[/C][/ROW]
[ROW][C]44[/C][C]6.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]6.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]7.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]6.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]6.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]6.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]6.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]6.4[/C][C]6.6773[/C][C]6.1783[/C][C]7.1762[/C][C]0.138[/C][C]0.4644[/C][C]0.4644[/C][C]0.4644[/C][/ROW]
[ROW][C]58[/C][C]6.3[/C][C]6.623[/C][C]5.5944[/C][C]7.6516[/C][C]0.2691[/C][C]0.6645[/C][C]0.2988[/C][C]0.4417[/C][/ROW]
[ROW][C]59[/C][C]6.2[/C][C]6.5826[/C][C]5.1744[/C][C]7.9908[/C][C]0.2972[/C][C]0.653[/C][C]0.2806[/C][C]0.4351[/C][/ROW]
[ROW][C]60[/C][C]6.5[/C][C]6.702[/C][C]5.0805[/C][C]8.3234[/C][C]0.4035[/C][C]0.728[/C][C]0.3152[/C][C]0.501[/C][/ROW]
[ROW][C]61[/C][C]6.8[/C][C]6.8905[/C][C]5.1456[/C][C]8.6354[/C][C]0.4595[/C][C]0.6695[/C][C]0.364[/C][C]0.5847[/C][/ROW]
[ROW][C]62[/C][C]6.8[/C][C]6.8514[/C][C]5.0065[/C][C]8.6962[/C][C]0.4782[/C][C]0.5218[/C][C]0.3958[/C][C]0.5639[/C][/ROW]
[ROW][C]63[/C][C]6.5[/C][C]6.6544[/C][C]4.7[/C][C]8.6087[/C][C]0.4385[/C][C]0.4419[/C][C]0.4027[/C][C]0.4817[/C][/ROW]
[ROW][C]64[/C][C]6.3[/C][C]6.7251[/C][C]4.6473[/C][C]8.8029[/C][C]0.3442[/C][C]0.5841[/C][C]0.3977[/C][C]0.5094[/C][/ROW]
[ROW][C]65[/C][C]5.9[/C][C]6.5001[/C][C]4.2977[/C][C]8.7025[/C][C]0.2967[/C][C]0.5707[/C][C]0.3948[/C][C]0.4294[/C][/ROW]
[ROW][C]66[/C][C]5.9[/C][C]6.0952[/C][C]3.7784[/C][C]8.4119[/C][C]0.4344[/C][C]0.5656[/C][C]0.3982[/C][C]0.3044[/C][/ROW]
[ROW][C]67[/C][C]6.4[/C][C]6.4042[/C][C]3.9851[/C][C]8.8234[/C][C]0.4986[/C][C]0.6586[/C][C]0.4053[/C][C]0.4053[/C][/ROW]
[ROW][C]68[/C][C]6.4[/C][C]6.4141[/C][C]3.8998[/C][C]8.9283[/C][C]0.4956[/C][C]0.5044[/C][C]0.4118[/C][C]0.4118[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32337&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32337&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[56])
446.6-------
456.7-------
466.9-------
477-------
487.1-------
497.2-------
507.1-------
516.9-------
527-------
536.8-------
546.4-------
556.7-------
566.7-------
576.46.67736.17837.17620.1380.46440.46440.4644
586.36.6235.59447.65160.26910.66450.29880.4417
596.26.58265.17447.99080.29720.6530.28060.4351
606.56.7025.08058.32340.40350.7280.31520.501
616.86.89055.14568.63540.45950.66950.3640.5847
626.86.85145.00658.69620.47820.52180.39580.5639
636.56.65444.78.60870.43850.44190.40270.4817
646.36.72514.64738.80290.34420.58410.39770.5094
655.96.50014.29778.70250.29670.57070.39480.4294
665.96.09523.77848.41190.43440.56560.39820.3044
676.46.40423.98518.82340.49860.65860.40530.4053
686.46.41413.89988.92830.49560.50440.41180.4118







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
570.0381-0.04150.00350.07690.00640.08
580.0792-0.04880.00410.10430.00870.0932
590.1091-0.05810.00480.14640.01220.1104
600.1234-0.03010.00250.04080.00340.0583
610.1292-0.01310.00110.00827e-040.0261
620.1374-0.00756e-040.00262e-040.0148
630.1498-0.02320.00190.02380.0020.0446
640.1576-0.06320.00530.18070.01510.1227
650.1729-0.09230.00770.36010.030.1732
660.1939-0.0320.00270.03810.00320.0563
670.1927-7e-041e-04000.0012
680.2-0.00222e-042e-0400.0041

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
57 & 0.0381 & -0.0415 & 0.0035 & 0.0769 & 0.0064 & 0.08 \tabularnewline
58 & 0.0792 & -0.0488 & 0.0041 & 0.1043 & 0.0087 & 0.0932 \tabularnewline
59 & 0.1091 & -0.0581 & 0.0048 & 0.1464 & 0.0122 & 0.1104 \tabularnewline
60 & 0.1234 & -0.0301 & 0.0025 & 0.0408 & 0.0034 & 0.0583 \tabularnewline
61 & 0.1292 & -0.0131 & 0.0011 & 0.0082 & 7e-04 & 0.0261 \tabularnewline
62 & 0.1374 & -0.0075 & 6e-04 & 0.0026 & 2e-04 & 0.0148 \tabularnewline
63 & 0.1498 & -0.0232 & 0.0019 & 0.0238 & 0.002 & 0.0446 \tabularnewline
64 & 0.1576 & -0.0632 & 0.0053 & 0.1807 & 0.0151 & 0.1227 \tabularnewline
65 & 0.1729 & -0.0923 & 0.0077 & 0.3601 & 0.03 & 0.1732 \tabularnewline
66 & 0.1939 & -0.032 & 0.0027 & 0.0381 & 0.0032 & 0.0563 \tabularnewline
67 & 0.1927 & -7e-04 & 1e-04 & 0 & 0 & 0.0012 \tabularnewline
68 & 0.2 & -0.0022 & 2e-04 & 2e-04 & 0 & 0.0041 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32337&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]57[/C][C]0.0381[/C][C]-0.0415[/C][C]0.0035[/C][C]0.0769[/C][C]0.0064[/C][C]0.08[/C][/ROW]
[ROW][C]58[/C][C]0.0792[/C][C]-0.0488[/C][C]0.0041[/C][C]0.1043[/C][C]0.0087[/C][C]0.0932[/C][/ROW]
[ROW][C]59[/C][C]0.1091[/C][C]-0.0581[/C][C]0.0048[/C][C]0.1464[/C][C]0.0122[/C][C]0.1104[/C][/ROW]
[ROW][C]60[/C][C]0.1234[/C][C]-0.0301[/C][C]0.0025[/C][C]0.0408[/C][C]0.0034[/C][C]0.0583[/C][/ROW]
[ROW][C]61[/C][C]0.1292[/C][C]-0.0131[/C][C]0.0011[/C][C]0.0082[/C][C]7e-04[/C][C]0.0261[/C][/ROW]
[ROW][C]62[/C][C]0.1374[/C][C]-0.0075[/C][C]6e-04[/C][C]0.0026[/C][C]2e-04[/C][C]0.0148[/C][/ROW]
[ROW][C]63[/C][C]0.1498[/C][C]-0.0232[/C][C]0.0019[/C][C]0.0238[/C][C]0.002[/C][C]0.0446[/C][/ROW]
[ROW][C]64[/C][C]0.1576[/C][C]-0.0632[/C][C]0.0053[/C][C]0.1807[/C][C]0.0151[/C][C]0.1227[/C][/ROW]
[ROW][C]65[/C][C]0.1729[/C][C]-0.0923[/C][C]0.0077[/C][C]0.3601[/C][C]0.03[/C][C]0.1732[/C][/ROW]
[ROW][C]66[/C][C]0.1939[/C][C]-0.032[/C][C]0.0027[/C][C]0.0381[/C][C]0.0032[/C][C]0.0563[/C][/ROW]
[ROW][C]67[/C][C]0.1927[/C][C]-7e-04[/C][C]1e-04[/C][C]0[/C][C]0[/C][C]0.0012[/C][/ROW]
[ROW][C]68[/C][C]0.2[/C][C]-0.0022[/C][C]2e-04[/C][C]2e-04[/C][C]0[/C][C]0.0041[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32337&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32337&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
570.0381-0.04150.00350.07690.00640.08
580.0792-0.04880.00410.10430.00870.0932
590.1091-0.05810.00480.14640.01220.1104
600.1234-0.03010.00250.04080.00340.0583
610.1292-0.01310.00110.00827e-040.0261
620.1374-0.00756e-040.00262e-040.0148
630.1498-0.02320.00190.02380.0020.0446
640.1576-0.06320.00530.18070.01510.1227
650.1729-0.09230.00770.36010.030.1732
660.1939-0.0320.00270.03810.00320.0563
670.1927-7e-041e-04000.0012
680.2-0.00222e-042e-0400.0041



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