Introduction to EViews

Course Objective This course is designed to give a basic understanding of how EViews works and how to run simple statistical analysis of data. Learning Outcomes Opening data in EViews Examining your data and performing simple statistical analyses Running a simple regression and plotting results Performing specification and hypothesis testing

1. Opening data in EViews a. Creating a workfile by describing its structure 1 Go to: File/New/Workfile A dialog box opens, including: Workfile Structure Type [ Choose Dated - regular frequency for simple time series dataset; Choose Balanced Panel, Unstructured for panel dataset] Select Dated - regular frequency Date Specification: Frequency [ Annual, Semi-annual, Quarterly, Monthly, Weekly, Daily - 5 day week, Daily - 7 day week] Select Quarterly Date Specification: Start Date and End date  Type appropriate dates (ex: 1970 to 2020) Once the dialog box is filled, click OK button. A workfile window will open b. Entering the data MANUALLY: In the workfile window, click on Objects/ New Object Specify type (ex. series) and name the object (ex. GDP); click OK Double-click on the variable name (GDP); Click on Edit and start entering data Alternatively, one could “Copy and Paste” the data from a spreadsheet
1

In Eviews 6, we can create a Workfile by Reading from a Foreign Data Source (Stata, SAS, SPSS, Excel, TSP, etc): select File/Open/Foreign Data as

Workfile; Click on the Files of type you want , or just select your file ; Click Open

1

etc. Here we will use the file “Intro_Eviews. Examining the line graph of a series  Double-click on that variable. enter m1. M1 series. Examining your data and performing simple statistical analyses a. not including any label or date information. ex: log (M1). Excel. to see the contents of an individual series. Then. and select Line & Symbol from the list of graph types c.. or File/ Save As… or File/Save… choices from the main menu Enter name and location in the Save dialog e. etc. make certain that you have an open workfile to receive the contents of the data import and that the workfile window is active Select: Proc /Import/ Read Text . Excel spreadsheet) d. Verifying data contents Double-click on the variable to open the spreadsheet view Compare the spreadsheet view with the original data file (ex. Ex: the upper left-hand cell is B2. ex. Lastly. Spreadsheet dialog) Specify data order (series in columns or rows) and variables to be imported. simply double click on the M1 icon in the workfile window. you can simply provide the number of series to be read. Or select Quick/Show… in the main menu. Generating LOGS. By series means that all of the data for the first variable are followed by all data for the second variable. and other auto-series expressions  From the main menu. if the names that you wish to use for your series are contained in the file.IMPORTING DATA FROM A SPREADSHEET OR TEXT FILE: First. Another interpretation for “by observation” is that variables are arranged in columns while “by series” implies that all of the observations for a variable are in a single row. and click OK. and click OK. Select Quick/Show… enter the text for the expression. LAGS. 2 . 2. enter the names for series you will be importing or Alternatively. select View or Proc from the main menu. LEADS.Lotus-Excel Locate data file (could be text-ASCII. And the series will show-up in a window. Saving the Workfile Click on the Save button in the workfile window. etc).. you should tell Eviews the sample of data that you wish to import c. 2 In the beginning cell (upper left-hand corner) of your actual data. Ex: M1  Select View/Graph. 2 By observation means that all of the data for the first observation are followed by all of the data for the second observation. Examining the data First. Computing basic descriptive statistics  Double-click on the variable name M1  Click View/ select Descriptive Statistics & Tests/ Stats Table b. In the edit box in the middle of the dialog.xls” Eviews will open the import dialog (ex.. Lotus.

ARCH. while being in the group window  Select View or Proc will allow you to do many things with your group of series  Ex: select View/Graph. Residual/Actual.  Then enter the list of expressions and series names: log(m1) log(gdp) rs dlog(pr)  Click on OK. and the first difference of the logarithm of the series PR.. the level of RS. and choose Multiple graphs from the Multiple Series drop-down on the right side of the dialog to display the same information differently: Select View/Descriptive Stats/Individual Samples to display a table of descriptive statistics computed for each of the series in the group To display the correlation matrix of the four series for the 179 common observations. Fitted. TSLS. and select the Correlation    3. Examining the group of series. Residual Graph in the equation toolbar 3 . and then click OK. Estimating an equation The specification: log(M1t) = b1 + b2log(GDPt)+b3RSt+b4Dlog(PRt)+ et Where log(M1) is the logarithm of the money supply. RS is the short term interest rate. GMM. EViews will open a group window containing this group of variables e.. BINARY. Clicking on View in the series toolbar and selecting Descriptive Statistics & Tests/ Histogram and Stats displays a view containing the histogram and the descriptive statistics for LOG(M1) d. log(GDP) is the log of income. from Eviews main menu.. with residuals  Select View/Actual. b. you may select View/Graph. Displaying actual & fitted values for the dependent variable. etc.) ex: use LS and then set the appropriate sample length (ex: 1952q1 1992q4).  Simply select Quick/Show... CENSORED. Click on View/Covariance Analysis. Running a regression a.. Fitted. and Dlog(PR) is the log first difference of the price level (the approximate rate of inflation)  Select Quick from the main menu and choose Estimate Equation… then enter the equation specification (remember that C is the constant and there should exist a space between variables) In estimation settings. from a group object toolbar  Then select Line & Symbol to display a single graph containing line plots of each of the series in the group  Alternatively. Examining multiple series/series expressions with a group object  Ex: creating a group object containing the logarithms of the series M1 and GDP. you have different choices of estimators (LS...

we need to modify our original specification to take into account the problem of serial correlation. Specification and hypothesis tests a.3 3 Users interested might Press Estimate on the toolbar of the copy and modify the specification to read: log(m1) c log(gdp) rs dlog(pr) ar(1) 4 . to test the hypothesis that the coefficient on the price term is equal to 2. following the series name ] Press the Name button in the toolbar and name the equation EQLAGS Note that one common method of accounting for serial correlation is to include autoregressive (AR) and/or moving average (MA) terms in the equation. Therefore. choose the coefficient of interest by selecting View/ Representations from the equation toolbar  To test the restriction on C(4) you should select View/Coefficient Tests/Wald–Coefficient restrictions…. we will perform a Wald test  First.Godfrey test for serial correlation in the residuals  From the equation toolbar. and enter in the dialog box the restriction c(4)=2 Note: As the Durbin-Watson statistic can be difficult to interpret. 5. Performing hypothesis tests on the coefficients of the model For example. we perform a more general Breusch. Modifying the equation specification New specification: log(m1) c log(gdp) rs dlog(pr) log(m1(-1)) log(gdp(-1)) rs(-1) dlog(pr(-1)) In the equation tool bar: Click on the Estimate Include the specification [lags (leads) are specified by including a negative (positive) number.4. Ex: entering 1 yields a test against first-order serial correlation There is a serial correlation according to these test results. enclosed in parentheses. select View/Residual Tests/Serial Correlation Test…  Then specify an order of serial correlation to test against.

Sign up to vote on this title
UsefulNot useful