A NOTE ON EVIEWS Using Data Generating Process There are 5 basic interface in Eviews ; The command line, output area, menu interface,...

**A NOTE ON EVIEWS**

**Using Data Generating Process**

**There are 5 basic interface in Eviews ; The command line, output area, menu interface, the capture object and where to save files.Three interface were employed namely; command line, output area and menu.**

**Open your Eviews software or you can get one from here and if you are new to Eviews, click here to watch video on how to import data into Eviews.**

**In the menu window, click FILE >>NEW >>WORKFILE.**

**Change the frequency under DATE SPECIFICATION to monthly, start date:1970m01 and end date: 2017m12, then press OK .**

**The sample is 576 observations.**

**The objective is to test for unit root and stationarity in our series. The first thing we need to do is to create a near unit root series (y) ,trend stationary series (x) and a random walk (z) (See more on Stochastic processes).**

**To create a Near Unit Root series Y ,type in the command window**

**Smpl @first @last (OK)**

**Genr y=0 (OK)**

**Smpl @first+1 @last (OK)**

**Genr y=0.6+ 0.76*y(-1) + 3*nrnd (OK).**

**The series name y is created.**

**Note: the 'nrnd' is a normal random number and the (OK) means we pressed the 'enter' key.**

**To create a Trend Stationary series X, type in the command line**

**Smpl @first @last (OK)**

**Genr x=0 (OK)**

**Smpl @first+1 @last (OK)**

**Genr x=0.6+ 0.7*x(-1)+ 0.02*@trend + 1.6*nrnd**

**The series x is created and note that '@trend' is a time trend .**

**To create a Random Walk z ,simple type**

**Smpl @first @last (OK)**

**Genr z=0 (OK)**

**Smpl @first+1 @last (OK)**

**Genr z=0.9+z(-1)+ nrnd (OK)**

**The series x,y,z can be check . If one wishes to check the data and don't forget the data are random numbers.**

**We will examine two ways of checking for stationarity in time series data:**

**1.Graphical analysis**

**Chatfield(2004) wrote "anyone who tries to analyze a time series without plotting it first is asking for trouble". It is advisable to graph the series.**

**To graph the series " double click" the series name (x or y or z). Click VIEW>>GRAPH and (OK).**

**The graph of x and z has an upward trend while y is mean reverting . we also graph them together(open them as a group ) to check out the characteristics . Highlight the series(x,y and z), right click ,open them as a group and check the graph.**

**The graph tells us that series x is has a bit upward trend but not as much as the series z and series y moves up and down around the mean .**

**2. A formal test**

**We employed three test in this section : Augmented Dickey fuller(ADF)test ,Phillips Perron (PP)test and Kwiatkowski-Phillips-schmidt-shin(KPSS) test. Its advisable to check out the theoretical basis of unit root test (see more)**

**(i) Augmented Dickey Fuller(ADF) Test**

**Double click the series (x or y or z).**

**For series x : click VIEW>>UNIT ROOT .**

**Most econometrician uses the 'Schwarze information criterion' for the lag length . The schwarze information criterion gives more parsimonious model and Akaike information criterion gives a fitted model. So we used 'akaike information criterion' under the lag length selection. The 'test type' is Augmented Dickey fuller. Test for unit root is in 'level' .Base on the graphical representation of the x series earlier seen, it has an 'intercept and trend' ,so we click 'trend and intercept' as the test equation then (OK).**

**Interpretation:**

**Base on the test ,we will confidently reject the null hypothesis that x has a unit root. The ADF test statistics is greater than all test critical value and it has a significant p value at 1%,5% and 10% level of significance. Therefore, x is stationary .**

**For series y: click VIEW >>UNIT ROOT**

**The same thing apply to series y except that the diagram (y series) has intercept and no trend . So we click "intercept' in the test equation and press OK.**

**Interpretation:**

**We will reject the null hypothesis that y has unit root . The ADF test statistics is greater than all the test critical value and the prob value is significant at all level(1%,5% and 10%).Therefore, y is stationary .**

**For z series: click VIEW-UNIT ROOT**

**Test for unit root in 'level', lag length 'Akaike info. criterion' and ' Trend and intercept' . we used trend and intercept because the graph of series has 'intercept and trend' (Ok).**

**Interpretation:**

**From the result above ,the prob value is not significant at all level of significance and the ADF test statistics is less than all test critical value. So we fail to reject the null hypothesis that z has a unit root. Therefore, we can confidently say z is non stationary at level or I(0).**

**We check the first difference see if our random walk series z is stationary . Click VIEW>>UNIT ROOT**

**Change the 'test for unit root in 'level' to '1st difference' and OK .**

**Interpretation:**

**From the result above ,prob value is significant at level of significance and the ADF test statistics is greater than all critical values. We can confidently reject the null hypothesis that D(z) has a unit root. Therefore, z is stationary at 1st difference or I(1).**

**(ii) Phillip Perron(PP) Test**

**Go back to the output interface double click on any of the series.**

**For x series : Click VIEW>>UNIT ROOT**

**Change the test type to Phillips Perron,test for unit root in 'level' and the test equation is ' trend and intercept' as before. Click OK.**

**Interpretation:**

**The Phillips Perron test statistics is greater than all the test critical value. The prob value is significant. We reject the null hypothesis that x has a unit root . Therefore, x is stationary .**

**For y series : Click VIEW>>UNIT ROOT**

**Test type 'Phillip Perron' ,test equation ' intercept' as before and click OK.**

**Interpretation :**

**The result above shows that the p value is small(significant) and the test statistics is greater than all critical value. Therefore, we reject the null hypothesis and conclude that y is stationary.**

**For z series : Click VIEW>>UNIT ROOT**

**Test type 'PP', test for unit root in' level' ,the test equation ' trend and intercept' as before and press OK.**

**Interpretation:**

**The result above shows that the PP test statistics is less than the test critical value at 1% and greater than the test critical value 5% and 10% level of significance. The P value is significant 5% and 10%. We will reject the null hypothesis : z has a unit root. Therefore, series z is stationary.**

**(iii) Kwiatkowski-Phillips-schmidt-shin(KPSS) Test**

**This test is a stationary test . Double click the series.**

**For x series: VIEW>>UNIT ROOT**

**Change test type to Kwiatkowski-Phillips-schmidt-shin, test equation ' trend and intercept and OK.**

**Interpretation:**

**The result above shows that the KPSS test statistics is less than all the asymptotic critical value. We fail to reject the null hypothesis that x is stationary. Therefore, x series is stationary.**

**For y series: Click VIEW>>UNIT ROOT**

**Change the test equation to 'intercept' (check series y above ) .**

**Interpretation:**

**The KPSS test statistics is less than all asymptotic critical value. We fail to reject the null hypothesis that y is stationary.**

**For z series: click VIEW>>UNIT ROOT**

**Change the test equation back to 'trend and intercept' and OK.**

**Interpretation:**

**The KPSS from the above result is less than the asymptotic critical value at 1% and greater than the asymptotic critical value at 5% and 10% level of significance. We will reject the null hypothesis that z is stationary. Therefore, z is not stationary at level.**

**We can detrend the series by checking the 1st difference**

**Change the test unit root in level to '1st difference' and OK.**

**Interpretation:**

**KPSS test statistics is less than all the asymptotic critical value. We will confidently accept the null hypothesis of stationarity in z at first difference. Therefore ,z is stationary at 1st difference or I(1).**

**Result of ADF unit root test**

variable |
ADF test statistics |
Critical value at 5% level of significance |
Remarks |

x |
-9.274450 |
-3.417654 |
I(0) |

y |
-7.624866 |
-2.866356 |
I(0) |

z |
-24.59707 |
-3.47668 |
I(1) |

**Result of PP test**

variable |
PP test statistics |
Critical value at 5% level of significance |
Remarks |

x |
-9.369610 |
-3.417654 |
I(0) |

y |
-8.806358 |
-2.866348 |
I(0) |

z |
-3.486642 |
-3.417654 |
I(0) |

**Result of KPSS test**

variable |
KPSS test statistics |
Asymptotic critical value at 5% level of significance |
Remarks |

x |
0.043231 |
0.146000 |
I(0) |

y |
0.199049 |
0.463000 |
I(0) |

z |
0033628 |
0.146000 |
I(1) |

**From the table above, series z became stationary at I(1) in ADF and KPSS but at I(0) in PP test . All test should be carried out to have a confident decision.**

**The graph of a series is important because it tells us the correct specification i.e whether to include 'intercept' or ' trend and intercept' or 'none'.**

**Unit root test gives appropriate result in large sample than in small sample.**

**This exercise can be tested further by using real world data. Nigeria gross domestic product from 1960- 2016. Download here.**

**REFERENCE**

**Mahadeva, l. & Robinson, P. (2004). Unit Root Testing to Help Model Building. Centre for central Banking Studies, Bank of England.**

## COMMENTS