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 computationMon, 13 Dec 2010 20:48:40 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/13/t1292273263kb3yez6ijzofn35.htm/, Retrieved Mon, 06 May 2024 16:56:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=109189, Retrieved Mon, 06 May 2024 16:56:15 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact156
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [(Partial) Autocorrelation Function] [] [2010-12-13 08:35:23] [21eff0c210342db4afbdafe426a7c254]
-   PD  [(Partial) Autocorrelation Function] [] [2010-12-13 09:29:04] [21eff0c210342db4afbdafe426a7c254]
-    D    [(Partial) Autocorrelation Function] [] [2010-12-13 10:05:17] [21eff0c210342db4afbdafe426a7c254]
- RM D      [ARIMA Forecasting] [] [2010-12-13 10:48:48] [21eff0c210342db4afbdafe426a7c254]
-   P           [ARIMA Forecasting] [] [2010-12-13 20:48:40] [81d69fb83507cea26168920232cdff1b] [Current]
Feedback Forum

Post a new message
Dataseries X:
113
95.4
86.2
111.7
97.5
99.7
111.5
91.8
86.3
88.7
95.1
105.1
104.5
89.1
82.6
102.7
91.8
94.1
103.1
93.2
91
94.3
99.4
115.7
116.8
99.8
96
115.9
109.1
117.3
109.8
112.8
110.7
100
113.3
122.4
112.5
104.2
92.5
117.2
109.3
106.1
118.8
105.3
106
102
112.9
116.5
114.8
100.5
85.4
114.6
109.9
100.7
115.5
100.7
99
102.3




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 9 seconds \tabularnewline
R Server & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109189&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]9 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109189&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109189&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 time9 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk







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[46])
34100-------
35113.3-------
36122.4-------
37112.5-------
38104.2-------
3992.5-------
40117.2-------
41109.3-------
42106.1-------
43118.8-------
44105.3-------
45106-------
46102-------
47112.9111.4948104.6301117.96070.33510.9980.29210.998
48116.5122.7608116.3946128.81270.02130.99930.54651
49114.8118.4819111.0492125.47520.1510.71070.95321
50100.5109.178598.8539118.60760.03560.12130.84960.9322
5185.4103.269491.4961113.83145e-040.69630.97720.5931
52114.6120.4788109.4734130.55990.126510.73810.9998
53109.9114.543101.3093126.39870.22140.49620.8070.9809
54100.7115.555101.4483128.11770.01020.81120.92990.9828
55115.5120.8043106.2053133.820.21220.99880.61860.9977
56100.7116.458799.8538130.9750.01670.55150.9340.9745
5799116.614898.9024131.97110.01230.97890.91230.9689
58102.3114.513895.1619131.03830.07370.96710.93110.9311

\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[46]) \tabularnewline
34 & 100 & - & - & - & - & - & - & - \tabularnewline
35 & 113.3 & - & - & - & - & - & - & - \tabularnewline
36 & 122.4 & - & - & - & - & - & - & - \tabularnewline
37 & 112.5 & - & - & - & - & - & - & - \tabularnewline
38 & 104.2 & - & - & - & - & - & - & - \tabularnewline
39 & 92.5 & - & - & - & - & - & - & - \tabularnewline
40 & 117.2 & - & - & - & - & - & - & - \tabularnewline
41 & 109.3 & - & - & - & - & - & - & - \tabularnewline
42 & 106.1 & - & - & - & - & - & - & - \tabularnewline
43 & 118.8 & - & - & - & - & - & - & - \tabularnewline
44 & 105.3 & - & - & - & - & - & - & - \tabularnewline
45 & 106 & - & - & - & - & - & - & - \tabularnewline
46 & 102 & - & - & - & - & - & - & - \tabularnewline
47 & 112.9 & 111.4948 & 104.6301 & 117.9607 & 0.3351 & 0.998 & 0.2921 & 0.998 \tabularnewline
48 & 116.5 & 122.7608 & 116.3946 & 128.8127 & 0.0213 & 0.9993 & 0.5465 & 1 \tabularnewline
49 & 114.8 & 118.4819 & 111.0492 & 125.4752 & 0.151 & 0.7107 & 0.9532 & 1 \tabularnewline
50 & 100.5 & 109.1785 & 98.8539 & 118.6076 & 0.0356 & 0.1213 & 0.8496 & 0.9322 \tabularnewline
51 & 85.4 & 103.2694 & 91.4961 & 113.8314 & 5e-04 & 0.6963 & 0.9772 & 0.5931 \tabularnewline
52 & 114.6 & 120.4788 & 109.4734 & 130.5599 & 0.1265 & 1 & 0.7381 & 0.9998 \tabularnewline
53 & 109.9 & 114.543 & 101.3093 & 126.3987 & 0.2214 & 0.4962 & 0.807 & 0.9809 \tabularnewline
54 & 100.7 & 115.555 & 101.4483 & 128.1177 & 0.0102 & 0.8112 & 0.9299 & 0.9828 \tabularnewline
55 & 115.5 & 120.8043 & 106.2053 & 133.82 & 0.2122 & 0.9988 & 0.6186 & 0.9977 \tabularnewline
56 & 100.7 & 116.4587 & 99.8538 & 130.975 & 0.0167 & 0.5515 & 0.934 & 0.9745 \tabularnewline
57 & 99 & 116.6148 & 98.9024 & 131.9711 & 0.0123 & 0.9789 & 0.9123 & 0.9689 \tabularnewline
58 & 102.3 & 114.5138 & 95.1619 & 131.0383 & 0.0737 & 0.9671 & 0.9311 & 0.9311 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109189&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[46])[/C][/ROW]
[ROW][C]34[/C][C]100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]113.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]122.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]112.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]104.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]92.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]109.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]106.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]118.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]105.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]106[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]102[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]112.9[/C][C]111.4948[/C][C]104.6301[/C][C]117.9607[/C][C]0.3351[/C][C]0.998[/C][C]0.2921[/C][C]0.998[/C][/ROW]
[ROW][C]48[/C][C]116.5[/C][C]122.7608[/C][C]116.3946[/C][C]128.8127[/C][C]0.0213[/C][C]0.9993[/C][C]0.5465[/C][C]1[/C][/ROW]
[ROW][C]49[/C][C]114.8[/C][C]118.4819[/C][C]111.0492[/C][C]125.4752[/C][C]0.151[/C][C]0.7107[/C][C]0.9532[/C][C]1[/C][/ROW]
[ROW][C]50[/C][C]100.5[/C][C]109.1785[/C][C]98.8539[/C][C]118.6076[/C][C]0.0356[/C][C]0.1213[/C][C]0.8496[/C][C]0.9322[/C][/ROW]
[ROW][C]51[/C][C]85.4[/C][C]103.2694[/C][C]91.4961[/C][C]113.8314[/C][C]5e-04[/C][C]0.6963[/C][C]0.9772[/C][C]0.5931[/C][/ROW]
[ROW][C]52[/C][C]114.6[/C][C]120.4788[/C][C]109.4734[/C][C]130.5599[/C][C]0.1265[/C][C]1[/C][C]0.7381[/C][C]0.9998[/C][/ROW]
[ROW][C]53[/C][C]109.9[/C][C]114.543[/C][C]101.3093[/C][C]126.3987[/C][C]0.2214[/C][C]0.4962[/C][C]0.807[/C][C]0.9809[/C][/ROW]
[ROW][C]54[/C][C]100.7[/C][C]115.555[/C][C]101.4483[/C][C]128.1177[/C][C]0.0102[/C][C]0.8112[/C][C]0.9299[/C][C]0.9828[/C][/ROW]
[ROW][C]55[/C][C]115.5[/C][C]120.8043[/C][C]106.2053[/C][C]133.82[/C][C]0.2122[/C][C]0.9988[/C][C]0.6186[/C][C]0.9977[/C][/ROW]
[ROW][C]56[/C][C]100.7[/C][C]116.4587[/C][C]99.8538[/C][C]130.975[/C][C]0.0167[/C][C]0.5515[/C][C]0.934[/C][C]0.9745[/C][/ROW]
[ROW][C]57[/C][C]99[/C][C]116.6148[/C][C]98.9024[/C][C]131.9711[/C][C]0.0123[/C][C]0.9789[/C][C]0.9123[/C][C]0.9689[/C][/ROW]
[ROW][C]58[/C][C]102.3[/C][C]114.5138[/C][C]95.1619[/C][C]131.0383[/C][C]0.0737[/C][C]0.9671[/C][C]0.9311[/C][C]0.9311[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109189&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109189&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[46])
34100-------
35113.3-------
36122.4-------
37112.5-------
38104.2-------
3992.5-------
40117.2-------
41109.3-------
42106.1-------
43118.8-------
44105.3-------
45106-------
46102-------
47112.9111.4948104.6301117.96070.33510.9980.29210.998
48116.5122.7608116.3946128.81270.02130.99930.54651
49114.8118.4819111.0492125.47520.1510.71070.95321
50100.5109.178598.8539118.60760.03560.12130.84960.9322
5185.4103.269491.4961113.83145e-040.69630.97720.5931
52114.6120.4788109.4734130.55990.126510.73810.9998
53109.9114.543101.3093126.39870.22140.49620.8070.9809
54100.7115.555101.4483128.11770.01020.81120.92990.9828
55115.5120.8043106.2053133.820.21220.99880.61860.9977
56100.7116.458799.8538130.9750.01670.55150.9340.9745
5799116.614898.9024131.97110.01230.97890.91230.9689
58102.3114.513895.1619131.03830.07370.96710.93110.9311







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
470.02960.012601.974600
480.0252-0.0510.031839.197720.58614.5372
490.0301-0.03110.031613.556718.2434.2712
500.0441-0.07950.043575.315632.51115.7019
510.0522-0.1730.0694319.314689.87189.4801
520.0427-0.04880.06634.560880.65338.9807
530.0528-0.04050.062421.557872.21118.4977
540.0555-0.12860.0706220.669990.76859.5272
550.055-0.04390.067728.135483.80929.1547
560.0636-0.13530.0744248.3358100.261910.0131
570.0672-0.15110.0814310.2826119.354710.925
580.0736-0.10670.0835149.1768121.839911.0381

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
47 & 0.0296 & 0.0126 & 0 & 1.9746 & 0 & 0 \tabularnewline
48 & 0.0252 & -0.051 & 0.0318 & 39.1977 & 20.5861 & 4.5372 \tabularnewline
49 & 0.0301 & -0.0311 & 0.0316 & 13.5567 & 18.243 & 4.2712 \tabularnewline
50 & 0.0441 & -0.0795 & 0.0435 & 75.3156 & 32.5111 & 5.7019 \tabularnewline
51 & 0.0522 & -0.173 & 0.0694 & 319.3146 & 89.8718 & 9.4801 \tabularnewline
52 & 0.0427 & -0.0488 & 0.066 & 34.5608 & 80.6533 & 8.9807 \tabularnewline
53 & 0.0528 & -0.0405 & 0.0624 & 21.5578 & 72.2111 & 8.4977 \tabularnewline
54 & 0.0555 & -0.1286 & 0.0706 & 220.6699 & 90.7685 & 9.5272 \tabularnewline
55 & 0.055 & -0.0439 & 0.0677 & 28.1354 & 83.8092 & 9.1547 \tabularnewline
56 & 0.0636 & -0.1353 & 0.0744 & 248.3358 & 100.2619 & 10.0131 \tabularnewline
57 & 0.0672 & -0.1511 & 0.0814 & 310.2826 & 119.3547 & 10.925 \tabularnewline
58 & 0.0736 & -0.1067 & 0.0835 & 149.1768 & 121.8399 & 11.0381 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109189&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]47[/C][C]0.0296[/C][C]0.0126[/C][C]0[/C][C]1.9746[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]48[/C][C]0.0252[/C][C]-0.051[/C][C]0.0318[/C][C]39.1977[/C][C]20.5861[/C][C]4.5372[/C][/ROW]
[ROW][C]49[/C][C]0.0301[/C][C]-0.0311[/C][C]0.0316[/C][C]13.5567[/C][C]18.243[/C][C]4.2712[/C][/ROW]
[ROW][C]50[/C][C]0.0441[/C][C]-0.0795[/C][C]0.0435[/C][C]75.3156[/C][C]32.5111[/C][C]5.7019[/C][/ROW]
[ROW][C]51[/C][C]0.0522[/C][C]-0.173[/C][C]0.0694[/C][C]319.3146[/C][C]89.8718[/C][C]9.4801[/C][/ROW]
[ROW][C]52[/C][C]0.0427[/C][C]-0.0488[/C][C]0.066[/C][C]34.5608[/C][C]80.6533[/C][C]8.9807[/C][/ROW]
[ROW][C]53[/C][C]0.0528[/C][C]-0.0405[/C][C]0.0624[/C][C]21.5578[/C][C]72.2111[/C][C]8.4977[/C][/ROW]
[ROW][C]54[/C][C]0.0555[/C][C]-0.1286[/C][C]0.0706[/C][C]220.6699[/C][C]90.7685[/C][C]9.5272[/C][/ROW]
[ROW][C]55[/C][C]0.055[/C][C]-0.0439[/C][C]0.0677[/C][C]28.1354[/C][C]83.8092[/C][C]9.1547[/C][/ROW]
[ROW][C]56[/C][C]0.0636[/C][C]-0.1353[/C][C]0.0744[/C][C]248.3358[/C][C]100.2619[/C][C]10.0131[/C][/ROW]
[ROW][C]57[/C][C]0.0672[/C][C]-0.1511[/C][C]0.0814[/C][C]310.2826[/C][C]119.3547[/C][C]10.925[/C][/ROW]
[ROW][C]58[/C][C]0.0736[/C][C]-0.1067[/C][C]0.0835[/C][C]149.1768[/C][C]121.8399[/C][C]11.0381[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109189&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109189&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
470.02960.012601.974600
480.0252-0.0510.031839.197720.58614.5372
490.0301-0.03110.031613.556718.2434.2712
500.0441-0.07950.043575.315632.51115.7019
510.0522-0.1730.0694319.314689.87189.4801
520.0427-0.04880.06634.560880.65338.9807
530.0528-0.04050.062421.557872.21118.4977
540.0555-0.12860.0706220.669990.76859.5272
550.055-0.04390.067728.135483.80929.1547
560.0636-0.13530.0744248.3358100.261910.0131
570.0672-0.15110.0814310.2826119.354710.925
580.0736-0.10670.0835149.1768121.839911.0381



Parameters (Session):
par1 = 12 ; par2 = 2.0 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 2 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 2.0 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 2 ; par8 = 2 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')