Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 13 Dec 2007 11:20:30 -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/13/t1197569106kxls5ot5x6t1r3h.htm/, Retrieved Sun, 05 May 2024 16:18:34 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3682, Retrieved Sun, 05 May 2024 16:18:34 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordss0650550 s0650062
Estimated Impact175
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Workshop 6] [2007-12-13 18:20:30] [ab924f39c1cc7a5dd22761038b10db61] [Current]
Feedback Forum

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




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3682&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 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[48])
362.3-------
372.8-------
382.8-------
392.8-------
402.2-------
412.6-------
422.8-------
432.5-------
442.4-------
452.3-------
461.9-------
471.7-------
482-------
492.11.65561.12282.18850.05110.102600.1026
501.71.65750.93032.38470.45440.11650.0010.178
511.81.65730.77622.53850.37550.46220.00550.223
521.82.03951.02773.05130.32130.67870.37790.5305
531.81.78470.65732.91220.48940.48940.07820.3541
541.31.65730.4252.88970.28490.41030.03460.2929
551.31.84840.51953.17730.20930.79070.16830.4116
561.31.91210.49323.33110.19890.80110.25020.4517
571.21.97580.47223.47940.15590.81080.33630.4874
581.42.23060.64683.81430.1520.89890.65880.6123
592.22.3580.69794.0180.4260.8710.78140.6637
602.92.16690.43393.89980.20350.48510.57490.5749

\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 & 2.3 & - & - & - & - & - & - & - \tabularnewline
37 & 2.8 & - & - & - & - & - & - & - \tabularnewline
38 & 2.8 & - & - & - & - & - & - & - \tabularnewline
39 & 2.8 & - & - & - & - & - & - & - \tabularnewline
40 & 2.2 & - & - & - & - & - & - & - \tabularnewline
41 & 2.6 & - & - & - & - & - & - & - \tabularnewline
42 & 2.8 & - & - & - & - & - & - & - \tabularnewline
43 & 2.5 & - & - & - & - & - & - & - \tabularnewline
44 & 2.4 & - & - & - & - & - & - & - \tabularnewline
45 & 2.3 & - & - & - & - & - & - & - \tabularnewline
46 & 1.9 & - & - & - & - & - & - & - \tabularnewline
47 & 1.7 & - & - & - & - & - & - & - \tabularnewline
48 & 2 & - & - & - & - & - & - & - \tabularnewline
49 & 2.1 & 1.6556 & 1.1228 & 2.1885 & 0.0511 & 0.1026 & 0 & 0.1026 \tabularnewline
50 & 1.7 & 1.6575 & 0.9303 & 2.3847 & 0.4544 & 0.1165 & 0.001 & 0.178 \tabularnewline
51 & 1.8 & 1.6573 & 0.7762 & 2.5385 & 0.3755 & 0.4622 & 0.0055 & 0.223 \tabularnewline
52 & 1.8 & 2.0395 & 1.0277 & 3.0513 & 0.3213 & 0.6787 & 0.3779 & 0.5305 \tabularnewline
53 & 1.8 & 1.7847 & 0.6573 & 2.9122 & 0.4894 & 0.4894 & 0.0782 & 0.3541 \tabularnewline
54 & 1.3 & 1.6573 & 0.425 & 2.8897 & 0.2849 & 0.4103 & 0.0346 & 0.2929 \tabularnewline
55 & 1.3 & 1.8484 & 0.5195 & 3.1773 & 0.2093 & 0.7907 & 0.1683 & 0.4116 \tabularnewline
56 & 1.3 & 1.9121 & 0.4932 & 3.3311 & 0.1989 & 0.8011 & 0.2502 & 0.4517 \tabularnewline
57 & 1.2 & 1.9758 & 0.4722 & 3.4794 & 0.1559 & 0.8108 & 0.3363 & 0.4874 \tabularnewline
58 & 1.4 & 2.2306 & 0.6468 & 3.8143 & 0.152 & 0.8989 & 0.6588 & 0.6123 \tabularnewline
59 & 2.2 & 2.358 & 0.6979 & 4.018 & 0.426 & 0.871 & 0.7814 & 0.6637 \tabularnewline
60 & 2.9 & 2.1669 & 0.4339 & 3.8998 & 0.2035 & 0.4851 & 0.5749 & 0.5749 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3682&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]2.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]2.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]2.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]2.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]2.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]2.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]2.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]2.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]2.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]2.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]1.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]1.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]2.1[/C][C]1.6556[/C][C]1.1228[/C][C]2.1885[/C][C]0.0511[/C][C]0.1026[/C][C]0[/C][C]0.1026[/C][/ROW]
[ROW][C]50[/C][C]1.7[/C][C]1.6575[/C][C]0.9303[/C][C]2.3847[/C][C]0.4544[/C][C]0.1165[/C][C]0.001[/C][C]0.178[/C][/ROW]
[ROW][C]51[/C][C]1.8[/C][C]1.6573[/C][C]0.7762[/C][C]2.5385[/C][C]0.3755[/C][C]0.4622[/C][C]0.0055[/C][C]0.223[/C][/ROW]
[ROW][C]52[/C][C]1.8[/C][C]2.0395[/C][C]1.0277[/C][C]3.0513[/C][C]0.3213[/C][C]0.6787[/C][C]0.3779[/C][C]0.5305[/C][/ROW]
[ROW][C]53[/C][C]1.8[/C][C]1.7847[/C][C]0.6573[/C][C]2.9122[/C][C]0.4894[/C][C]0.4894[/C][C]0.0782[/C][C]0.3541[/C][/ROW]
[ROW][C]54[/C][C]1.3[/C][C]1.6573[/C][C]0.425[/C][C]2.8897[/C][C]0.2849[/C][C]0.4103[/C][C]0.0346[/C][C]0.2929[/C][/ROW]
[ROW][C]55[/C][C]1.3[/C][C]1.8484[/C][C]0.5195[/C][C]3.1773[/C][C]0.2093[/C][C]0.7907[/C][C]0.1683[/C][C]0.4116[/C][/ROW]
[ROW][C]56[/C][C]1.3[/C][C]1.9121[/C][C]0.4932[/C][C]3.3311[/C][C]0.1989[/C][C]0.8011[/C][C]0.2502[/C][C]0.4517[/C][/ROW]
[ROW][C]57[/C][C]1.2[/C][C]1.9758[/C][C]0.4722[/C][C]3.4794[/C][C]0.1559[/C][C]0.8108[/C][C]0.3363[/C][C]0.4874[/C][/ROW]
[ROW][C]58[/C][C]1.4[/C][C]2.2306[/C][C]0.6468[/C][C]3.8143[/C][C]0.152[/C][C]0.8989[/C][C]0.6588[/C][C]0.6123[/C][/ROW]
[ROW][C]59[/C][C]2.2[/C][C]2.358[/C][C]0.6979[/C][C]4.018[/C][C]0.426[/C][C]0.871[/C][C]0.7814[/C][C]0.6637[/C][/ROW]
[ROW][C]60[/C][C]2.9[/C][C]2.1669[/C][C]0.4339[/C][C]3.8998[/C][C]0.2035[/C][C]0.4851[/C][C]0.5749[/C][C]0.5749[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3682&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3682&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])
362.3-------
372.8-------
382.8-------
392.8-------
402.2-------
412.6-------
422.8-------
432.5-------
442.4-------
452.3-------
461.9-------
471.7-------
482-------
492.11.65561.12282.18850.05110.102600.1026
501.71.65750.93032.38470.45440.11650.0010.178
511.81.65730.77622.53850.37550.46220.00550.223
521.82.03951.02773.05130.32130.67870.37790.5305
531.81.78470.65732.91220.48940.48940.07820.3541
541.31.65730.4252.88970.28490.41030.03460.2929
551.31.84840.51953.17730.20930.79070.16830.4116
561.31.91210.49323.33110.19890.80110.25020.4517
571.21.97580.47223.47940.15590.81080.33630.4874
581.42.23060.64683.81430.1520.89890.65880.6123
592.22.3580.69794.0180.4260.8710.78140.6637
602.92.16690.43393.89980.20350.48510.57490.5749







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.16420.26840.02240.19750.01650.1283
500.22380.02570.00210.00182e-040.0123
510.27130.08610.00720.02040.00170.0412
520.2531-0.11740.00980.05740.00480.0691
530.32230.00867e-042e-0400.0044
540.3794-0.21560.0180.12770.01060.1032
550.3668-0.29670.02470.30080.02510.1583
560.3786-0.32010.02670.37470.03120.1767
570.3883-0.39270.03270.60190.05020.224
580.3623-0.37240.0310.68990.05750.2398
590.3592-0.0670.00560.0250.00210.0456
600.4080.33830.02820.53750.04480.2116

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1642 & 0.2684 & 0.0224 & 0.1975 & 0.0165 & 0.1283 \tabularnewline
50 & 0.2238 & 0.0257 & 0.0021 & 0.0018 & 2e-04 & 0.0123 \tabularnewline
51 & 0.2713 & 0.0861 & 0.0072 & 0.0204 & 0.0017 & 0.0412 \tabularnewline
52 & 0.2531 & -0.1174 & 0.0098 & 0.0574 & 0.0048 & 0.0691 \tabularnewline
53 & 0.3223 & 0.0086 & 7e-04 & 2e-04 & 0 & 0.0044 \tabularnewline
54 & 0.3794 & -0.2156 & 0.018 & 0.1277 & 0.0106 & 0.1032 \tabularnewline
55 & 0.3668 & -0.2967 & 0.0247 & 0.3008 & 0.0251 & 0.1583 \tabularnewline
56 & 0.3786 & -0.3201 & 0.0267 & 0.3747 & 0.0312 & 0.1767 \tabularnewline
57 & 0.3883 & -0.3927 & 0.0327 & 0.6019 & 0.0502 & 0.224 \tabularnewline
58 & 0.3623 & -0.3724 & 0.031 & 0.6899 & 0.0575 & 0.2398 \tabularnewline
59 & 0.3592 & -0.067 & 0.0056 & 0.025 & 0.0021 & 0.0456 \tabularnewline
60 & 0.408 & 0.3383 & 0.0282 & 0.5375 & 0.0448 & 0.2116 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3682&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.1642[/C][C]0.2684[/C][C]0.0224[/C][C]0.1975[/C][C]0.0165[/C][C]0.1283[/C][/ROW]
[ROW][C]50[/C][C]0.2238[/C][C]0.0257[/C][C]0.0021[/C][C]0.0018[/C][C]2e-04[/C][C]0.0123[/C][/ROW]
[ROW][C]51[/C][C]0.2713[/C][C]0.0861[/C][C]0.0072[/C][C]0.0204[/C][C]0.0017[/C][C]0.0412[/C][/ROW]
[ROW][C]52[/C][C]0.2531[/C][C]-0.1174[/C][C]0.0098[/C][C]0.0574[/C][C]0.0048[/C][C]0.0691[/C][/ROW]
[ROW][C]53[/C][C]0.3223[/C][C]0.0086[/C][C]7e-04[/C][C]2e-04[/C][C]0[/C][C]0.0044[/C][/ROW]
[ROW][C]54[/C][C]0.3794[/C][C]-0.2156[/C][C]0.018[/C][C]0.1277[/C][C]0.0106[/C][C]0.1032[/C][/ROW]
[ROW][C]55[/C][C]0.3668[/C][C]-0.2967[/C][C]0.0247[/C][C]0.3008[/C][C]0.0251[/C][C]0.1583[/C][/ROW]
[ROW][C]56[/C][C]0.3786[/C][C]-0.3201[/C][C]0.0267[/C][C]0.3747[/C][C]0.0312[/C][C]0.1767[/C][/ROW]
[ROW][C]57[/C][C]0.3883[/C][C]-0.3927[/C][C]0.0327[/C][C]0.6019[/C][C]0.0502[/C][C]0.224[/C][/ROW]
[ROW][C]58[/C][C]0.3623[/C][C]-0.3724[/C][C]0.031[/C][C]0.6899[/C][C]0.0575[/C][C]0.2398[/C][/ROW]
[ROW][C]59[/C][C]0.3592[/C][C]-0.067[/C][C]0.0056[/C][C]0.025[/C][C]0.0021[/C][C]0.0456[/C][/ROW]
[ROW][C]60[/C][C]0.408[/C][C]0.3383[/C][C]0.0282[/C][C]0.5375[/C][C]0.0448[/C][C]0.2116[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3682&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3682&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.16420.26840.02240.19750.01650.1283
500.22380.02570.00210.00182e-040.0123
510.27130.08610.00720.02040.00170.0412
520.2531-0.11740.00980.05740.00480.0691
530.32230.00867e-042e-0400.0044
540.3794-0.21560.0180.12770.01060.1032
550.3668-0.29670.02470.30080.02510.1583
560.3786-0.32010.02670.37470.03120.1767
570.3883-0.39270.03270.60190.05020.224
580.3623-0.37240.0310.68990.05750.2398
590.3592-0.0670.00560.0250.00210.0456
600.4080.33830.02820.53750.04480.2116



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