An Introduction to Modern Econometrics using Stata

An Introduction to Modern Econometrics Using Stata, by Christopher F. Baum, successfully bridges the gap between learning econometrics and learning how to use Stata. The book presents a contemporary approach to econometrics, emphasizing the role of method-of-moments estimators, hypothesis testing, and specification analysis while providing practical examples showing how the theory is applied to real datasets by using Stata.

 

The first three chapters are dedicated to the basic skills needed to effectively use Stata: loading data into Stata; using commands like generate andreplace, egen, and sort to manipulate variables; taking advantage of loops to automate tasks; and creating new datasets by using merge and append. Baum succinctly yet thoroughly covers the elements of Stata that a user must learn to become proficient, providing many examples along the way.

Chapter 4 begins the core econometric material of the book and covers the multiple linear regression model, including efficiency of the ordinary least-squares estimator, interpreting the output from regress, and point and interval prediction. The chapter covers both linear and nonlinear Wald tests, as well as constrained least-squares estimation, Lagrange multiplier tests, and hypothesis testing of nonnested models.

 

Chapters 5 and 6 focus on consequences of failures of the linear regression model’s assumptions. Chapter 5 addresses topics like omitted-variable bias, misspecification of functional form, and outlier detection. Chapter 6 is dedicated to non-independently and identically distributed errors, and it introduces the Newey–West and Huber/White covariance matrices, as well as feasible generalized least-squares estimation in the presence of heteroskedasticity or serial correlation. Chapter 7 is dedicated to the use of indicator variables and interaction effects.

 

Instrumental-variables estimation has been an active area of research in econometrics, and chapter 8 commendably addresses issues like weak instruments, underidentification, and generalized method-of-moments estimation. In this chapter, Baum extensively uses his wildly popular ivreg2command.

 

The last two chapters briefly introduce panel-data analysis and discrete and limited-dependent variables. Two appendices detail importing data into Stata and Stata programming. As in all chapters, Baum presents many Stata examples.

 

An Introduction to Modern Econometrics Using Stata can serve as a supplementary text in both undergraduate- and graduate-level econometrics courses, and the book’s examples will help students quickly become proficient in Stata. The book is also useful to economists and businesspeople wanting to learn Stata by using practical examples.

 

About the author

Christopher F. Baum is an economist at Boston College, where he codirects the undergraduate minor in scientific computation. He is an associate editor of the Stata Journal and co-organizer of Stata Users Group meetings in Boston. Baum has coauthored many Stata routines and maintains the Statistical Software Components Archive of downloadable Stata components. He has taught econometrics at the undergraduate and graduate levels, making extensive use of Stata, for many years.

Illustrations
Preface
Notation and typography

 

1. INTRODUCTION

An overview of Stata’s distinctive features
Installing the necessary software
Installing the support materials

 

2. WORKING WITH ECONOMIC AND FINANCIAL DATA IN STATA

The basics

The use command
Variable types
_n and _N
generate and replace

sort and gsort
if exp and in range
Using if exp with indicator variables
Using if exp versus by varlist: with statistical commands

Labels and notes
The varlist
drop and keep
rename and renvars
The save command
insheet and infile

Common data transformations

The cond() function
Recoding discrete and continuous variables
Handling missing data

mvdecode and mvencode

String-to-numeric conversion and vice versa
Handling dates
Some useful functions for generate or replace
The egen command

Official egen functions
egen functions from the user community

Computation for by-groups
Local macros
Looping over variables: forvalues and foreach
Scalars and matrices
Command syntax and return values

 

3. ORGANIZING AND HANDLING ECONOMIC DATA

Cross-sectional data and identifier variables
Time-series data

Time-series operators

Pooled cross-sectional time-series data
Panel data

Operating on panel data

Tools for manipulating panel data

Unbalanced panels and data screening
Other transforms of panel data
Moving-window summary statistics and correlations

Combining cross-sectional and time-series datasets
Creating long-format datasets with append

Using merge to add aggregate characteristics
The dangers of many-to-many merges

The reshape command

The xpose command

Using Stata for reproducible research

Using do-files
Data validation: assert and duplicates

 

4. LINEAR REGRESSION

Introduction
Computing linear regression estimates

Regression as a method-of-moments estimator
The sampling distribution of regression estimates
Efficiency of the regression estimator
Numerical identification of the regression estimates

Interpreting regression estimates

Research project: A study of single-family housing prices
The ANOVA table: ANOVA F and R-squared
Adjusted R-squared
The coefficient estimates and beta coefficients
Regression without a constant term
Recovering estimation results
Detecting collinearity in regression

Presenting regression estimates

Presenting summary statistics and correlations

Hypothesis tests, linear restrictions, and constrained least squares

Wald tests with test
Wald tests involving linear combinations of parameters
Joint hypothesis tests
Testing nonlinear restrictions and forming nonlinear combinations
Testing competing (nonnested) models

Computing residuals and predicted values

Computing interval predictions

Computing marginal effects

Appendix: Regression as a least-squares estimator

Appendix: The large-sample VCE for linear regression

 

5. SPECIFYING THE FUNCTIONAL FORM

Introduction
Specification error

Omitting relevant variables from the model

Specifying dynamics in time-series regression models

Graphically analyzing regression data
Added-variable plots
Including irrelevant variables in the model
The asymmetry of specification error
Misspecification of the functional form
Ramsey’s RESET
Specification plots
Specification and interaction terms
Outlier statistics and measures of leverage

The DFITS statistic
The DFBETA statistic

Endogeneity and measurement error

 

6. REGRESSION WITH NON-I.I.D. ERRORS

The generalized linear regression model

Types of deviations from i.i.d. errors
The robust estimator of VCE
The cluster estimator of VCE
The Newey–West estimator of VCE
The generalized-least squares estimator

The FGLS estimator

Heteroskedasticity in the error distribution

Heteroskedasticity related to scale

Testing for heteroskedasticity related to scale
FGLS estimation

Heteroskedasticity between groups of observations

Testing for heteroskedasticity between groups of observations
FGLS estimation

Heteroskedasticity in grouped data

FGLS estimation

Serial correlation in the error distribution

Testing for serial correlation
FGLS estimation with serial correlation

 

7. REGRESSION WITH INDICATOR VARIABLES

Testing for significance of a qualitative factor

Regression with one qualitative measure
Regression with two qualitative measures

Interaction effects

Regression with qualitative and quantitative factors

Testing for slope differences

Seasonal adjustment with indicator variables
Testing for structural stability and structural change

Constraints of continuity and differentiability
Structural change in a time-series model

 

8. INSTRUMENTAL-VARIABLES ESTIMATORS

Introduction
Endogeneity in economic relationships
2SLS
The ivreg command
Identification and tests of overidentifying restrictions
Computing IV estimates
ivreg2 and GMM estimation

The GMM estimator
GMM in a homoskedastic context
GMM and heteroskedasticity-consistent standard errors
GMM and clustering
GMM and HAC standard errors

Testing and overidentifying restrictions in GMM

Testing a subset of the overidentifying restrictions in GMM

Testing for heteroskedasticity in the IV context
Testing the relevance of instruments
Durbin–Wu–Hausman tests for endogeneity in IV estimation
Appendix: Omitted-variables bias
Appendix: Measurement error

Solving errors-in-variables problems

 

9. PANEL-DATA MODELS

FE and RE models

One-way FE
Time effects and two-way FE
The between estimator
One-way RE
Testing the appropriateness of RE
Prediction from one-way FE and RE

IV models for panel data
Dynamic panel-data models
Seemingly unrelated regression models

SUR with identical regressors

Moving-window regression estimates

 

10. MODELS OF DISCRETE AND LIMITED DEPENDENT VARIABLES

Binomial logit and probit models

The latent-variable approach
Marginal effects and predictions

Binomial probit
Binomial logit and grouped logit

Evaluating specification and goodness of fit

Ordered logit and probit models
Truncated regression and tobit models

Truncation
Censoring

Incidental truncation and sample-selection models
Bivariate probit and probit with selection

Binomial probit with selection

 

A. GETTING THE DATA INTO STATA

Inputting data from ASCII text files and spreadsheets

Handling text files

Free format versus fixed format
The insheet command

Accessing data stored in spreadsheets
Fixed-format data files

Importing data from other package formats

 

B. THE BASIC OF STATA PROGRAMMING

Local and global macros

Global macros
Extended macro functions and list functions

Scalars
Loop constructs

Foreach

Matrices
Return and ereturn

Ereturn list

The program and syntax statements
Using Mata functions in Stata programs

Author: Christopher F. Baum
ISBN-13: 978-1-59718-013-9
©Copyright: 2006
Versione e-Book disponibile

An Introduction to Modern Econometrics Using Stata, by Christopher F. Baum, successfully bridges the gap between learning econometrics and learning how to use Stata. The book presents a contemporary approach to econometrics, emphasizing the role of method-of-moments estimators, hypothesis testing, and specification analysis while providing practical examples showing how the theory is applied to real datasets by using Stata.