Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 08 Dec 2007 05:24:01 -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/08/t1197115839lhxlfb0nxjkqs14.htm/, Retrieved Sun, 28 Apr 2024 23:33:01 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2912, Retrieved Sun, 28 Apr 2024 23:33:01 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact234
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Opdracht 6 Questi...] [2007-12-08 12:24:01] [cb172450b25aceeff04d58e88e905157] [Current]
Feedback Forum

Post a new message
Dataseries X:
2,6
2,5
2,5
1,6
1,4
0,8
1,1
1,3
1,2
1,3
1,1
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
1,7
2,4
2
2,1
2
1,8
2,7
2,3
1,9
2
2,3
2,8
2,4
2,3
2,7
2,7
2,9
3
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
2,1




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2912&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2912&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2912&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 time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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.9-------
372-------
382.3-------
392.8-------
402.4-------
412.3-------
422.7-------
432.7-------
442.9-------
453-------
462.2-------
472.3-------
482.8-------
492.82.91832.37453.46220.33490.66510.99950.6651
502.82.64691.85993.43390.35150.35150.80620.3515
512.22.33571.38063.29090.39030.17040.17040.1704
522.62.48891.38043.59730.42210.69530.56240.2911
532.82.43421.19853.66990.28090.39630.58430.2809
542.52.230.87393.58610.34820.2050.24850.205
552.42.15340.69043.61640.37060.32120.2320.1932
562.31.93050.36523.49580.32180.27830.11240.1381
571.91.95310.29383.61240.4750.3410.10810.1586
581.72.15070.40093.90050.30680.61060.4780.2335
5922.19310.35854.02770.41830.70080.45450.2584
602.12.03050.11383.94720.47170.51240.21570.2157

\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.9 & - & - & - & - & - & - & - \tabularnewline
37 & 2 & - & - & - & - & - & - & - \tabularnewline
38 & 2.3 & - & - & - & - & - & - & - \tabularnewline
39 & 2.8 & - & - & - & - & - & - & - \tabularnewline
40 & 2.4 & - & - & - & - & - & - & - \tabularnewline
41 & 2.3 & - & - & - & - & - & - & - \tabularnewline
42 & 2.7 & - & - & - & - & - & - & - \tabularnewline
43 & 2.7 & - & - & - & - & - & - & - \tabularnewline
44 & 2.9 & - & - & - & - & - & - & - \tabularnewline
45 & 3 & - & - & - & - & - & - & - \tabularnewline
46 & 2.2 & - & - & - & - & - & - & - \tabularnewline
47 & 2.3 & - & - & - & - & - & - & - \tabularnewline
48 & 2.8 & - & - & - & - & - & - & - \tabularnewline
49 & 2.8 & 2.9183 & 2.3745 & 3.4622 & 0.3349 & 0.6651 & 0.9995 & 0.6651 \tabularnewline
50 & 2.8 & 2.6469 & 1.8599 & 3.4339 & 0.3515 & 0.3515 & 0.8062 & 0.3515 \tabularnewline
51 & 2.2 & 2.3357 & 1.3806 & 3.2909 & 0.3903 & 0.1704 & 0.1704 & 0.1704 \tabularnewline
52 & 2.6 & 2.4889 & 1.3804 & 3.5973 & 0.4221 & 0.6953 & 0.5624 & 0.2911 \tabularnewline
53 & 2.8 & 2.4342 & 1.1985 & 3.6699 & 0.2809 & 0.3963 & 0.5843 & 0.2809 \tabularnewline
54 & 2.5 & 2.23 & 0.8739 & 3.5861 & 0.3482 & 0.205 & 0.2485 & 0.205 \tabularnewline
55 & 2.4 & 2.1534 & 0.6904 & 3.6164 & 0.3706 & 0.3212 & 0.232 & 0.1932 \tabularnewline
56 & 2.3 & 1.9305 & 0.3652 & 3.4958 & 0.3218 & 0.2783 & 0.1124 & 0.1381 \tabularnewline
57 & 1.9 & 1.9531 & 0.2938 & 3.6124 & 0.475 & 0.341 & 0.1081 & 0.1586 \tabularnewline
58 & 1.7 & 2.1507 & 0.4009 & 3.9005 & 0.3068 & 0.6106 & 0.478 & 0.2335 \tabularnewline
59 & 2 & 2.1931 & 0.3585 & 4.0277 & 0.4183 & 0.7008 & 0.4545 & 0.2584 \tabularnewline
60 & 2.1 & 2.0305 & 0.1138 & 3.9472 & 0.4717 & 0.5124 & 0.2157 & 0.2157 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2912&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.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]2.3[/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.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]2.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]2.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]2.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]2.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]2.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]2.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]2.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]2.8[/C][C]2.9183[/C][C]2.3745[/C][C]3.4622[/C][C]0.3349[/C][C]0.6651[/C][C]0.9995[/C][C]0.6651[/C][/ROW]
[ROW][C]50[/C][C]2.8[/C][C]2.6469[/C][C]1.8599[/C][C]3.4339[/C][C]0.3515[/C][C]0.3515[/C][C]0.8062[/C][C]0.3515[/C][/ROW]
[ROW][C]51[/C][C]2.2[/C][C]2.3357[/C][C]1.3806[/C][C]3.2909[/C][C]0.3903[/C][C]0.1704[/C][C]0.1704[/C][C]0.1704[/C][/ROW]
[ROW][C]52[/C][C]2.6[/C][C]2.4889[/C][C]1.3804[/C][C]3.5973[/C][C]0.4221[/C][C]0.6953[/C][C]0.5624[/C][C]0.2911[/C][/ROW]
[ROW][C]53[/C][C]2.8[/C][C]2.4342[/C][C]1.1985[/C][C]3.6699[/C][C]0.2809[/C][C]0.3963[/C][C]0.5843[/C][C]0.2809[/C][/ROW]
[ROW][C]54[/C][C]2.5[/C][C]2.23[/C][C]0.8739[/C][C]3.5861[/C][C]0.3482[/C][C]0.205[/C][C]0.2485[/C][C]0.205[/C][/ROW]
[ROW][C]55[/C][C]2.4[/C][C]2.1534[/C][C]0.6904[/C][C]3.6164[/C][C]0.3706[/C][C]0.3212[/C][C]0.232[/C][C]0.1932[/C][/ROW]
[ROW][C]56[/C][C]2.3[/C][C]1.9305[/C][C]0.3652[/C][C]3.4958[/C][C]0.3218[/C][C]0.2783[/C][C]0.1124[/C][C]0.1381[/C][/ROW]
[ROW][C]57[/C][C]1.9[/C][C]1.9531[/C][C]0.2938[/C][C]3.6124[/C][C]0.475[/C][C]0.341[/C][C]0.1081[/C][C]0.1586[/C][/ROW]
[ROW][C]58[/C][C]1.7[/C][C]2.1507[/C][C]0.4009[/C][C]3.9005[/C][C]0.3068[/C][C]0.6106[/C][C]0.478[/C][C]0.2335[/C][/ROW]
[ROW][C]59[/C][C]2[/C][C]2.1931[/C][C]0.3585[/C][C]4.0277[/C][C]0.4183[/C][C]0.7008[/C][C]0.4545[/C][C]0.2584[/C][/ROW]
[ROW][C]60[/C][C]2.1[/C][C]2.0305[/C][C]0.1138[/C][C]3.9472[/C][C]0.4717[/C][C]0.5124[/C][C]0.2157[/C][C]0.2157[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2912&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2912&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.9-------
372-------
382.3-------
392.8-------
402.4-------
412.3-------
422.7-------
432.7-------
442.9-------
453-------
462.2-------
472.3-------
482.8-------
492.82.91832.37453.46220.33490.66510.99950.6651
502.82.64691.85993.43390.35150.35150.80620.3515
512.22.33571.38063.29090.39030.17040.17040.1704
522.62.48891.38043.59730.42210.69530.56240.2911
532.82.43421.19853.66990.28090.39630.58430.2809
542.52.230.87393.58610.34820.2050.24850.205
552.42.15340.69043.61640.37060.32120.2320.1932
562.31.93050.36523.49580.32180.27830.11240.1381
571.91.95310.29383.61240.4750.3410.10810.1586
581.72.15070.40093.90050.30680.61060.4780.2335
5922.19310.35854.02770.41830.70080.45450.2584
602.12.03050.11383.94720.47170.51240.21570.2157







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0951-0.04050.00340.0140.00120.0342
500.15170.05780.00480.02340.0020.0442
510.2086-0.05810.00480.01840.00150.0392
520.22720.04470.00370.01230.0010.0321
530.2590.15030.01250.13380.01110.1056
540.31030.12110.01010.07290.00610.0779
550.34660.11450.00950.06080.00510.0712
560.41370.19140.01590.13650.01140.1067
570.4335-0.02720.00230.00282e-040.0153
580.4151-0.20960.01750.20310.01690.1301
590.4268-0.0880.00730.03730.00310.0557
600.48160.03420.00290.00484e-040.0201

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0951 & -0.0405 & 0.0034 & 0.014 & 0.0012 & 0.0342 \tabularnewline
50 & 0.1517 & 0.0578 & 0.0048 & 0.0234 & 0.002 & 0.0442 \tabularnewline
51 & 0.2086 & -0.0581 & 0.0048 & 0.0184 & 0.0015 & 0.0392 \tabularnewline
52 & 0.2272 & 0.0447 & 0.0037 & 0.0123 & 0.001 & 0.0321 \tabularnewline
53 & 0.259 & 0.1503 & 0.0125 & 0.1338 & 0.0111 & 0.1056 \tabularnewline
54 & 0.3103 & 0.1211 & 0.0101 & 0.0729 & 0.0061 & 0.0779 \tabularnewline
55 & 0.3466 & 0.1145 & 0.0095 & 0.0608 & 0.0051 & 0.0712 \tabularnewline
56 & 0.4137 & 0.1914 & 0.0159 & 0.1365 & 0.0114 & 0.1067 \tabularnewline
57 & 0.4335 & -0.0272 & 0.0023 & 0.0028 & 2e-04 & 0.0153 \tabularnewline
58 & 0.4151 & -0.2096 & 0.0175 & 0.2031 & 0.0169 & 0.1301 \tabularnewline
59 & 0.4268 & -0.088 & 0.0073 & 0.0373 & 0.0031 & 0.0557 \tabularnewline
60 & 0.4816 & 0.0342 & 0.0029 & 0.0048 & 4e-04 & 0.0201 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2912&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.0951[/C][C]-0.0405[/C][C]0.0034[/C][C]0.014[/C][C]0.0012[/C][C]0.0342[/C][/ROW]
[ROW][C]50[/C][C]0.1517[/C][C]0.0578[/C][C]0.0048[/C][C]0.0234[/C][C]0.002[/C][C]0.0442[/C][/ROW]
[ROW][C]51[/C][C]0.2086[/C][C]-0.0581[/C][C]0.0048[/C][C]0.0184[/C][C]0.0015[/C][C]0.0392[/C][/ROW]
[ROW][C]52[/C][C]0.2272[/C][C]0.0447[/C][C]0.0037[/C][C]0.0123[/C][C]0.001[/C][C]0.0321[/C][/ROW]
[ROW][C]53[/C][C]0.259[/C][C]0.1503[/C][C]0.0125[/C][C]0.1338[/C][C]0.0111[/C][C]0.1056[/C][/ROW]
[ROW][C]54[/C][C]0.3103[/C][C]0.1211[/C][C]0.0101[/C][C]0.0729[/C][C]0.0061[/C][C]0.0779[/C][/ROW]
[ROW][C]55[/C][C]0.3466[/C][C]0.1145[/C][C]0.0095[/C][C]0.0608[/C][C]0.0051[/C][C]0.0712[/C][/ROW]
[ROW][C]56[/C][C]0.4137[/C][C]0.1914[/C][C]0.0159[/C][C]0.1365[/C][C]0.0114[/C][C]0.1067[/C][/ROW]
[ROW][C]57[/C][C]0.4335[/C][C]-0.0272[/C][C]0.0023[/C][C]0.0028[/C][C]2e-04[/C][C]0.0153[/C][/ROW]
[ROW][C]58[/C][C]0.4151[/C][C]-0.2096[/C][C]0.0175[/C][C]0.2031[/C][C]0.0169[/C][C]0.1301[/C][/ROW]
[ROW][C]59[/C][C]0.4268[/C][C]-0.088[/C][C]0.0073[/C][C]0.0373[/C][C]0.0031[/C][C]0.0557[/C][/ROW]
[ROW][C]60[/C][C]0.4816[/C][C]0.0342[/C][C]0.0029[/C][C]0.0048[/C][C]4e-04[/C][C]0.0201[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2912&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2912&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.0951-0.04050.00340.0140.00120.0342
500.15170.05780.00480.02340.0020.0442
510.2086-0.05810.00480.01840.00150.0392
520.22720.04470.00370.01230.0010.0321
530.2590.15030.01250.13380.01110.1056
540.31030.12110.01010.07290.00610.0779
550.34660.11450.00950.06080.00510.0712
560.41370.19140.01590.13650.01140.1067
570.4335-0.02720.00230.00282e-040.0153
580.4151-0.20960.01750.20310.01690.1301
590.4268-0.0880.00730.03730.00310.0557
600.48160.03420.00290.00484e-040.0201



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