Statistics and Decision Making (45-731) Fall 2010


(Approx completion time: ~ 35 minutes)

This tutorial is organized in three main sections. These sections cover basic topics such as creating workfiles and generating variables, copying Eviews output into Word, importing data from Excel to Eviews and editing data. Let us start with some basic formatting Begin by launching Eviews. First, we’ll standardize some options. -Click on Options / Window and Font Options -Under “Warn on Close,” we wish to have a check mark only for programs-text. Make sure there is a check mark for this option and remove check marks for the other options. -Under “Allow Only One Untitled,” we want check marks for all except seriesmatrices-coefficients. -Click OK Next -Click on Options / Workfile Storage Defaults -Choose Double Precision -Under “Backup Files,” we wish to have a check mark. Remove check marks for other options -Click OK 1. CREATING A WORKFILE & GENERATING VARIABLES Now, we will create a workfile. -Click on File / New/ Workfile -We will create an undated workfile, so click the down arrow under Date Specification and choose Integer Date -Enter 1 for the start observation and 1000 for the end observation then click Ok. Note that the workfile window is the most important of the various windows that you can open in Eviews. To perform any analysis using Eviews, you need to have a workfile open. To generate a sample from a normal distribution: -Type “genr z=nrnd” in the white area near the top of the screen

To look at the data you generated. click Add Text -Select Center and Top -Enter a title for the diagram: “Scatter plot of y versus x” and click OK -Click Edit / Copy at the top of the workfile window. generating new variables. to illustrate labeling graphs and copying from Eviews to Word. the generation of random numbers from the normal and uniform distributions.e. viewing the data in a spreadsheet. spreadsheet and histogram). Now generate a new variable. 2. and viewing the scatter diagram. click freeze -In the new scatter diagram window. COPYING EVIEWS OUTPUT TO WORD Next. -View the scatter diagram of x and y as above -In the scatter diagram window.Statistics and Decision Making (45-731) Fall 2010 Tutorial Note that variable name “z” has appeared in your work file. double click on “z” in the workfile window -Click View / Descriptive Statistics / Histogram and Stats -Click on the x in the upper right corner of the histogram to close it. viewing descriptive statistics. -Type “genr y=x+z/10” To look at relationship between x and y. then close as before. and click OK on the resulting window -Open a Word file and click Edit / Paste (in Word) . -Hold down the ctrl key and click x and y (in that order) so that they are both highlighted in blue. we have illustrated the creation of an undated work file. -Right-click the mouse and choose Open / As group -Click View / Graph / Scatter -Click View / Descriptive Statistics / Common Sample To summarize so far. To generate a sample from the uniform distribution: -Type “genr x=rnd” in the white area near the top of the screen -Look at the data as you did for the normal distribution (i.

-Generate a new variable. IMPORTING AND EDITING DATA To import data from Excel. -Click name and enter: “Graph_x_y” -Click OK. and blank column headings -Release the left mouse button -With the pointer on the blue area. that is a product of x and z by typing “genr y=x*z” (note that this replaces previous y with new values) -Do a scatter plot of x and y as above to see the relationship of x and new y Delete the work file without saving -Click upper right-hand-corner X of the work file and click no when prompted about saving the work file 3. you must give it a name. drag the pointer across the Y. y. so return to Eviews Note that if you wish to save a graph as part of the workfile. while holding down the left mouse button. -Open Excel . Now. This concludes illustration of copying from Eviews to Word.Statistics and Decision Making (45-731) Fall 2010 Tutorial -This completes illustration of copying a graph to Word. we will illustrate copying summary statistics. You will see that the graph name is now in the workfile. right-click and choose copy -Choose formatted -Then go to your Word file and click paste. -Hold down ctrl and click on x. Now close the scatter plot. Double-clicking on the name will re-open the graph. For example. X. y. -Mark the right-most four columns by clicking the upper of the two Z’s. and z -Right-click and open as group -Choose View / Descriptive Statistics / Common Sample -Click the box in the upper-right of the spreadsheet to expand to full screen -Click the arrow at the upper-right of the window and click the arrow at the lower left of the window. and. We will now explain how to use the genr command to perform standard algebraic computations.

click File / Save As and enter file name “Cholesterol”) -Delete the workfile from the active Eviews window (click the upper-right X of the workfile) The preceding steps illustrate copying data from an Excel spreadsheet when the Excel spreadsheet contains names for the variables. 28. I suggest that you create a folder on your computer for saving work files for this course -Click on the top of your work file to make sure it is highlighted in blue -Save the workfile using file name: “Cholesterol” (i. 26. click the up arrow on the right-hand-side -Click the upper-left cell of the spreadsheet (just to the right of obs). 29. 30 Drug Y: 26. 27. right-click. choose paste -Click the upper-right X of the spreadsheet to close the spreadsheet We will now save this file. 33. 30.Statistics and Decision Making (45-731) Fall 2010 Tutorial -Create two columns of data by entering the cholesterol reduction achieved by Drugs X and Y for a sample of 16 individuals: Drug X: 29. hence the underscore _ in the above variable names) -Select these two columns and click copy -Next. We next illustrate copying data when the Excel spreadsheet does not contain variables names -Return to your Excel spreadsheet and delete the row containing the variable names -Next mark and copy the two columns of data -Create an Eviews work file with 8 observations -Click Quick / Empty Group . 32. 27. create a new undated workfile with 8 observations (proceed as described in creating the workfile above) -Click Quick / Empty Group -In the spreadsheet that opens. 32.e. 32. 36 -Use column headings drug_X and drug_Y for these two variables (note: Eviews does not permit spaces in variable names. 31. 31.

Close the spreadsheet and delete this workfile. we will illustrate editing data in a workfile. simply close the spreadsheet and re-save the workfile. and choose yes -Click the upper-right X in the spreadsheet to close it You can also rename a variable in the work file at any time by clicking on the variable to mark it. Delete this workfile without saving it.Statistics and Decision Making (45-731) Fall 2010 Tutorial -Click the upper-left cell of the spreadsheet (adjacent to the [1 under] first “obs” cell). you may do so. click enter. right-click. simply click on the appropriate cell and type in the new number. -Create a new undated workfile with 8 observations -Click Quick / Empty Group A spreadsheet opens. The preceding demonstrates copying of data when there are no variable names in the Excel file. Click the top of the spreadsheet (Note that Eviews will not allow you to change entries in your spreadsheet unless you click edit +/-) To correct an entry. and choose paste Note that Eviews automatically names the series ser01 and ser02. Then right click and choose rename. If you wish to rename the series. -Click the up arrow on the right-hand side of the spreadsheet -Click ser01 (in the cell adjacent to obs) -Type “drug_x”. and choose yes -Then type “drug_y”. you can enter variable names by clicking on the up arrow on the right-hand side of the spreadsheet and then typing in the names of the variables (You may wish to do this for practice just to be sure you know how). When corrections are completed. After typing your data. -To bring up a spreadsheet with the data for Drug X. proceed as follows. You may type your data directly into this spreadsheet just as in Excel. To correct that entry. choose open -Click edit +/. right-click. Load the work file Cholesterol that you previously saved as follows: -Click File and then click the name of the file near the bottom of the menu that opens Suppose that we discover a typing error in a data entry for Drug X. . As a final demonstration. hit enter. To enter data in Eviews directly.

Statistics and Decision Making (45-731) Fall 2010 Tutorial Note: Extensive information is available in the Eviews help file.” You will then see a presentation of the statistical distributions available in Eviews That’s it for now. . click “Go”. and click “statistical distribution functions” when it appears in the display window below “Go. The following is an example. click Search and enter “statistical distribution functions” in the search line. You may want to go through the steps in the example for practice. You can bring up Eviews help by clicking: Help/Eviews Help Topics A browser window will open with the Eviews help options displayed. In the browser window. We’ll provide future installments for additional topics as needed. Suppose you wish to find out what distributions are available.