
- •Table of Contents
- •Foreword
- •Chapter 1. A Quick Walk Through
- •Workfile: The Basic EViews Document
- •Viewing an individual series
- •Looking at different samples
- •Generating a new series
- •Looking at a pair of series together
- •Estimating your first regression in EViews
- •Saving your work
- •Forecasting
- •What’s Ahead
- •Chapter 2. EViews—Meet Data
- •The Structure of Data and the Structure of a Workfile
- •Creating a New Workfile
- •Deconstructing the Workfile
- •Time to Type
- •Identity Noncrisis
- •Dated Series
- •The Import Business
- •Adding Data To An Existing Workfile—Or, Being Rectangular Doesn’t Mean Being Inflexible
- •Among the Missing
- •Quick Review
- •Appendix: Having A Good Time With Your Date
- •Chapter 3. Getting the Most from Least Squares
- •A First Regression
- •The Really Important Regression Results
- •The Pretty Important (But Not So Important As the Last Section’s) Regression Results
- •A Multiple Regression Is Simple Too
- •Hypothesis Testing
- •Representing
- •What’s Left After You’ve Gotten the Most Out of Least Squares
- •Quick Review
- •Chapter 4. Data—The Transformational Experience
- •Your Basic Elementary Algebra
- •Simple Sample Says
- •Data Types Plain and Fancy
- •Numbers and Letters
- •Can We Have A Date?
- •What Are Your Values?
- •Relative Exotica
- •Quick Review
- •Chapter 5. Picture This!
- •A Simple Soup-To-Nuts Graphing Example
- •A Graphic Description of the Creative Process
- •Picture One Series
- •Group Graphics
- •Let’s Look At This From Another Angle
- •To Summarize
- •Categorical Graphs
- •Togetherness of the Second Sort
- •Quick Review and Look Ahead
- •Chapter 6. Intimacy With Graphic Objects
- •To Freeze Or Not To Freeze Redux
- •A Touch of Text
- •Shady Areas and No-Worry Lines
- •Templates for Success
- •Point Me The Way
- •Your Data Another Sorta Way
- •Give A Graph A Fair Break
- •Options, Options, Options
- •Quick Review?
- •Chapter 7. Look At Your Data
- •Sorting Things Out
- •Describing Series—Just The Facts Please
- •Describing Series—Picturing the Distribution
- •Tests On Series
- •Describing Groups—Just the Facts—Putting It Together
- •Chapter 8. Forecasting
- •Just Push the Forecast Button
- •Theory of Forecasting
- •Dynamic Versus Static Forecasting
- •Sample Forecast Samples
- •Facing the Unknown
- •Forecast Evaluation
- •Forecasting Beneath the Surface
- •Quick Review—Forecasting
- •Chapter 9. Page After Page After Page
- •Pages Are Easy To Reach
- •Creating New Pages
- •Renaming, Deleting, and Saving Pages
- •Multi-Page Workfiles—The Most Basic Motivation
- •Multiple Frequencies—Multiple Pages
- •Links—The Live Connection
- •Unlinking
- •Have A Match?
- •Matching When The Identifiers Are Really Different
- •Contracted Data
- •Expanded Data
- •Having Contractions
- •Two Hints and A GotchYa
- •Quick Review
- •Chapter 10. Prelude to Panel and Pool
- •Pooled or Paneled Population
- •Nuances
- •So What Are the Benefits of Using Pools and Panels?
- •Quick (P)review
- •Chapter 11. Panel—What’s My Line?
- •What’s So Nifty About Panel Data?
- •Setting Up Panel Data
- •Panel Estimation
- •Pretty Panel Pictures
- •More Panel Estimation Techniques
- •One Dimensional Two-Dimensional Panels
- •Fixed Effects With and Without the Social Contrivance of Panel Structure
- •Quick Review—Panel
- •Chapter 12. Everyone Into the Pool
- •Getting Your Feet Wet
- •Playing in the Pool—Data
- •Getting Out of the Pool
- •More Pool Estimation
- •Getting Data In and Out of the Pool
- •Quick Review—Pools
- •Chapter 13. Serial Correlation—Friend or Foe?
- •Visual Checks
- •Testing for Serial Correlation
- •More General Patterns of Serial Correlation
- •Correcting for Serial Correlation
- •Forecasting
- •ARMA and ARIMA Models
- •Quick Review
- •Chapter 14. A Taste of Advanced Estimation
- •Weighted Least Squares
- •Heteroskedasticity
- •Nonlinear Least Squares
- •Generalized Method of Moments
- •Limited Dependent Variables
- •ARCH, etc.
- •Maximum Likelihood—Rolling Your Own
- •System Estimation
- •Vector Autoregressions—VAR
- •Quick Review?
- •Chapter 15. Super Models
- •Your First Homework—Bam, Taken Up A Notch!
- •Looking At Model Solutions
- •More Model Information
- •Your Second Homework
- •Simulating VARs
- •Rich Super Models
- •Quick Review
- •Chapter 16. Get With the Program
- •I Want To Do It Over and Over Again
- •You Want To Have An Argument
- •Program Variables
- •Loopy
- •Other Program Controls
- •A Rolling Example
- •Quick Review
- •Appendix: Sample Programs
- •Chapter 17. Odds and Ends
- •How Much Data Can EViews Handle?
- •How Long Does It Take To Compute An Estimate?
- •Freeze!
- •A Comment On Tables
- •Saving Tables and Almost Tables
- •Saving Graphs and Almost Graphs
- •Unsubtle Redirection
- •Objects and Commands
- •Workfile Backups
- •Updates—A Small Thing
- •Updates—A Big Thing
- •Ready To Take A Break?
- •Help!
- •Odd Ending
- •Chapter 18. Optional Ending
- •Required Options
- •Option-al Recommendations
- •More Detailed Options
- •Window Behavior
- •Font Options
- •Frequency Conversion
- •Alpha Truncation
- •Spreadsheet Defaults
- •Workfile Storage Defaults
- •Estimation Defaults
- •File Locations
- •Graphics Defaults
- •Quick Review
- •Index
- •Symbols

Estimating your first regression in EViews—13
Looking at a spreadsheet of a group with two series leaves us in the same situation we were in earlier with a spreadsheet view of a single series: too many numbers. A good way to look for a relationship between two series is the scatter diagram. Click on the button and choose
Graph.... Then select Scatter as the Graph Type on the left-hand side of the dialog that pops up. To add a regression line, select Regression line from the Fit lines dropdown menu. The default options for a regression line are fine, so hit
to dismiss the dialog.
We can see that the straight line gives a good rough description of how log volume moves over
time, even though the line doesn’t hit very many points exactly.
The equation for the plotted line can be written algebraically as y = aˆ + bˆ t . aˆ is the intercept estimated by the computer and bˆ is the estimated slope. Just looking at the plot, we can see that the intercept is roughly -2.5. When LOGVOL looks to be about 4. Reaching back—possibly to junior high school—for the formula for the slope gives us an approximation for bˆ .
ˆ ≈ 4 – (–2.5) = 0.01625
------------------------
b 400 – 0
An eyeball approximation is that LOGVOL rises sixteen thousandths—a bit over a percent and a half—each quarter.
Estimating your first regression in EViews
The line on the scatter diagram is called a regression line. Obviously the computer knew the parameters aˆ when it drew the line, so backing the parameters out by eye may bring back fond memories, but otherwise is unnecessarily convoluted. Instead, we turn now to regression analysis, the most important tool of econometrics.
You can “run a regression” either by using a menu and dialog or by typing a command. Let’s try both, starting with the menu and dialog method. Pick the menu item Quick/Estimate Equation… at the top of the EViews window. Then in the upper field type “logvol c t”.
Alternatively, type in the EViews command pane:
ls logvol c t
as shown below.

14—Chapter 1. A Quick Walk Through
In EViews you specify a regression with the ls command followed by a list of variables. (“LS” is the name for the EViews command to estimate an ordinary Least Squares regression.) The first variable is the dependent variable, the variable we’d like to explain—LOGVOL in this case. The rest of the list gives the independent variables, which are used to predict the dependent variable.
Hint: Sometimes the dependent variable is called the “left-hand side” variable and the independent variables are called the “right-hand side” variables. The terminology reflects the convention that the dependent variable is written to the left of the equal
sign and the independent variables appear to the right, as, for example, in log(volumet) = a + bt .
Whoa a minute. “LOGVOL” is the variable we created with the logarithm of volume, and “T” is the variable we created with a time trend. But where does the “C” in the command come from? “C” is a special keyword signaling EViews to estimate an intercept. The coefficient on the “variable” C is aˆ , just as the coefficient on the variable T is bˆ .

Estimating your first regression in EViews—15
Whether you use the menu or type a command, EViews pops up with regression results.
EViews has estimated the intercept aˆ = –2.629649 and the slope bˆ = 0.017278 . Note that
our eyeballing wasn’t far off!
We’ve estimated an equation explaining LOGVOL that reads:
LOGVOL = – 2.629649 + 0.017278t
Having seen the picture of the scatter diagram on page 13, we know this line does a decent job of summarizing log(volume) over more than a century. On the other hand, it’s not true that in each and every quarter LOGVOL equals – 2.629649 + 0.017278t , which is
what the equation suggests. In some quarters volume was higher and in some the volume was lower. In regression analysis the amount by which the right-hand side of the equation misses the dependent variable is called the residual. Calling the residual e (“e” stands for “error”) we can write an equation that really is valid in each and every quarter:
LOGVOL = – 2.629649 + 0.017278t + e
Since the residual is the part of the equation that’s left over after we’ve explained as much as possible with the right-hand side variables, one approach to getting a better fitting equation is to look for patterns in the residuals. EViews provides several handy tools for this task which we’ll talk about later in the book. Let’s do something really easy to start the exploration.

16—Chapter 1. A Quick Walk Through
Just as there are multiple ways to view series and groups, equations also come with a variety of built in views. In the equation window choose the button and pick
Actual, Fitted, Residual/Actual, Fitted, Residual Graph. The view shifts from numbers to a picture.
There are lots of details on this chart. Notice the two different vertical axes, marked on both the left and right sides of the graph, and the three different series that appear. The horizontal axis shows the date. The actual values
of the left-hand side variable—called “Actual”—and the values predicted by the right-hand
side—called “Fitted”—appear in the upper part of the graph. In other words, the thick upper “line” marked “Actual” is log(volume) and the straight line marked “Fitted” is
– 2.629649 + 0.017278t .
Actual and Fitted are plotted along the vertical axis marked on the right side of the graph; fitted values rising roughly from -2 to 8. Residual, plotted in the lower portion of the graph, uses the legend on the left hand vertical axis.
Whether we look at the top or bottom we see that the fitted line goes smack though the middle of log(volume) in the early part of the sample, but then the fitted value is above the
actual data from about 1930 through 1980 and then too low again in the last years of the sample. If we could get an equation with some upward curvature perhaps we could do a better job of matching up with the data. One way to specify a curve is with a quadratic equation such as:
log(volumet) = a + b1t + b2t2 + e
For this equation we need a squared time trend. As in most computer programs, EViews uses the caret, “^”, for exponentiation. In the command pane type:
series tsqr = t^2

Estimating your first regression in EViews—17
To see that this does give us a bit of a curve, double-click . Then in the series window choose
View/Graph... and select Line to see a plot showing a reassuring upward curve.
Close the equation window and any series windows that are cluttering the screen. (Don’t close the workfile window.)
Now let’s estimate a regression including t2 to see if we can do a better job of matching the data. EViews is generally quite happy to let you use a mathematical expres-
sion right in the LS command, rather than having to first generate a variable under a new name. To illustrate this capability type in the command pane:
ls log(volume) c t tsqr
We’ve typed in “log(volume)” instead of the series name LOGVOL, and could have typed “t^2” instead of tsqr: thus illustrating that you can use either a series name or an algebraic expression in a regression command.
EViews provides estimates for all three coefficients, aˆ , bˆ 1 , and bˆ 2 .
Has adding t2 to the equation given a better fit? Let’s take a look at the residuals for this new equation. Click View/Actual, Fitted, Residual/Actual, Fitted, Residual Graph again. The fitted line now does a much nicer job of matching the long
run characteristics of
log(volume). In particular, the residuals over the last several decades are now flat rather than trending strongly upward. This new equation is noticeably better at fitting recent data.