
- •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

100—Chapter 4. Data—The Transformational Experience
series overallmean = @mean(y)
series samplemean1 = @mean(y,s2)
series samplemean2 = @mean(y,"@first+1 @last if y=y(-1)")
OVERALLMEAN gives the mean of Y taken over all observations. SAMPLEMEAN1 takes the mean of those observations included in S2, as does SAMPLEMEAN2.
Data Types Plain and Fancy
Series hold either numbers or text. That’s it.
Except that sometimes numbers aren’t numbers, they’re dates. And sometimes the numbers or text you see aren’t there at all because you’re looking at a value map instead. We’ll start simply with numbers and text and then let the discussion get a teeny bit more complicated.
Numbers and Letters
As you know, the command series creates a new data series, each observation holding one number. Series icons are displayed with the series icon, . EViews stores numbers with about 16 digits of accuracy, using what computer types call double precision.
Computer hint: Computer arithmetic is not perfect. On very rare occasion, this matters.
Data hint: Data measurement is not perfect. On occasion, this matters a lot.

Numbers and Letters—101
Number Display
By default, EViews displays numbers in a format that’s pretty easy to read. You can change the format for displaying a series through the Properties dialog of the spreadsheet view of the series. Check boxes let you use a thousands separator (commas are the default), put negative values in parentheses (often used for financial data), add a trailing “%” (doesn’t change the value displayed, just adds the percent sign), or use a comma to separate the integer and decimal part of the number.
Hint: Click on a cell in the spreadsheet view to see a number displayed in full precision in the status line at the bottom of the EViews window.
The Numeric display dropdown menu in the dialog provides options in addition to the default Fixed characters. Significant digits drops off trailing zeros after the decimal. Using Fixed decimal, you can pick how many places to show after the decimal. For example, you might choose two places after the decimal for data measured in dollars and cents. Scientific notation (sometimes called engineering notation) puts one digit in front of the decimal and includes a power of ten. For example, 12.05 would appear as
1.205E01. Percentage displays numbers as percentages, so 0.5 appears as 50.00. (To add a “%” symbol, check the Trailing % checkbox.) Fraction displays fractions rather than deci-

102—Chapter 4. Data—The Transformational Experience
mals. This can be especially useful for financial data in which prices were required to be rounded. For example, “10 1/8” rather than “10.125”.
EViews saves any display changes you make in the series window Properties dialog Display tab and uses them whenever you display the series. Remember that the Properties dialog changes the way the number is displayed, not the underlying value of the number.
Hint: To change the default display, use the menu Options/Spreadsheet Defaults…. See Chapter 18, “Optional Ending.”
Letters
EViews’ second major data type is text data, stored in an alpha series displayed with the icon. You create an alpha series by typing the command:
alpha aname
or using the Object/New Object…/Series Alpha menu.
Double-clicking an alpha series opens a spreadsheet view which you can edit just as you would a numeric series.

Numbers and Letters—103
Hint: If you use text in the command line, be sure to enclose the text in quotes. For example,
alpha alphabet = "abc's"
To include a quote symbol in a string as part of a command, use a pair of quotes. To create a string consisting of a single double quote symbol write:
alpha singledoublequote = """"
Hint: Named auto-series defined using frml work for alpha series just as they do for numeric series.
Alpha series have two quirks that matter once in a great while. The first quirk is that the “not available” code for alpha series is the empty string, “”, rather than NA. Visually, it’s difficult to tell the difference between an empty string and a string holding nothing but one or more spaces. They both have a blank look about them.
The second quirk is that all alpha series in EViews share a maximum length. Strings with more than the maximum permitted characters are truncated. By default, 40 characters are permitted. While you can’t change the truncation limit for an individual series, you can change the default through the
General Options/Series and Alphas/Alpha truncation dialog. And you should. Again, see Chapter 18, “Optional Ending.”

104—Chapter 4. Data—The Transformational Experience
String Functions
String functions are documented in the Command and Programming Reference. An example here gives a taste. The series STATE contains state names. Unfortunately, spellings vary.
Consider the following expressions:
show state state="Wash" @upper(state)="WASH" @upper(@left(state,2))="WA"
The group window shows the results of all three comparisons. ‘state= "Wash"’ is true for observations 1, 2, and 4 (“Wash”), but
not for the third or fifth observation (“wash” and “WASH”), because upper and lower case letters are not equal. The next comparison uses the function @upper, which produces an uppercase version of a string, to pick up observations 1 through 5 by making the comparison using data converted to uppercase. Both upper and lower case are changed to upper case before the comparison is made.
Converting everything to upper or lower case before making comparisons is a useful trick, but doesn’t help with fundamentally different spellings such as “Wash” and “Washington.” For this particular set of data, all spellings of Washington begin with “wa” and the spelling of no other state begins with “wa.” So various spellings can be picked out by looking only at the first two letters (in uppercase), which is what the function @left(state,2) does for us. (@left(a,n) picks out the first n letters of string a. EViews provides a comprehensive set of such functions. As we said above, see Appendix F of the Command and Programming Reference.)
Embarrassing revelation: I once spent weeks on a consulting project producing wrong answers because I didn’t realize “Washington” had been spelled about half a dozen different ways. The first few hundred observations that I checked visually all had the same spelling and I didn’t think to check further.

Numbers and Letters—105
There’s no general procedure for comparing strings by meaning rather than spelling, although the @youknowwhatimeant function is eagerly awaited in a future release. In the meantime, the One-Way Tabulation… view (see Chapter 7, “Look At Your Data”) gives a list of all the unique values of a series. This offers a quick check for various spellings for alpha series where a limited number of values are expected, as is true of state names.
Uncheck the boxes in the Tabulate Series dialog except for Show Count.
The view that pops up gives a nicely alphabetized list of spellings.
One more string function is very useful, but doesn’t look like a function. When used between alpha series, “+” means concatenate. Thus the command
="a"+"b"+"c"
gives the string “abc”.
Hint: Typing an equal sign followed by an expression turns EViews into a nice desk calculator. Results are shown in the status line at the bottom of the EViews window.