Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 15 Dec 2007 06:06:41 -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/15/t11977251566gmdyph9osbyerl.htm/, Retrieved Thu, 02 May 2024 14:38:44 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4042, Retrieved Thu, 02 May 2024 14:38:44 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact192
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Werkloosheid] [2007-12-15 13:06:41] [89d26cd0a44959d9c8b169f34617598a] [Current]
Feedback Forum

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




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4042&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[49])
378.6-------
388.7-------
398.7-------
408.6-------
418.4-------
428.4-------
438.7-------
448.7-------
458.5-------
468.3-------
478.3-------
488.3-------
498.1-------
508.28.21347.9748.45280.45640.823400.8234
518.18.20367.86488.54250.27450.50830.0020.7255
528.18.7978.38989.20424e-040.99960.82850.9996
537.98.60898.19069.02724e-040.99150.83620.9915
547.78.70158.27239.130600.99990.91570.997
558.18.86958.42629.31283e-0410.77310.9997
5688.86298.38379.34212e-040.99910.74740.9991
577.78.69868.18639.21091e-040.99620.77630.989
587.87.72097.18168.26020.38680.53020.01770.0841
597.67.63297.07818.18760.45380.27740.00920.0494
607.47.77977.20968.34980.09590.73170.03680.1354
617.78.75418.16699.34122e-0410.98550.9855

\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[49]) \tabularnewline
37 & 8.6 & - & - & - & - & - & - & - \tabularnewline
38 & 8.7 & - & - & - & - & - & - & - \tabularnewline
39 & 8.7 & - & - & - & - & - & - & - \tabularnewline
40 & 8.6 & - & - & - & - & - & - & - \tabularnewline
41 & 8.4 & - & - & - & - & - & - & - \tabularnewline
42 & 8.4 & - & - & - & - & - & - & - \tabularnewline
43 & 8.7 & - & - & - & - & - & - & - \tabularnewline
44 & 8.7 & - & - & - & - & - & - & - \tabularnewline
45 & 8.5 & - & - & - & - & - & - & - \tabularnewline
46 & 8.3 & - & - & - & - & - & - & - \tabularnewline
47 & 8.3 & - & - & - & - & - & - & - \tabularnewline
48 & 8.3 & - & - & - & - & - & - & - \tabularnewline
49 & 8.1 & - & - & - & - & - & - & - \tabularnewline
50 & 8.2 & 8.2134 & 7.974 & 8.4528 & 0.4564 & 0.8234 & 0 & 0.8234 \tabularnewline
51 & 8.1 & 8.2036 & 7.8648 & 8.5425 & 0.2745 & 0.5083 & 0.002 & 0.7255 \tabularnewline
52 & 8.1 & 8.797 & 8.3898 & 9.2042 & 4e-04 & 0.9996 & 0.8285 & 0.9996 \tabularnewline
53 & 7.9 & 8.6089 & 8.1906 & 9.0272 & 4e-04 & 0.9915 & 0.8362 & 0.9915 \tabularnewline
54 & 7.7 & 8.7015 & 8.2723 & 9.1306 & 0 & 0.9999 & 0.9157 & 0.997 \tabularnewline
55 & 8.1 & 8.8695 & 8.4262 & 9.3128 & 3e-04 & 1 & 0.7731 & 0.9997 \tabularnewline
56 & 8 & 8.8629 & 8.3837 & 9.3421 & 2e-04 & 0.9991 & 0.7474 & 0.9991 \tabularnewline
57 & 7.7 & 8.6986 & 8.1863 & 9.2109 & 1e-04 & 0.9962 & 0.7763 & 0.989 \tabularnewline
58 & 7.8 & 7.7209 & 7.1816 & 8.2602 & 0.3868 & 0.5302 & 0.0177 & 0.0841 \tabularnewline
59 & 7.6 & 7.6329 & 7.0781 & 8.1876 & 0.4538 & 0.2774 & 0.0092 & 0.0494 \tabularnewline
60 & 7.4 & 7.7797 & 7.2096 & 8.3498 & 0.0959 & 0.7317 & 0.0368 & 0.1354 \tabularnewline
61 & 7.7 & 8.7541 & 8.1669 & 9.3412 & 2e-04 & 1 & 0.9855 & 0.9855 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4042&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[49])[/C][/ROW]
[ROW][C]37[/C][C]8.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]8.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]8.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]8.3[/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.3[/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]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]8.2[/C][C]8.2134[/C][C]7.974[/C][C]8.4528[/C][C]0.4564[/C][C]0.8234[/C][C]0[/C][C]0.8234[/C][/ROW]
[ROW][C]51[/C][C]8.1[/C][C]8.2036[/C][C]7.8648[/C][C]8.5425[/C][C]0.2745[/C][C]0.5083[/C][C]0.002[/C][C]0.7255[/C][/ROW]
[ROW][C]52[/C][C]8.1[/C][C]8.797[/C][C]8.3898[/C][C]9.2042[/C][C]4e-04[/C][C]0.9996[/C][C]0.8285[/C][C]0.9996[/C][/ROW]
[ROW][C]53[/C][C]7.9[/C][C]8.6089[/C][C]8.1906[/C][C]9.0272[/C][C]4e-04[/C][C]0.9915[/C][C]0.8362[/C][C]0.9915[/C][/ROW]
[ROW][C]54[/C][C]7.7[/C][C]8.7015[/C][C]8.2723[/C][C]9.1306[/C][C]0[/C][C]0.9999[/C][C]0.9157[/C][C]0.997[/C][/ROW]
[ROW][C]55[/C][C]8.1[/C][C]8.8695[/C][C]8.4262[/C][C]9.3128[/C][C]3e-04[/C][C]1[/C][C]0.7731[/C][C]0.9997[/C][/ROW]
[ROW][C]56[/C][C]8[/C][C]8.8629[/C][C]8.3837[/C][C]9.3421[/C][C]2e-04[/C][C]0.9991[/C][C]0.7474[/C][C]0.9991[/C][/ROW]
[ROW][C]57[/C][C]7.7[/C][C]8.6986[/C][C]8.1863[/C][C]9.2109[/C][C]1e-04[/C][C]0.9962[/C][C]0.7763[/C][C]0.989[/C][/ROW]
[ROW][C]58[/C][C]7.8[/C][C]7.7209[/C][C]7.1816[/C][C]8.2602[/C][C]0.3868[/C][C]0.5302[/C][C]0.0177[/C][C]0.0841[/C][/ROW]
[ROW][C]59[/C][C]7.6[/C][C]7.6329[/C][C]7.0781[/C][C]8.1876[/C][C]0.4538[/C][C]0.2774[/C][C]0.0092[/C][C]0.0494[/C][/ROW]
[ROW][C]60[/C][C]7.4[/C][C]7.7797[/C][C]7.2096[/C][C]8.3498[/C][C]0.0959[/C][C]0.7317[/C][C]0.0368[/C][C]0.1354[/C][/ROW]
[ROW][C]61[/C][C]7.7[/C][C]8.7541[/C][C]8.1669[/C][C]9.3412[/C][C]2e-04[/C][C]1[/C][C]0.9855[/C][C]0.9855[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4042&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4042&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[49])
378.6-------
388.7-------
398.7-------
408.6-------
418.4-------
428.4-------
438.7-------
448.7-------
458.5-------
468.3-------
478.3-------
488.3-------
498.1-------
508.28.21347.9748.45280.45640.823400.8234
518.18.20367.86488.54250.27450.50830.0020.7255
528.18.7978.38989.20424e-040.99960.82850.9996
537.98.60898.19069.02724e-040.99150.83620.9915
547.78.70158.27239.130600.99990.91570.997
558.18.86958.42629.31283e-0410.77310.9997
5688.86298.38379.34212e-040.99910.74740.9991
577.78.69868.18639.21091e-040.99620.77630.989
587.87.72097.18168.26020.38680.53020.01770.0841
597.67.63297.07818.18760.45380.27740.00920.0494
607.47.77977.20968.34980.09590.73170.03680.1354
617.78.75418.16699.34122e-0410.98550.9855







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.0149-0.00161e-042e-0400.0039
510.0211-0.01260.00110.01079e-040.0299
520.0236-0.07920.00660.48590.04050.2012
530.0248-0.08230.00690.50250.04190.2046
540.0252-0.11510.00961.0030.08360.2891
550.0255-0.08680.00720.59210.04930.2221
560.0276-0.09740.00810.74460.0620.2491
570.03-0.11480.00960.99720.08310.2883
580.03560.01029e-040.00635e-040.0228
590.0371-0.00434e-040.00111e-040.0095
600.0374-0.04880.00410.14420.0120.1096
610.0342-0.12040.011.11110.09260.3043

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0149 & -0.0016 & 1e-04 & 2e-04 & 0 & 0.0039 \tabularnewline
51 & 0.0211 & -0.0126 & 0.0011 & 0.0107 & 9e-04 & 0.0299 \tabularnewline
52 & 0.0236 & -0.0792 & 0.0066 & 0.4859 & 0.0405 & 0.2012 \tabularnewline
53 & 0.0248 & -0.0823 & 0.0069 & 0.5025 & 0.0419 & 0.2046 \tabularnewline
54 & 0.0252 & -0.1151 & 0.0096 & 1.003 & 0.0836 & 0.2891 \tabularnewline
55 & 0.0255 & -0.0868 & 0.0072 & 0.5921 & 0.0493 & 0.2221 \tabularnewline
56 & 0.0276 & -0.0974 & 0.0081 & 0.7446 & 0.062 & 0.2491 \tabularnewline
57 & 0.03 & -0.1148 & 0.0096 & 0.9972 & 0.0831 & 0.2883 \tabularnewline
58 & 0.0356 & 0.0102 & 9e-04 & 0.0063 & 5e-04 & 0.0228 \tabularnewline
59 & 0.0371 & -0.0043 & 4e-04 & 0.0011 & 1e-04 & 0.0095 \tabularnewline
60 & 0.0374 & -0.0488 & 0.0041 & 0.1442 & 0.012 & 0.1096 \tabularnewline
61 & 0.0342 & -0.1204 & 0.01 & 1.1111 & 0.0926 & 0.3043 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4042&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]50[/C][C]0.0149[/C][C]-0.0016[/C][C]1e-04[/C][C]2e-04[/C][C]0[/C][C]0.0039[/C][/ROW]
[ROW][C]51[/C][C]0.0211[/C][C]-0.0126[/C][C]0.0011[/C][C]0.0107[/C][C]9e-04[/C][C]0.0299[/C][/ROW]
[ROW][C]52[/C][C]0.0236[/C][C]-0.0792[/C][C]0.0066[/C][C]0.4859[/C][C]0.0405[/C][C]0.2012[/C][/ROW]
[ROW][C]53[/C][C]0.0248[/C][C]-0.0823[/C][C]0.0069[/C][C]0.5025[/C][C]0.0419[/C][C]0.2046[/C][/ROW]
[ROW][C]54[/C][C]0.0252[/C][C]-0.1151[/C][C]0.0096[/C][C]1.003[/C][C]0.0836[/C][C]0.2891[/C][/ROW]
[ROW][C]55[/C][C]0.0255[/C][C]-0.0868[/C][C]0.0072[/C][C]0.5921[/C][C]0.0493[/C][C]0.2221[/C][/ROW]
[ROW][C]56[/C][C]0.0276[/C][C]-0.0974[/C][C]0.0081[/C][C]0.7446[/C][C]0.062[/C][C]0.2491[/C][/ROW]
[ROW][C]57[/C][C]0.03[/C][C]-0.1148[/C][C]0.0096[/C][C]0.9972[/C][C]0.0831[/C][C]0.2883[/C][/ROW]
[ROW][C]58[/C][C]0.0356[/C][C]0.0102[/C][C]9e-04[/C][C]0.0063[/C][C]5e-04[/C][C]0.0228[/C][/ROW]
[ROW][C]59[/C][C]0.0371[/C][C]-0.0043[/C][C]4e-04[/C][C]0.0011[/C][C]1e-04[/C][C]0.0095[/C][/ROW]
[ROW][C]60[/C][C]0.0374[/C][C]-0.0488[/C][C]0.0041[/C][C]0.1442[/C][C]0.012[/C][C]0.1096[/C][/ROW]
[ROW][C]61[/C][C]0.0342[/C][C]-0.1204[/C][C]0.01[/C][C]1.1111[/C][C]0.0926[/C][C]0.3043[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4042&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4042&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
500.0149-0.00161e-042e-0400.0039
510.0211-0.01260.00110.01079e-040.0299
520.0236-0.07920.00660.48590.04050.2012
530.0248-0.08230.00690.50250.04190.2046
540.0252-0.11510.00961.0030.08360.2891
550.0255-0.08680.00720.59210.04930.2221
560.0276-0.09740.00810.74460.0620.2491
570.03-0.11480.00960.99720.08310.2883
580.03560.01029e-040.00635e-040.0228
590.0371-0.00434e-040.00111e-040.0095
600.0374-0.04880.00410.14420.0120.1096
610.0342-0.12040.011.11110.09260.3043



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