Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 21 Dec 2007 03:22:42 -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/2007/Dec/21/t11982314735ttcqo0hx7etl07.htm/, Retrieved Tue, 07 May 2024 16:33:18 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4788, Retrieved Tue, 07 May 2024 16:33:18 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact214
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Forecast - Serie ...] [2007-12-21 10:22:42] [921757a21ec3444367392306fe4aab7f] [Current]
Feedback Forum

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




Summary of compuational 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 compuational 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=4788&T=0

[TABLE]
[ROW][C]Summary of compuational 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=4788&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4788&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 compuational 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])
361.2-------
371.4-------
381.1-------
391.3-------
401.3-------
411.3-------
421.3-------
430.9-------
441.3-------
451.8-------
462.7-------
472.6-------
482.9-------
492.22.92912.18613.67210.02720.530610.5306
502.13.22092.17024.27170.01830.971610.7253
512.33.28882.00194.57570.0660.96490.99880.7231
522.32.77681.29084.26280.26470.73530.97430.4355
532.72.90821.24684.56960.4030.76350.97110.5039
542.62.92091.10094.74090.36480.5940.95960.509
552.92.91570.94994.88150.49380.62350.97780.5062
563.12.85450.7534.9560.40940.48310.92640.4831
572.82.56640.33744.79530.41860.31940.74980.3846
582.12.1125-0.2374.46210.49580.28320.3120.2556
592.32.2096-0.25474.67380.47130.53470.37810.2914
602.22.1931-0.38074.7670.49790.46760.29520.2952

\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 & 1.2 & - & - & - & - & - & - & - \tabularnewline
37 & 1.4 & - & - & - & - & - & - & - \tabularnewline
38 & 1.1 & - & - & - & - & - & - & - \tabularnewline
39 & 1.3 & - & - & - & - & - & - & - \tabularnewline
40 & 1.3 & - & - & - & - & - & - & - \tabularnewline
41 & 1.3 & - & - & - & - & - & - & - \tabularnewline
42 & 1.3 & - & - & - & - & - & - & - \tabularnewline
43 & 0.9 & - & - & - & - & - & - & - \tabularnewline
44 & 1.3 & - & - & - & - & - & - & - \tabularnewline
45 & 1.8 & - & - & - & - & - & - & - \tabularnewline
46 & 2.7 & - & - & - & - & - & - & - \tabularnewline
47 & 2.6 & - & - & - & - & - & - & - \tabularnewline
48 & 2.9 & - & - & - & - & - & - & - \tabularnewline
49 & 2.2 & 2.9291 & 2.1861 & 3.6721 & 0.0272 & 0.5306 & 1 & 0.5306 \tabularnewline
50 & 2.1 & 3.2209 & 2.1702 & 4.2717 & 0.0183 & 0.9716 & 1 & 0.7253 \tabularnewline
51 & 2.3 & 3.2888 & 2.0019 & 4.5757 & 0.066 & 0.9649 & 0.9988 & 0.7231 \tabularnewline
52 & 2.3 & 2.7768 & 1.2908 & 4.2628 & 0.2647 & 0.7353 & 0.9743 & 0.4355 \tabularnewline
53 & 2.7 & 2.9082 & 1.2468 & 4.5696 & 0.403 & 0.7635 & 0.9711 & 0.5039 \tabularnewline
54 & 2.6 & 2.9209 & 1.1009 & 4.7409 & 0.3648 & 0.594 & 0.9596 & 0.509 \tabularnewline
55 & 2.9 & 2.9157 & 0.9499 & 4.8815 & 0.4938 & 0.6235 & 0.9778 & 0.5062 \tabularnewline
56 & 3.1 & 2.8545 & 0.753 & 4.956 & 0.4094 & 0.4831 & 0.9264 & 0.4831 \tabularnewline
57 & 2.8 & 2.5664 & 0.3374 & 4.7953 & 0.4186 & 0.3194 & 0.7498 & 0.3846 \tabularnewline
58 & 2.1 & 2.1125 & -0.237 & 4.4621 & 0.4958 & 0.2832 & 0.312 & 0.2556 \tabularnewline
59 & 2.3 & 2.2096 & -0.2547 & 4.6738 & 0.4713 & 0.5347 & 0.3781 & 0.2914 \tabularnewline
60 & 2.2 & 2.1931 & -0.3807 & 4.767 & 0.4979 & 0.4676 & 0.2952 & 0.2952 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4788&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]1.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]1.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]1.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]1.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]1.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]1.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]1.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]0.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]1.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]1.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]2.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]2.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]2.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]2.2[/C][C]2.9291[/C][C]2.1861[/C][C]3.6721[/C][C]0.0272[/C][C]0.5306[/C][C]1[/C][C]0.5306[/C][/ROW]
[ROW][C]50[/C][C]2.1[/C][C]3.2209[/C][C]2.1702[/C][C]4.2717[/C][C]0.0183[/C][C]0.9716[/C][C]1[/C][C]0.7253[/C][/ROW]
[ROW][C]51[/C][C]2.3[/C][C]3.2888[/C][C]2.0019[/C][C]4.5757[/C][C]0.066[/C][C]0.9649[/C][C]0.9988[/C][C]0.7231[/C][/ROW]
[ROW][C]52[/C][C]2.3[/C][C]2.7768[/C][C]1.2908[/C][C]4.2628[/C][C]0.2647[/C][C]0.7353[/C][C]0.9743[/C][C]0.4355[/C][/ROW]
[ROW][C]53[/C][C]2.7[/C][C]2.9082[/C][C]1.2468[/C][C]4.5696[/C][C]0.403[/C][C]0.7635[/C][C]0.9711[/C][C]0.5039[/C][/ROW]
[ROW][C]54[/C][C]2.6[/C][C]2.9209[/C][C]1.1009[/C][C]4.7409[/C][C]0.3648[/C][C]0.594[/C][C]0.9596[/C][C]0.509[/C][/ROW]
[ROW][C]55[/C][C]2.9[/C][C]2.9157[/C][C]0.9499[/C][C]4.8815[/C][C]0.4938[/C][C]0.6235[/C][C]0.9778[/C][C]0.5062[/C][/ROW]
[ROW][C]56[/C][C]3.1[/C][C]2.8545[/C][C]0.753[/C][C]4.956[/C][C]0.4094[/C][C]0.4831[/C][C]0.9264[/C][C]0.4831[/C][/ROW]
[ROW][C]57[/C][C]2.8[/C][C]2.5664[/C][C]0.3374[/C][C]4.7953[/C][C]0.4186[/C][C]0.3194[/C][C]0.7498[/C][C]0.3846[/C][/ROW]
[ROW][C]58[/C][C]2.1[/C][C]2.1125[/C][C]-0.237[/C][C]4.4621[/C][C]0.4958[/C][C]0.2832[/C][C]0.312[/C][C]0.2556[/C][/ROW]
[ROW][C]59[/C][C]2.3[/C][C]2.2096[/C][C]-0.2547[/C][C]4.6738[/C][C]0.4713[/C][C]0.5347[/C][C]0.3781[/C][C]0.2914[/C][/ROW]
[ROW][C]60[/C][C]2.2[/C][C]2.1931[/C][C]-0.3807[/C][C]4.767[/C][C]0.4979[/C][C]0.4676[/C][C]0.2952[/C][C]0.2952[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4788&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4788&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])
361.2-------
371.4-------
381.1-------
391.3-------
401.3-------
411.3-------
421.3-------
430.9-------
441.3-------
451.8-------
462.7-------
472.6-------
482.9-------
492.22.92912.18613.67210.02720.530610.5306
502.13.22092.17024.27170.01830.971610.7253
512.33.28882.00194.57570.0660.96490.99880.7231
522.32.77681.29084.26280.26470.73530.97430.4355
532.72.90821.24684.56960.4030.76350.97110.5039
542.62.92091.10094.74090.36480.5940.95960.509
552.92.91570.94994.88150.49380.62350.97780.5062
563.12.85450.7534.9560.40940.48310.92640.4831
572.82.56640.33744.79530.41860.31940.74980.3846
582.12.1125-0.2374.46210.49580.28320.3120.2556
592.32.2096-0.25474.67380.47130.53470.37810.2914
602.22.1931-0.38074.7670.49790.46760.29520.2952







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.1294-0.24890.02070.53160.04430.2105
500.1664-0.3480.0291.25650.10470.3236
510.1996-0.30070.02510.97780.08150.2855
520.273-0.17170.01430.22740.01890.1377
530.2915-0.07160.0060.04330.00360.0601
540.3179-0.10990.00920.1030.00860.0926
550.344-0.00544e-042e-0400.0045
560.37560.0860.00720.06030.0050.0709
570.44310.0910.00760.05460.00450.0674
580.5675-0.00595e-042e-0400.0036
590.5690.04090.00340.00827e-040.0261
600.59880.00313e-04000.002

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1294 & -0.2489 & 0.0207 & 0.5316 & 0.0443 & 0.2105 \tabularnewline
50 & 0.1664 & -0.348 & 0.029 & 1.2565 & 0.1047 & 0.3236 \tabularnewline
51 & 0.1996 & -0.3007 & 0.0251 & 0.9778 & 0.0815 & 0.2855 \tabularnewline
52 & 0.273 & -0.1717 & 0.0143 & 0.2274 & 0.0189 & 0.1377 \tabularnewline
53 & 0.2915 & -0.0716 & 0.006 & 0.0433 & 0.0036 & 0.0601 \tabularnewline
54 & 0.3179 & -0.1099 & 0.0092 & 0.103 & 0.0086 & 0.0926 \tabularnewline
55 & 0.344 & -0.0054 & 4e-04 & 2e-04 & 0 & 0.0045 \tabularnewline
56 & 0.3756 & 0.086 & 0.0072 & 0.0603 & 0.005 & 0.0709 \tabularnewline
57 & 0.4431 & 0.091 & 0.0076 & 0.0546 & 0.0045 & 0.0674 \tabularnewline
58 & 0.5675 & -0.0059 & 5e-04 & 2e-04 & 0 & 0.0036 \tabularnewline
59 & 0.569 & 0.0409 & 0.0034 & 0.0082 & 7e-04 & 0.0261 \tabularnewline
60 & 0.5988 & 0.0031 & 3e-04 & 0 & 0 & 0.002 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4788&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.1294[/C][C]-0.2489[/C][C]0.0207[/C][C]0.5316[/C][C]0.0443[/C][C]0.2105[/C][/ROW]
[ROW][C]50[/C][C]0.1664[/C][C]-0.348[/C][C]0.029[/C][C]1.2565[/C][C]0.1047[/C][C]0.3236[/C][/ROW]
[ROW][C]51[/C][C]0.1996[/C][C]-0.3007[/C][C]0.0251[/C][C]0.9778[/C][C]0.0815[/C][C]0.2855[/C][/ROW]
[ROW][C]52[/C][C]0.273[/C][C]-0.1717[/C][C]0.0143[/C][C]0.2274[/C][C]0.0189[/C][C]0.1377[/C][/ROW]
[ROW][C]53[/C][C]0.2915[/C][C]-0.0716[/C][C]0.006[/C][C]0.0433[/C][C]0.0036[/C][C]0.0601[/C][/ROW]
[ROW][C]54[/C][C]0.3179[/C][C]-0.1099[/C][C]0.0092[/C][C]0.103[/C][C]0.0086[/C][C]0.0926[/C][/ROW]
[ROW][C]55[/C][C]0.344[/C][C]-0.0054[/C][C]4e-04[/C][C]2e-04[/C][C]0[/C][C]0.0045[/C][/ROW]
[ROW][C]56[/C][C]0.3756[/C][C]0.086[/C][C]0.0072[/C][C]0.0603[/C][C]0.005[/C][C]0.0709[/C][/ROW]
[ROW][C]57[/C][C]0.4431[/C][C]0.091[/C][C]0.0076[/C][C]0.0546[/C][C]0.0045[/C][C]0.0674[/C][/ROW]
[ROW][C]58[/C][C]0.5675[/C][C]-0.0059[/C][C]5e-04[/C][C]2e-04[/C][C]0[/C][C]0.0036[/C][/ROW]
[ROW][C]59[/C][C]0.569[/C][C]0.0409[/C][C]0.0034[/C][C]0.0082[/C][C]7e-04[/C][C]0.0261[/C][/ROW]
[ROW][C]60[/C][C]0.5988[/C][C]0.0031[/C][C]3e-04[/C][C]0[/C][C]0[/C][C]0.002[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4788&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4788&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.1294-0.24890.02070.53160.04430.2105
500.1664-0.3480.0291.25650.10470.3236
510.1996-0.30070.02510.97780.08150.2855
520.273-0.17170.01430.22740.01890.1377
530.2915-0.07160.0060.04330.00360.0601
540.3179-0.10990.00920.1030.00860.0926
550.344-0.00544e-042e-0400.0045
560.37560.0860.00720.06030.0050.0709
570.44310.0910.00760.05460.00450.0674
580.5675-0.00595e-042e-0400.0036
590.5690.04090.00340.00827e-040.0261
600.59880.00313e-04000.002



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')