1. What does Eviews look like? -...

27
1. What does Eviews look like? 2. Create a workfile Menu operation: File---New---Workfile Click and yields the following window:

Transcript of 1. What does Eviews look like? -...

Page 1: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

1. What does Eviews look like?

2. Create a workfile Menu operation: File---New---Workfile

Click and yields the following window:

Page 2: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

Choose data frequency and determine the sample range according to your data:

Click “OK”, and then you successfully create a workfile as follows:

Page 3: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

3. Import data from Excel Remember to close Excel before you import the data into Eviews. To import data from your PC, do as follows:

Click and then pop out a new window as follows, find your data and choose it:

Then the window becomes as follows, choose the column you want: :

Page 4: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

The “Upper-left data cell” (B2 in our case) means the first cell in the first column that you want to input. If you input the column continuously (that is from B to F, as a example) then just input the total numbers of columns (11 as an example in our case), if you input the column discretely, then just write down the corresponding column name. After that, click “OK”, and you successfully import the data you want, as follows:

4. Data processing and descriptive statistics

Page 5: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

1) Generate a new series from an existing series Sometimes you may have to generate new data series from the existing data, for example, logarithm of a data series is often used, because the logarithm will not change the relationship between series, however it will make the series less volatile, and another example, difference of logarithm of a series equals to the growth rate of this series, so you may be interested in calculating the log difference. For doing these, use the command genr. For example, generate the log of “agdp” series as follows:

Press “Enter” key and then we get a new series named “logagdp”, as follows:

Page 6: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

And then take difference of series “logagdp” using the command d, we get the growth rate of “agdp”, as follows

Press “Enter” key and we get a new series named “growthrate” as follows:

Page 7: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

2) Graph of a series Open a series, for example, “agdp”, just double click on the series name, yields follows:

To see what the series looks like more intuitively, do as follows:

Page 8: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

And then choose the type of graph, for example, “line and symbol”, as follows:

Click “OK”, and you successfully get the graph of “agdp” as follows:

Page 9: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

3) Descriptive statistics

Click and yields the follows:

Page 10: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

5. Run regression 1) Scatter graph There are two ways to do that: the first one, using the following command: scat, for example, the scatter graph of “agdp” (Accumulative Seasonal GDP) and “inv” (Accumulative Seasonal Investment)

Page 11: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

Press the “Enter” key, yields the follows:

The second way, using the menu, first, open the two series as a group, that is, choose the two series and then right click your mouse, as follows:

And then choose graph as follows:

Page 12: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

Then the graph type, choose “scatter” as follows:

Click “OK”, yields the follows:

Page 13: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

2) Run regression There are also two ways: the first way is to use the following command: ls, which means using the OLS method to estimate the coefficients. For example, run regression of “agdp” over “inv”, as follows:

Where the “c” is the constant term in the regression equation, press “Enter” key, and yields the following estimation outcome:

Page 14: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

Maybe you are interested in the representation of the estimation outcome, then do as follows:

Click and yields:

Page 15: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

The blue-shade one is the representation of above estimation. Because the effectiveness of OLS method holds on several assumptions, among which normal distribution of residuals and un-correlation of residuals are two of most importance, so you may be interested in “residual tests” after the estimation, then do it as follows:

Choose the above one to test correlation of residuals.

Page 16: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

Choose the above one to test normality of residuals. And sometimes you have to do some coefficient tests, then do as follows:

Just choose anyone interested. And maybe you are interested in how well the estimated equation fits the actual data, then do as follows:

Page 17: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

Click and yields the follows:

You can see that in our example, the fitness is quite good. The second way to run regression is using the menu, as follows:

Page 18: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

Click and yields the follows, input the dependent variable, constant and independent variable, and then choose the estimation method, for example, LS

Click OK and yields the outcome as before:

Page 19: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

6. Forecasting Generally, we set up and estimate econometric model for three purposes: first, to explain the relationship between economic variables; second, to test the effectiveness of certain economic theoretic models; third, to forecast the future upon the current and past economic variables. So forecasting is always of interest, after estimating a econometric model, we may want to know how well such a model can forecast the future. This topic is exactly the focus this part. There are two ways of forecasting, namely “within-sample-forecasting” and “out-of-sample-forecasting”, we will introduce both. 1) within-sample-forecasting After you get the estimation outcome as before, find the menu of “forecast”, as follows:

Page 20: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

And click it, yields:

The blue-shaded one is the name of forecasting outcomes, you can change it as you like. Click “OK” and yields:

Page 21: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

There are some parameters in the right half of the panel, those parameters are used for assessing the accuracy of forecasting, generally, the less the “Bias Proportion” the better the forecasting, the larger the “Covariance Proportion” the better the forecasting. You can see that in our case, the forecasting is quite accurate. And at the same time you can find that a new series shows up in the workfile, which is the forecasting outcome, as follows:

Page 22: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

To compare this forecasting outcome with the actual data, just open these two series as a group and watch the graph, as follows:

Again you can see that the forecasting outcome is quite close to the actual one. 2) out-of-sample-forecasting Sometimes we want to forecast the unknown future by the knowledge of today and history, in econometric term, this is an out-of-sample-forecasting, since the forecasting outcome is beyond our sample range. I will show how to do this in the following.

Page 23: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

First, let’s take a sub-sample from the original sample, for example, taking the sample with range of “1994q1-2004q4” out of our original sample range “1994q1-2004q4”, achieve this by using the command smpl as follows:

Press the “Enter” key and yields:

Please pay attention to the two rows where the cursor lies, the upper one with range of “1994Q1 2004Q4” is the full sample which contains 44 observations, and the lower one with range of “1994Q1 2000Q4” is our new sample, which only contains 28 observations. Our rationale is as follows: we take this sub-sample as something we already know, we set up our

Page 24: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

regression model over this sample, and then use the estimated model to forecast the outcome within the range of “2000q1-2004q4”, which is of course out of sample in this new case, and to assess the accuracy of forecasting, we can compare this forecasting outcome to the actual data of “2000q1-2004q4”. So let’s run regression over the sample of “1994Q1 2000Q4” first, the outcome is listed as follows:

And then we carry through the forecasting, as follows:

Click and yields:

Page 25: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

Then we rename the “Forecast name” as “agdposf” and change the “Forecast sample” to “2001q1 2004q4” as follows:

Click “OK” and we get our out-of-sample forecasting outcomes as follows:

Page 26: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

Again pay attention to those parameters in the right half; you can see that it was not as good as the within-sample case. To see this more intuitively, note that a new series named “agdposf” is generated in the workfile at the same moment, see as follows:

Compare this new series to the actual one in “agdp” as follows:

Page 27: 1. What does Eviews look like? - inchoi.sogang.ac.krinchoi.sogang.ac.kr/NFUpload/...name=EViews+demo.pdf · 3. Import data from Excel Remember to close Excel before you import the

We find that it is not so bad, however, neither so good. You can practice in Room 3211, the PC-Lab for SBM students. Check the available time at http://www.bm.ust.hk/~bmlab/ Regards, Fong Xu 2007-9-21