<SPAN STYLE="font-family: Courier New"></SPAN><SPAN STYLE="font-family: Courier New">ECONOMETRICS LABORATORY MANUAL*</SPAN>

 

<SPAN STYLE="font-family: Courier New">EViews Version</SPAN>

<SPAN STYLE="font-family: Courier New">Summer 2004Su</SPAN>

Fall 2006



<SPAN STYLE="font-family: Courier New">by</SPAN>



<SPAN STYLE="font-family: Courier New">Robert F. McNown</SPAN>

 

Fulbright Lecturer<SPAN STYLE="font-family: Courier New"></SPAN>

National Economics University, Hanoi<SPAN STYLE="font-family: Courier New"></SPAN>

 

Professor

<SPAN STYLE="font-family: Courier New">Department of Economics</SPAN>

<SPAN STYLE="font-family: Courier New">University of Colorado at Boulder</SPAN>







<SPAN STYLE="font-family: Courier New"></SPAN>


<SPAN STYLE="font-family: Courier New"></SPAN>




<SPAN STYLE="font-family: Courier New"></SPAN>

<SPAN STYLE="font-family: Courier New">INTRODUCTION TO EVIEWS </SPAN>

<SPAN STYLE="font-family: Courier New">1. Introduction </SPAN>

<SPAN STYLE="font-family: Courier New">This lab manual is designed to aid you in the implementation of several applied regression experiments, which will demonstrate the problems one often encounters in real econometric practice. The experiments illustrate the detection of various problems and their treatment and also are suggestive of the wide applicability of econometric methods. </SPAN>

<SPAN STYLE="font-family: Courier New">In the statistical analysis in this course, we will employ a statistical program called Econometric Views (EViews). This program is widely used in econometrics throughout the world, as it is easy to use and quite suited to the demands of econometric analysis.

</SPAN>

<SPAN STYLE="font-family: Courier New">2. EViews </SPAN>

<SPAN STYLE="font-family: Courier New">EViews is one of a number of statistical packages available today. Any of these packages enables the user to do a variety of statistical analyses without requiring the knowledge of a programming language. EViews accepts instructions from the user in a Windows environment. Eviews then translates these instructions into a form that is usable by the computer. EViews is employed in this econometrics laboratory primarily because it is designed to carry out tasks that are of specialized interest to econometricians. The basic tool of analysis in EViews is regression, the most widely used tool in empirical economic analysis. Regression analysis is built around the method of ordinary least squares (OLS), but extensions of this technique are also available with EViews. In addition, EViews includes tools useful in analyzing time series data, such as those needed to estimate ARIMA and vector autoregressive models. EViews also offers convenient data manipulation features for use in conjunction with regression analysis. Many of these features will be introduced as we proceed through the lab experiments. </SPAN>

                As you work through the exercises in this manual you will be introduced to a number of statistical routines and the Eviews instructions to implement these procedures. For more information on these procedures, you may consult the Users Guide under the Eviews Help menu. The Users Guide is a large pdf file containing detailed instructions on all the routines available in Eviews, as well as some notes on the econometric theory related to these procedures. If at any time this Lab Manual does not adequately describe some test or estimation method, you can rely on the Users Guide for more information. The Eviews Help Topics index is a more limited source of information on Eviews procedures.

               

<SPAN STYLE="font-family: Courier New">3. Experiment I: EViews Basics </SPAN>

<SPAN STYLE="font-family: Courier New">As you work through these experiments, you will be guided through the implementation of Eviews, learning the program and the econometric procedures as you go. Most experiments will include instructions for specific computer output or exercises that must be submitted to your instructor.

 

<SPAN STYLE="font-family: Courier New">A. Loading a data file. </SPAN>

<SPAN STYLE="font-family: Courier New">The best way to learn Eviews is to work a basic exercise that will introduce the principles of the program. You will work with the data file we will call PINKHAM-dta containing observations on advertising expenditures (ADV) and sales (SALES) for the Lydia Pinkham Company. The data file has an ASCII or text format. Each observation on both variables is listed on a separate line (a format referred to as 'organized by observations' or 'organized by columns'). Since each data entry is separated by at least one blank space, the data may be read as 'free format.' In EViews each variable is referred to as a series. The data set in Experiment I contains 54 annual observations running from 1907 through 1960 for each of the two series.</SPAN>

<SPAN STYLE="font-family: Courier New">The data are saved on Robert McNown’s internet page: http://spot.colorado.edu/~mcnownr/, under the item labeled “Eviews exercises”.Locate and click on the item labeled Pinkham Data. The data will appear on the screen. With the mouse highlight the entire set of data entries, scrolling all the way to the bottom of the file. Then click on Edit (at the top of the screen) and Copy. Then minimize this screen, using the '-' symbol at the upper right.

Open a text editor such as WordPad and paste the data into this editor. Then save the file as a text file (Save As command) on your flash drive or some other location where you can find it. Give the file a name such as pinkham-dta.</SPAN>

<SPAN STYLE="font-family: Courier New">Now you should start up EViews on the PC. From the desktop click on "Start" , then "Programs", then "EViews" and then double-click on Eviews within this menu. The Eviews main menu will be displayed at the top of the screen. <SPAN STYLE="font-family: Courier New">A message at the bottom says “WF=none” indicating there is no workfile in the Eviews memory, so you need to create or open one. A workfile is held in memory during a EViews session and contains all of the data used in a session, including the initial data loaded into the work file and any transformations of the data. A work file may contain other 'objects' such as tables, graphs, equations, or systems of equations created during your Eviews session. You will be shown later how to save a workfile for further analysis during a later session. </SPAN>

<SPAN STYLE="font-family: Courier New">On the menu bar at the top of the screen, click on File to open the File menu, and choose New, then Workfile. You should then supply the information requested by the dialog box that appears: Start Date (1907), End Date (1960), frequency (annual data). Now click on OK, and you will see two empty objects have been created in your new workfile that Eviews will fill later when running regressions. Eviews is now ready to receive the data. </SPAN>

<SPAN STYLE="font-family: Courier New">The Pinkham data have been saved in ASCII (text) format, which is not the standard Eviews uses. Such files need to be Imported, so from the Workfile menu bar, select Proc, then Import, and Read Text-Lotus-Excel, to reveal another dialog box. Select the Drive and folder where your data are stored, and click on the filename you have used for the data (pinkham-dta). Then click OK to get another dialog box. In the upper left box enter the names for the series (ADV SALES). The order of the names here must match the order in your data file. The names at this point are arbitrary, but you will have to be consistent in your use of these names in the future. Make sure there is a check in the box that says "treat multiple delimiters as one." This means that several repeated spaces may separate different data entries, so Eviews will skip over all adjacent spaces until it finds the next entry. The box labeled "Data ordered in columns" should also be checked. The remaining default entries should be correct. Then hit the OK box, and the data will be loaded. </SPAN>

<SPAN STYLE="font-family: Courier New">After loading the data it is always a good idea to examine the data (i) to make sure Eviews has loaded the data correctly and (ii) to check for errors in the data. While you are still in the Workfile menu, double-click on ADV and make sure there are no missing entries (indicated by “NA”). Do the same for SALES. To confirm that the data have been correctly loaded, the 1910 observations are 543 for ADV and 976 for SALES. If your data are not correct, you need to reload the data by carefully redoing each step in the previous paragraph. </SPAN>

<SPAN STYLE="font-family: Courier New">To further check that the data are reasonable, you will graph the two series. On the Workfile toolbar, select Objects/New Object/Graph and hit OK. Then enter the names of the two series (ADV SALES) and hit OK, and the two series are displayed in a single graph. Make sure there is no miscoding of the data, as indicated by an outlier.</SPAN>

<SPAN STYLE="font-family: Courier New">Print the graph by hitting the Print tab on the menu bar. </SPAN>

<SPAN STYLE="font-family: Courier New"></SPAN>

<SPAN STYLE="font-family: Courier New">B. Transformations and Simple Regression </SPAN>

<SPAN STYLE="font-family: Courier New">Now minimize the current window by clicking on the box with the "-" sign near the top right corner of the top window. You want to return to the Workfile window (it will say "Workfile: untitled" at the top). You may need to minimize repeatedly until this window appears. You can create transformations of your original data by pressing the Genr button on the toolbar. A dialog box appears, where you can type a formula. For example, create the new series LADV equal to the natural logarithm of ADV by entering the formula </SPAN>

<SPAN STYLE="font-family: Courier New">LADV = LOG(ADV) </SPAN>



<SPAN STYLE="font-family: Courier New">and hitting OK. Do the same for LSALES:

 

LSALES = LOG(SALES)

 

Create also the first differences (or changes from one year to the next) of the logs with </SPAN>



<SPAN STYLE="font-family: Courier New">DLADV = D(LADV) </SPAN>

<SPAN STYLE="font-family: Courier New">DLSALES=D(LSALES) </SPAN>



<SPAN STYLE="font-family: Courier New">D( ) is the differencing operator in Eviews. Notice that in taking first differences, the obseration for 1907 is undefined. Eviews will generally keep track of this missing observation and change the sample appropriately when you set up a regression or other analysis. The Genr routines allow a large number of transformations and formulas to be computed, and we will learn these as they become useful. </SPAN>

<SPAN STYLE="font-family: Courier New">To perform a basic regression, return to the main menu by minimizing any windows that overlay the main window. Then choose Object,  New Object, Equation, click on OK, and the Equation Specification dialog box appears. Type into the box the equation to be estimated, with SALES as the dependent variable, a constant term (C) and ADV as regressors: </SPAN>



<SPAN STYLE="font-family: Courier New">SALES C ADV </SPAN>


To specify a regression equation in Eviews, the dependent variable (SALES in this case) must always appear first, and the explanatory variables can be listed in any order after that. The C must always be explicitly included or the intercept (constant term) will be omitted. This usually results in very disappointing regression results. <SPAN STYLE="font-family: Courier New">Make sure the sample is appropriate (1907 1960) and Least Squares is indicated. Then click on OK. The specified equation will be estimated and displayed. If everything has gone correctly the estimated slope coefficient (on ADV) should be  1.434588</SPAN>

 

<SPAN STYLE="font-family: Courier New">Print the results with the Print button. </SPAN>

 

<SPAN STYLE="font-family: Courier New">Let's also estimate the model in differenced-log form by again choosing Object/New object/Equation and typing into the equation box:</SPAN>



<SPAN STYLE="font-family: Courier New">DLSALES C DLADV </SPAN>



<SPAN STYLE="font-family: Courier New">where you should set the sample to begin in 1908. Actually, if you don't reset the sample, EView will recognize the missing observations and drop 1907 automatically. If everything has been done correctly, the slope coefficient should be 0.325877.

 

<SPAN STYLE="font-family: Courier New">Print this result also. </SPAN>


You can save any equations you have created by choosing the “name” option from the equation window toolbar. Then give your equation a name, such as diff_logs (Eviews does not like names with some special characters, such as - ).</SPAN>



<SPAN STYLE="font-family: Courier New">Finally, shut down this EViews session by clicking on the boxed "x" at the top right corner of the screen. You will be asked if you want to save any information from your session. I suggest you save the workfile, naming it PINKHAM (Eviews will supply the extension), and writing it to the drive containing your flash drive. In the future you will be able to load this workfile with any objects you have created and saved in this workfile. To do so, begin the Eviews program, and select File/Open/Eviews workfile, and find the directory and folder where pinkham.wf1 has been saved. Then double click on the pinkham.wf1 filename, and the saved workfile will be loaded.



<SPAN STYLE="font-family: Courier New">Submit the three outputs to your instructor.</SPAN>