Vous êtes sur la page 1sur 17

Introduction to EViews 5.

0
Prof. Anthony D. Becker Department of Economics St Olaf College Friday, September 09, 2005 INTRODUCTION EViews is a Windows-based, advanced econometric analysis package that is used in Econ 385 Econometrics. The program files for EViews are on the campus microcomputer network and can be accessed from any networked Windows computer on campus. Because we have only one set of complete manuals, this document will provide some basic instructions for using EViews. As you use the program, experiment with the commands presented here and try other commands and options to learn about the system. You cannot cause any damage by experimenting. If you get stuck or have any questions, please talk to me. Your questions are an important part of the process of learning to use EViews. Each EViews menu command will prompt you for its required information. You should try clicking on the various windows logos to learn how they work. Like most Windows programs, EViews has a good help facility available from the menu at the top of the page. Using the help files can provide answers to specific questions about the parts of EViews that you need to use. The combination of specific instructions in this document, your personal exploration, and reference to the EViews User's Guide (on-line as described below), and the help files should provide sufficient material for you to learn how to use EViews. Ask questions of both your classmates and of me when something is not clear or does not work as you think it should. In many cases one of your classmates will already have solved the problem.

You are responsible for learning how to use EViews.


EVIEWS BASICS In this document, the following conventions will be used. The names of computer files will be in boldface, Times Roman: for example, arms data.wf1 The names of data series (variables) in EViews will be in Arial: mexicoexrate Words and commands you type at the keyboard will be in Courier: money Commands from a menu will be in italics; a greater-than sign will connect a series of choices: File > Save As Important words and concepts will be underlined: work file

Introduction to EViews

Page 2 of 17

Two other EViews documents are available on-line through the Application Explorer (Start > St. Olaf Apps > Economics). The EViews Users Guide is the complete users guide for EViews; it covers everything. A second document, the EViews Command Reference, gives the structure of all commands in EViews. Do not overlook the EViews help files as they cover almost all of the materials in the two guides. As with all handouts in this class, this document is available in the Class Materials Directory. Look in L:\2005-06 Semester 1\economics-385\Class Materials\ for Introduction to EViews 2004.pdf and Introduction to EViews 2004.doc. Starting EViews: There are a number of ways to starting EViews. For example, with any College-owned Windows PC, you can click on Start > St. Olaf Apps > Economics > EViews. You can also double-click on "My Computer," double-click on the P: drive, then Apps, and then EViews5. (That is, navigate to P:\>Apps>EViews5.) Look for EViews5.exe and double-click it to launch EViews. EViews Files and Logic: EViews organizes data, graphs, output, etc. as objects. Each of these objects can be copied, saved, cut-and-pasted into other Windows programs, or used for further analysis. Thus each object can be thought of as a piece of paper in your workspace that represents a specific task or result in a larger project. Many of these objects will need to be discarded because they are not important results and you need to avoid too much clutter. Important and intermediate objects can be saved together in an EViews work file. Important objects may be copied into other Windows program using cut-and-paste. You can use more than one work file at a time and can copy objects between them. Our version of EViews also lets work files have multiple pages in much the same way that a Microsoft Excel file can have multiple pages. This feature lets you have data in multiple frequencies in the same work file. Work files should be saved regularly. I also strongly recommend that you maintain copies of all your work files on your personal network space and maybe even on a floppy disk, zip disk, etc. One should practice safe computing at all times. In addition to the work file, you will also use EViews databases in some projects. A database is where we can store a large number of objects (usually data) for selective access. For example, we will use a database of U.S. macroeconomic time series called the Haver Analytics Database. It contains data on over 17,000 variables. If we need only data on GDP=C+I+G+NX, why should we read in all 17,000? We shouldnt. Well use EViews database feature to fetch only the variables we need into our work file. There are a variety of database formats that EViews can read. The two we will use most often are EViews (.edb) and RATS (.rat) formats. Most of the data entry, statistical estimation, graphing, etc. will be done with menu commands just like all other Windows programs. However, not all menus are accessed at the top of the window when using EViews. Some are part of the objects they will act on. Well see some examples later.

Introduction to EViews

Page 3 of 17

TUTORIAL 1 USING AN EXISTING WORK FILE On a Windows PC, launch EViews (Start > St. Olaf Apps > Economics > EViews). From the main menu, select File > Open > Workfile. Navigate to the classs data directory (L:\2005-06 Semester 1\economics-385\Class Materials\Data) and open the work file named arms_race.wf1.1 Your EViews screen will look like this:
Parts of the EViews screen: Main menu The command window Work file window Work file menu buttons Current date ranges for the work file List of objects in the work file

From the information on the screen, we can tell that this work file contains two variables someone created (soviet and us) and two objects that EViews created: a constant called c and a variable called resid. The variables frequency is annual (one observation per year) and the maximum range of the data can be from 1959 to 1988. This does not mean that we have data for all of these years, only that this is the maximum possible. A quick note about frequencies is in order. You cannot mix data series of different frequencies (annual, quarterly, monthly, weekly, daily) in the same work file. However, you can save series of different frequencies in the same database. When you fetch data from a database into your work file (see Tutorial 2) EViews will automatically convert it to the frequency you initially specified for the work file. This is OK if the series in the database have a greater frequency (observations per year) than the work files settings. So, reading monthly data into a quarterly work file is OK. EViews will compute the average for the quarter from the monthly data. Do not fetch data into a work file that has a lower frequency than the work file.2 EViews will let you but
1 2

For Economics faculty, this file is in S:\Econ\Tony Becker\EViews. OK. If you absolutely, positively know what you are doing, it may be OK.

Introduction to EViews

Page 4 of 17

what you are doing is interpolating between values so you dont really have as many valid observations as it may appear. When combining data series of different frequencies, make your work files frequency the lowest of the various data series frequencies.3 Simple Statistics: Lets get the statistics on us. There are two easy ways to do it: 1) Use the main menu: Select Quick > Series Statistics > Histogram and Stats and then type us into dialog box that pops up. 2) Double click us in the work file window. A window titled Series: US will open. Click this windows View menu button and select Descriptive Statistics > Histogram and Stats. Either way, you should get the picture at right. This is one of several views of the us object. Try clicking the Bar or Line menu buttons for other views. Sheet will show you a spreadsheet of the data. Notice the Freeze menu button. Click this to make a frozen copy this window as a graph object for future use. Why would you do this? Because, if you change the values in a series or the sample range of your work file, EViews will automatically update all objects in your work file, thats why. Also, graph objects copy well into other programs like Word. If you create a new object with a command or menu (like the Freeze menu button) you need to name it (use the Name menu button) to place it in your work file. Click Name and give it a name and description (optional) and youll see it appear in the list of objects in the work file. A Regression: The easy way to do a regression is by using the main menu: Quick > Estimate Equation. The window shown below will appear. Type soviet c soviet(-1) us(-1) into the window as shown.

For example, if you are combining monthly (12 obs. per year) and quarterly (4 obs. per year) data series, make you work files frequency quarterly.

Introduction to EViews

Page 5 of 17

What does this mean? It means we want soviet to be the dependent (Y) variable in a regression equation with the independent (X) variables being a constant term (c), the previous years soviet, and the previous years us. The (-1) indicates we want the value one time period before, also called the first lag. Click OK to get the regression output:
Parts of the regression output: o o o o o o o Dependent variables name Estimation method When the equation was estimated Actual range of data used Number of observations Variables, coefficients, standard errors, and test statistics Equation diagnostic statistics

Saving a Work File: Suppose the regression output looks good and you want to save it and your data and run off to dinner. Click the Name button and give the regression output a name (and description if you like). You will see it appear as an object in your work file with in front of it showing that it is an equation. To save your work file, use the main menu command File > Save As and then

Introduction to EViews

Page 6 of 17

save it in your own network space or on a floppy or zip disk.4 Do not save on the hard drive of a public computer. TUTORIAL 2 USING AN EVIEWS DATABASE, CREATING A WORK FILE, AND GENERATING NEW SERIES In this tutorial we will get data from an EViews database and put it in a work file to do some analysis. But lets start with a hypothesis. If the Keynesian view of interest rate determination is correct, when the money supply grows faster than GDP we should see interest rates fall. Conversely, if money growth is less than GDP growth, interest rates should rise. In this tutorial, we will try to test this hypothesis using data from the Italian economy. Launch EViews and then use the command File > Open > Database. You will get the dialog window shown at right. Click Browse Files to navigate to the location of your database. In this case, well use the EViews database named itaoecd.edb; it is located in the class data directory (L:\2005-06 Semester 1\economics-385\Class Materials\Data). In the Open window, click navigate to the directory and double-click the file name to open the database. Click OK in the Database Specification dialog and you will then see the Database: ITAOECD window as shown below. We know we want data on GDP, interest rates, and money supply. To find these variables, we will ask EViews what useful variables are in the database by clicking the Easy Query button. In the dialog box (shown at right) type gross in the space titled AND description MATCHES and then click OK.

Of course, on your own computer you can save on the hard drive but be sure to back up the drive every so often.

Introduction to EViews

Page 7 of 17

You will see three variable names show up in the database window. Double-click any of these to get more information about the variables. It turns out that we want itagdp, quarterly values of nominal GDP. Note its frequency (quarterly) and date range (1971 Q1 to 1990 Q3). We need a work file for our data series and results so lets create one. Using the main menu, select File > New > Workfile. In the work file dialog, make sure the Workfile structure type is Dated regular frequency and select Quarterly for the Date Specification Frequency. Enter a Start date and an End date of 1971:1 and 1990:3, respectively (meaning start at 1971, first quarter, and end at 1990, third quarter). Click OK. Now EViews will have both database and a work file windows open. Switch to the database window and click itagdp, then click the Export button. Click OK and the data object will be put into your work file.5 Now is a good time to save your work file: File > Save or File > Save As will do it. Give it a descriptive name (how about tutorial 2?) and save it to your network drive or disk. A file with .wf1 will be created to contain all data series, saved output, and graphs. We still need data series for the money supply and interest rate so go back to the database window and click Easy Query again. Find an interest rate by typing rate into the AND description MATCHES area; click OK. The interest rate series we want is itaibor. Export this to the Tutorial 2 work file. Find a money supply series by doing an Easy Query for money in the description. Export the nominal money supply, itam1, to the work file. Once this is done, you can close the database window. Save your work file again! Click the Save button on the work file window. Before we go on, its worth mentioning how EViews converts data of different frequencies. In this tutorial, we have a quarterly work file but have read monthly data on money and interest rates from the database. EViews has converted the monthly data to quarterly by taking an average of the three monthly values for each quarter. Taking an average will be appropriate in most cases. However, when it is not, you can control how EViews converts frequencies by using the Options > Dates & Frequency Conversions main menu item.6 See the EViews help files or manuals for more information about this.
There are two other ways to export from a database to a work file. First, you can right-click the variable and select Export to workfile from the menu. Second, you can double-click a variable name and click the Export to WF button in the window that pops up. 6 For example, in macroeconomic data, quarterly and monthly values are sometimes labeled as annual rates or SAAR (seasonally adjusted annual rates). If you wanted to convert to an annual frequency, an average would be appropriate. However, suppose you have monthly data on the number of housing starts that month. In converting to an annual frequency, you would want to use a sum (total), not an average.
5

Introduction to EViews

Page 8 of 17

Create Some New Variables. Our hypothesis talks about GDP growth, money growth, and changes in the interest rates and, because we have levels of GDP, money, and interest rates, well need to compute some new variables. We can generate a new series by clicking the Genr button on the work file window. To create the growth rate in GDP, click the Genr button, enter gdpgrowth = (itagdpitagdp(-1))/itagdp(-1) into the Enter equation: area of the dialog box, and click OK.7 In the work file, double-click gdpgrowth to look at the numbers to make sure they seem allright. Do they? Good! Now, using the same process, generate moneygrowth.8 The interest rate change (name it ratechange) we want is just the amount of change (not percentage change) in itaibor. Generate this either by using the equation ratechange = itaibor itaibor(-1) or the equation ratechange = d(itaibor). The d(x) function takes the difference (current minus past values) of a time series. Check your work against mine. You should find that you have 78 observations of each variable with the following sample statistics. GDPGROWTH MONEYGROWTH RATECHANGE 0.037228 0.034567 0.069274 0.031948 0.036591 -0.066667 0.085843 0.090124 7.160000 0.009804 -0.033673 -3.480000 0.017328 0.024784 1.524537

Mean Median Maximum Minimum Std. Dev.

To get back to the hypothesis, we want to see if, when money grows faster than GDP, interest rates fall, and when it grows slower, if rates rise. In terms of our data series, we want to see if (moneygrowthgdpgrowth) is negatively related to ratechange. A simple regression is all it will take to test this. From the main menu, select Quick > Estimate Equation. In the Equation Specification area enter ratechange c (moneygrowthgdpgrowth)and click OK. To EViews, this means, Regress ratechange on the difference between moneygrowth and gdpgrowth, and include a constant. In EViews you can use a new variable in a regression without creating it by putting an expression in parentheses. Check that you get the same regression output that is shown below.

7 8

The equation says, gdpgrowth is equal to the difference between current and past GDP divided by past GDP. moneygrowth = (itam1 itam1(-1))/itam1(-1)

Introduction to EViews

Page 9 of 17

Dependent Variable: RATECHANGE Method: Least Squares Date: 09/08/04 Time: 13:47 Sample(adjusted): 1971:2 1990:3 Included observations: 78 after adjusting endpoints Variable C MONEYGROWTHGDPGROWTH R-squared Adjusted R-squared S.E. of regression Sum squared resid Log likelihood Durbin-Watson stat Coefficient 0.032178 -13.93972 0.050065 0.037566 1.495627 170.0045 -141.0627 1.415211 Std. Error 0.170358 6.965078 t-Statistic 0.188884 -2.001373 Prob. 0.8507 0.0489 0.069274 1.524537 3.668275 3.728704 4.005493 0.048922

Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion F-statistic Prob(F-statistic)

Youll notice that we could have computed GDP or money growth using the d(x) function: for example, moneygrowth = d(itam1)/itam1(-1). There are also two cooler tricks we can use to compute a percentage change directly; one uses a built-in percentage change function and the other uses the differences of the natural logs. First trick is to use the @pch(x) function like this: moneygrowth = @pch(itam1). The second trick uses one of the properties of natural logs, that ln(x+a)-ln(x)a/x. In EViews, there is a difference-of-the-logs function dlog(x) that approximates the percentage change. Of course, it wont work on zero or negative numbers. In fact, we could have estimated the equation without using Genr at all. We could have used Quick > Estimate Equation and given the following equation specification: d(itaibor) c (@pch(itam1)-@pch(itagdp)) Give this a try to make sure it gives the same results. Do the results support the Keynesian view? Yes, because the coefficient on (moneygrowthgdpgrowth) is negative and statistically significant. This means that when money growth is higher (larger) than GDP growth, the dependent variable, ratechange, will be smaller. Also, notice that the coefficient is statistically significant at the 95% level. The Prob is the p-value for the test that the true coefficient is zero. It is also useful to look at whether an independent variable will have a large or small effect on the dependent variable. For example, if money growth is one percentage point larger than GDP growth, then the variable (moneygrowthgdpgrowth) would have a value of +0.01. The effect of this on ratechange would be (-13.93972) x (0.01) = (-0.1393972). In other words, if the money supply grows one percentage point faster than nominal GDP (say, 11% vs. 10%) we could expect to see interest rates drop by over 1/8th of a percentage point. That much of a change in interest rates is not terribly large but it still appears important. TUTORIAL 3 GETTING DATA FROM ANOTHER SOURCE Suppose you are interested in the day-to-day movement in the exchange rate between the U.S. and Mexico. You know (or you do now) that the Federal Reserve makes daily exchange rates available and the daily rates between the U.S. and Mexico are at:

Introduction to EViews

Page 10 of 17

http://www.federalreserve.gov/releases/h10/Hist/dat00_mx.htm. But a web page is neither an EViews database (.edb) nor work file (.wf1). What do you do? If you can get the data into a text file (also called ASCII9) or Microsoft Excel file (.xls) you can read it directly into EViews. You can also cut-and-paste from another Windows program (like Excel) into EViews. Well cover both methods. Both methods begin the same way. First, open a web browser (Internet Explorer, Netscape, Firefox, etc.) and navigate to the Mexico exchange rate page. Now launch Microsoft Excel. Switch to the web browser and give it the Select All command: from the main menu Edit > Select All, or from the keyboard Ctrl-A. Then give the Copy command: Edit > Copy or Ctrl-C. Switch back to Excel, click on the cell in column A, row 1 (cell A1) and give Excel the Paste Special command: Edit > Paste Special. In the dialog box (shown at right) click Text and then OK. If you do not use Paste Special in Excel this will not work so be careful. You should have a view that looks something like this:

If you care, ASCII = American Standard Code for Information Interchange.

Introduction to EViews On to Method 1: Reading an External File into EViews

Page 11 of 17

Notice that the exchange rate data begins in cell B16 and that it is daily data with five-day weeks. (There is no currency trading on weekends.) Save the file with some descriptive name such as mexico exchange rates.xls. Now, and this is important, close the worksheet in Excel. Otherwise EViews may not be able to open it. Launch EViews and create a new work file. This time, we are creating a work file with daily data and the date format is a little different. Click the little button next to Daily (5 day weeks) and enter a start date of 1/3/2000 and an ending date of whatever today is. Click OK. Next, give the command File > Import > Read Text-Lotus-Excel. At the bottom of the dialog box, change Files of type: to Excel .xls so that you can see your spreadsheet. Navigate to where you saved the spreadsheet and open it. You will now see the Excel Spreadsheet Import dialog box. You need to fill in a few things. First, your data is By Observation so make sure this is clicked. Next, your data begins in cell B16, the Upper-left data cell. Then, the Excel 5+ sheet name is probably Sheet 1 so type this in. Finally, there is only one series so give the data series a name. I chose mexicoexrate. The completed dialog box is shown below. Click OK to read in the data.

Its a good idea at this point to switch back to your web page and make sure what EViews says is the value for various days agrees with the web page.

Introduction to EViews Now for Method 2 Cut-and-paste Sometimes you might want to cut-and-paste data into EViews or even type it in by hand. To do this, you first need to make a series object to hold the data. On your work files window youll see a button for Objects. Click it and select Series as the Type of Object. Name the object something different than any existing objects. Because we plan on pasting in the same exchange rate data for Mexico, use a new name for the new object: mexrate. Click OK to create the object. Next, get your data on screen by launching Excel and loading the spreadsheet with the Mexican exchange rate data. Select and Copy the data in Excel as follows: o Point to cell B16 (the top of the data column) with the mouse and click once; then o Either hold down the button and drag to the end of the data OR o Hold down Shift and Ctrl (at the same time) and press the down arrow key. o Copy the data either by using File > Copy or Ctrl-C. Switch to EViews and doubleclick your new (empty) object. In the window that opens, click the Edit +/- button. Point to the space in the first column next to the date for your first observation. Then Paste by using File > Paste or Ctrl-V. You should have a window like that shown at the right.

Page 12 of 17

More of Tutorial 3: Groups, Some Manipulations, and a Forecasting Model Save your work file before going any further. I chose tutorial 3.wf1 as the name for my work file. Check to see if mexicoexrate and mexrate are the same; they should be. Here are a couple of ways to do it. 1) Compute sample statistics on each and compare them. (See Tutorial 1) 2) Compute the difference between the two variables (See Tutorial 2) and see if this variable is always zero. 3) Open the two variables as a group and compute their correlation.

Introduction to EViews Groups:

Page 13 of 17

EViews lets you create a group of series and keep these in your work file along with individual data series objects. Be careful because any changes you make to series will be reflected in the group and any changes to data in the group will be reflected in the individual series. To create a group, click once on a series you want to be in the group. Then hold down Crtl and click once on the other series you want in the group. When you have selected all the series for the group right-click on the series and select Open > As Group from the pop-up menu. A new window will open with both series in it. Click this windows View button and select Correlations. (You can also use the main menu and select Quick > Group Statistics > Correlations and then click OK.) If the series are the same, you should get correlations of one in all cases. If all is OK, close the group window; respond OK to the delete group message. In you work file window, double-click on one of the exchange rate series. Click the series windows View button and select Line Graph to see the values graphically over time. This series is what we call non-stationary. That is, it is not staying around the same 12.0 value all the time. It even looks like it 11.5 may even have a break point some time around June 2002. Lets see if we can 11.0 make a stable series out of it by taking 10.5 differences. The first difference (as we mentioned above) is the difference between a current periods value and the 10.0 past periods value. The second 9.5 difference is the difference of the first 9.0 differences. Series Manipulation:
8.5 3/01/00 1/30/02 12/31/03

MEXRATE To compute the first and second differences, well use EViews built-in difference functions like we did in Tutorial 2. Click the Genr button on the work file window (or use the main menu command Quick > Generate Series). In the Enter Equation space type dmexrate=d(mexrate). Of course, if you named your Mexican exchange rate something other than mexrate, use that series name. To compute the second difference, we can use the same d() function but with a small addition. Click Genr again and this time use an equation of d2mexrate=d(mexrate,2). The ,2 part tells EViews to use the second difference. You will now have two new series objects in your work file: dmexrate (the first difference) and d2mexrate (the second difference). To see all the different functions, use the main menu command Help > Function Reference or check the EViews manuals. You may want to look at line graphs or descriptive statistics of your two new series to see what they look like.

A Simple Forecasting Model:

Introduction to EViews

Page 14 of 17

One of the simplest single-equation forecasting models is called the AR(p) where AR means autoregressive and p is a number of lags. For example, the AR(2) forecasting model for variable X is: X t = 0 + 1 X t 1 + 2 X t 2 + t Xt is the current periods value of the variable X and Xt-1 and Xt-2 are the two previous periods values of X called the first and second lags of X. The models coefficients are 0, 1, and 2 and t is the error term. An AR(3) model would have three lags, an AR(4) would have four, etc. Remember that our Mexican exchange rate data is daily with five-day weeks. With daily data, an AR(20) model should be OK.10 First, lets estimate the AR(20) model for dmexrate. From the main menu, use Quick > Estimate Equation. Enter dmexrate c dmexrate(-1 to 20) for the Equation Specification. This specification means that dmexrate is the dependent variable, a constant term (c) should be included, and the first twenty lags of dmexrate should be the right-hand-side variables. When you get the equation window, click the Name button and name this object FIRST for first difference. Repeat this using d2mexrate and name that equation object SECOND. Your output from these two models should be similar to that in the tables below.11 At first glance, the second-difference model seems to be a better forecasting model. Notice that it has statistically significant coefficients and a much larger R2 coefficient. Now this is not proof that it is better but it is an indication that it may be better.
Dependent Variable: DMEXRATE Method: Least Squares Date: 09/13/04 Time: 11:30 Sample(adjusted): 4/14/2000 8/31/2004 Included observations: 392 Excluded observations: 751 after adjusting endpoints Variable C DMEXRATE(-1) DMEXRATE(-2) DMEXRATE(-3) DMEXRATE(-4) DMEXRATE(-5) DMEXRATE(-6) DMEXRATE(-7) DMEXRATE(-8) DMEXRATE(-9) DMEXRATE(-10) DMEXRATE(-11) DMEXRATE(-12) DMEXRATE(-13)
10

Coefficient -0.000337 -0.009282 -0.000225 -0.012796 -0.034092 0.036732 -0.050948 0.046132 0.125885 0.012956 0.076776 0.087370 -0.028600 -0.043228

Std. Error 0.002535 0.053401 0.052808 0.051525 0.051587 0.051179 0.051505 0.053672 0.052027 0.052120 0.052822 0.053437 0.052070 0.051499

t-Statistic -0.132839 -0.173820 -0.004263 -0.248337 -0.660873 0.717728 -0.989188 0.859511 2.419610 0.248584 1.453501 1.635017 -0.549259 -0.839405

Prob. 0.8944 0.8621 0.9966 0.8040 0.5091 0.4734 0.3232 0.3906 0.0160 0.8038 0.1469 0.1029 0.5832 0.4018

As a rule of thumb, for annual data, two or three lags should be enough, 8 to 12 lags for monthly data, and for 24 to 36 lags for monthly data. There isnt a rule of thumb for daily data but 20 or 30 may be a good starting point. 11 You will have a different sample size, ending date, and excluded observations. You will also have slightly different results.

Introduction to EViews
DMEXRATE(-14) DMEXRATE(-15) DMEXRATE(-16) DMEXRATE(-17) DMEXRATE(-18) DMEXRATE(-19) DMEXRATE(-20) R-squared Adjusted R-squared S.E. of regression Sum squared resid Log likelihood Durbin-Watson stat 0.053767 0.028977 -0.017710 -0.027767 -0.070434 0.020264 -0.068769 0.049695 -0.001534 0.049860 0.922318 629.9930 1.832205 0.051638 0.052036 0.051655 0.050744 0.050497 0.051680 0.051782 1.041245 0.556863 -0.342843 -0.547189 -1.394794 0.392107 -1.328037 0.2984 0.5780 0.7319 0.5846 0.1639 0.6952 0.1850 -0.000357 0.049822 -3.107107 -2.894361 0.970058 0.498196

Page 15 of 17

Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion F-statistic Prob(F-statistic)

Dependent Variable: D2MEXRATE Method: Least Squares Date: 09/13/04 Time: 11:22 Sample(adjusted): 4/17/2000 8/31/2004 Included observations: 370 Excluded observations: 772 after adjusting endpoints Variable C D2MEXRATE(-1) D2MEXRATE(-2) D2MEXRATE(-3) D2MEXRATE(-4) D2MEXRATE(-5) D2MEXRATE(-6) D2MEXRATE(-7) D2MEXRATE(-8) D2MEXRATE(-9) D2MEXRATE(-10) D2MEXRATE(-11) D2MEXRATE(-12) D2MEXRATE(-13) D2MEXRATE(-14) D2MEXRATE(-15) D2MEXRATE(-16) D2MEXRATE(-17) D2MEXRATE(-18) D2MEXRATE(-19) D2MEXRATE(-20) R-squared Adjusted R-squared S.E. of regression Sum squared resid Log likelihood Durbin-Watson stat Coefficient -0.000582 -0.932754 -0.873662 -0.876875 -0.897055 -0.832703 -0.859224 -0.762470 -0.557285 -0.493434 -0.386028 -0.274529 -0.263963 -0.257135 -0.123966 -0.036381 -0.015965 -0.005354 -0.026842 0.013287 -0.046618 0.494164 0.465176 0.049757 0.864031 596.0280 1.898082 Std. Error 0.002598 0.054232 0.076219 0.093566 0.109169 0.120841 0.128799 0.134130 0.136833 0.136250 0.135911 0.135932 0.134195 0.129943 0.125211 0.118683 0.109679 0.101351 0.090656 0.073750 0.052495 t-Statistic -0.223992 -17.19919 -11.46257 -9.371687 -8.217091 -6.890930 -6.671045 -5.684563 -4.072734 -3.621531 -2.840302 -2.019604 -1.967006 -1.978826 -0.990061 -0.306542 -0.145559 -0.052828 -0.296083 0.180165 -0.888049 Prob. 0.8229 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0003 0.0048 0.0442 0.0500 0.0486 0.3228 0.7594 0.8844 0.9579 0.7673 0.8571 0.3751 -0.001135 0.068037 -3.108259 -2.886141 17.04732 0.000000

Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion F-statistic Prob(F-statistic)

Introduction to EViews

Page 16 of 17

Note that the coefficients for lags 14 through 20 are zero. We can probably eliminate them from the equation. To re-estimate the equation using only lags 1 to 13 we just have to click the Estimate button on the equation output window and change the 20 to 13. Try it. TUTORIAL 4 USING RATS FORMAT DATABASES The departments OECD Main Economic Indicators databases are in format that EViews calls RATS 4.x format. They are located in P:\Apps\EconData\OECD2004 and all the data file names end with .rat. In this short tutorial, well explain how to open these as databases. (EViews does allow us to open them as work files but dont do this.) Use the following command: File > Open > Database. You will see the dialog box at right. Click Browse Files and navigate to the OECD directory mentioned above. You will see all the RATS data files. Their names begin with a threeletter code that identifies the country followed by oecd.rat. For example, there is mexoecd.rat for Mexico, jpnoecd.rat for Japan, etc. Double click on the datebase for the country you would like to use. You will return to the dialog at right only it will show the Database/File Type to be RATS 4.x File and the DB File name/path will be for the file you selected. Click OK. The database will open in a window as before. Now you can do your Easy Query to find the time series you would like to use. If you already know the name of the variable you want, you can switch to your work file and click Fetch. A list of all the variables in all the OECD files and country codes is in L:\2005-06 Semester 1\economics-385\Class Materials\OECD_List_2004.pdf.12 A NOTE ON THE ECONOMICS DEPARTMENT DATABASES Two of the large econometric databases the department purchases are the OECD Main Economic Indicators and the Haver Macroeconomic Database. See Tutorial 4 to access the OECD data. The Haver database contains almost 20,000 time series on the U.S. economy. Most are either monthly or quarterly frequency. To access the Haver database from EViews, see Tutorial 2 then use File > Open > Database to open P:\Apps\EconData\usecon.edb. This database is also in L:\2005-06 Semester 1\economics-385\Class Materials\.

12

It is also in S:\Econ for department faculty use.

Introduction to EViews EXERCISES:

Page 17 of 17

1) Work through Tutorial 1 and then estimate a regression with us as the dependent variable and the same independent variables: c soviet(-1) us(-1). 2) Work through Tutorial 2 and then estimate the same model for the U.S. Data can be found in the database usecon.edb. Use the prime lending rate, nominal GDP, and the money supply M2 (look for one that is NSA). Choose only a ten-year period for your work file; any ten years will do. 3) Work through Tutorial 3 and repeat the analyses for another country of your choice. Links to other daily exchange rates are at http://www.federalreserve.gov/releases/h10/Hist/. The links to Screen Reader will give the pages like the one used in the tutorial. 4) In Tutorial 3, the (apparently) better forecasting model was the one using second differences. Use this notation: the variable is X, the first difference is D, and the second difference is S. Then: Dt = X t X t 1 S t = Dt Dt 1 = ( X t X t 1 ) ( X t 1 X t 2 ) = X t 2 X t 1 + X t 2 So, if you have a forecast of S for tomorrow, figure out how you can forecast tomorrows X.

Vous aimerez peut-être aussi