Using Stata for Principles of Econometrics

Using Stata for Principles of Econometrics, Fourth Edition, by Lee C. Adkins and R. Carter Hill, is a companion to the introductory econometrics textbook Principles of Econometrics, Fourth Edition. Together, the two books provide a very good introduction to econometrics for undergraduate students and first-year graduate students.

The main textbook takes a learn-by-doing approach to econometric analysis, and this companion book illustrates the “doing” part using Stata. Adkins and Hill briefly show how to use Stata’s menu system and command line before delving into their many examples.

Using Stata for Principles of Econometrics, Fourth Edition shows how to use Stata to reproduce the examples in the main textbook and how to interpret the output. The current edition has been updated to include features introduced in Stata 11, such as the margins command to compute elasticities. Together with Principles of Econometrics, Fourth Edition, the reader will not only learn econometrics but also gain the confidence needed to perform his or her own work using Stata.

CHAPTER 1 INTRODUCING STATA

Starting Stata
The opening display
Exiting Stata
Stata data files for Principles of Econometrics

A working directory

Opening Stata data files

The use command
Using the toolbar
Using files on the Internet
Locating book files on the Internet

The variables window

Using the data editor for a single label
Using the data utility for a single label
Using variables manager

Describing data and obtaining summary statistics
The Stata help system

Using keyword search
Using command search
Opening a dialog box
Complete documentation in Stata manuals

Stata command syntax

Syntax of summarize
Learning syntax using the review window

Saving your work

Copying and pasting
Using a log file

Using the data browser
Using Stata graphics

Histograms
Scatter diagrams

Using Stata do-files
Creating and managing variables

Creating (generating) new variables
Using the expression builder
Dropping or keeping variables and observations
Using arithmetic operators
Using Stata math functions

Using Stata density functions

Cumulative distribution functions
Inverse cumulative distribution functions

Using and displaying scalars

Example of standard normal cdf
Example of t-distribution tail-cdf
Example of computing percentile of the standard normal
Example of computing percentile of the t-distribution

A scalar dialog box
Using factor variables

Creating indicator variables using a logical operator
Creating indicator variables using tabulate

Key terms

Chapter 1 do-file

 

CHAPTER 2 SIMPLE LINEAR REGRESSION

The food expenditure data

Starting a new problem
Starting a log file
Opening a Stata data file
Browsing and listing the data

Computing summary statistics
Creating a scatter diagram

Enhancing the plot

Regression

Fitted values and residuals
Computing an elasticity
Plotting the fitted regression line
Estimating the variance of the error term
Viewing estimated variances and covariances

Using Stata to obtain predicted values

Saving the Stata data file

Estimating nonlinear relationships

A quadratic model
A log-linear model

Regression with indicator variables
Appendix 2A Average marginal effects

Elasticity in a linear relationship
Elasticity in a quadratic relationship
Slope in a log-linear model

Appendix 2B A simulation experiment

Key terms

Chapter 2 do-file

 

CHAPTER 3 INTERVAL ESTIMATION AND HYPOTHESIS TESTING

Interval estimates

Critical values from the t-distribution
Creating an interval estimate

Hypothesis tests

Right-tail test of significance
Right-tail test of an economic hypothesis
Left-tail test of an economic hypothesis
Two-tail test of an economic hypothesis

p-values

p-value of a right-tail test
p-value of a left-tail test
p-value for a two-tail test
p-values in Stata output
Testing and estimating linear combinations of parameters

Appendix 3A Graphical tools
Appendix 3B Monte Carlo simulation

Key terms

Chapter 3 do-file

 

CHAPTER 4 PREDICTION, GOODNESS-OF-FIT AND MODELING ISSUES

Least squares prediction

Editing the data
Estimate the regression and obtain postestimation results
Creating the prediction interval

Measuring goodness-of-fit

Correlations and R2

The effects of scaling and transforming the data

The linear-log functional form
Plotting the fitted linear-log model
Editing graphs

Analyzing the residuals

The Jarque-Bera test
Chi-square distribution critical values
Chi-square distribution p-values

Polynomial models

Estimating and checking the linear relationship
Estimating and checking a cubic equation
Estimating a log-linear yield growth model

Estimating a log-linear wage equation

The log-linear model

Calculating wage predictions

Constructing wage plots
Generalized R2
Prediction intervals in the log-linear model

A log-log model

Key terms

Chapter 4 do-file

 

CHAPTER 5 MULTIPLE LINEAR REGRESSION

Big Andy’s Burger Barn
Least squares prediction
Sampling precision
Confidence intervals

Confidence interval for a linear combination of parameters

Hypothesis tests

Two-sided tests
One-sided tests
Testing a linear combination

Polynomial equations

Optimal advertising: nonlinear combinations of parameters
Using factor variables for interactions

Interactions
Goodness-of-fit

Key terms

Chapter 5 do-file

 

CHAPTER 6 FURTHER INFERENCE IN THE MULTIPLE REGRESSION MODEL

The F-test

Testing the significance of the model
Relationship between t- and F-tests
More general F-tests

Nonsample information
Model specification

Omitted variables
Irrelevant variables
Choosing the model

Poor data, collinearity, and insignificance

Key terms

Chapter 6 do-file

 

CHAPTER 7 USING INDICATOR VARIABLES

Indicator variables

Creating indicator variables
Estimating an indicator variable regression
Testing the significance of the indicator variables
Futher calculations
Computing average marginal effects

Applying indicator variables

Interactions between qualitative factors
Adding regional indicators
Testing the equivalence of two regressions
Estimating separate regressions
Indicator variables in log-linear models

The linear probability model
Treatment effects
Differences-in-differences estimation

Key terms

Chapter 7 do-file

 

CHAPTER 8 HETEROSKEDASTICITY

The nature of heteroskedasticity
Detecting heteroskedasticity

Residual plots
Lagrange multiplier tests
The Goldfeld-Quandt test

Heteroskedastic-consistent standard errors
The generalized least squares estimator

GLS using grouped data
Feasible GLS–a more general case

Heteroskedasticity in the linear probability model

Key terms

Chapter 8 do-file

 

CHAPTER 9 REGRESSION WITH TIME-SERIES DATA: STATIONARY VARIABLES

Introduction

Defining time-series in Stata
Time-series plots
tata’s lag and difference operators

Finite distributed lags
Serial correlation
Other tests for serial correlation
Estimation with serially correlated errors

Least squares and HAC standard errors
Nonlinear least squares
A more general model

Autoregressive distributed lag models

Phillips curve
Okun’s law
Autoregressive models

Forecasting

Forecasting with an AR model
Exponential smoothing

Multiplier analysis
Appendix

Durbin-Watson test
Prais-Winsten FGLS

Key terms

Chapter 9 do-file

 

CHAPTER 10 RANDOM REGRESSORS AND MOMENT BASED ESTIMATION

Least squares estimation of a wage equation
Two-stage least squares
IV estimation with surplus instruments

Illustrating partial correlations

The Hausman test for endogeneity
Testing the validity of surplus instruments
Testing for weak instruments
Calculating the Cragg-Donald F-statistic
A simulation experiment

Key terms

Chapter 10 do-file

 

CHAPTER 11 SIMULTANEOUS EQUATIONS MODELS

Truffle supply and demand
Estimating the reduced form equations
2SLS estimates of truffle demand
2SLS estimates of truffle supply
Supply and demand of fish
Reduced forms for fish price and quantity
2SLS estimates of fish demand
2SLS alternatives
Monte Carlo simulation

Key terms

Chapter 11 do-file

 

CHAPTER 12 REGRESSION WITH TIME-SERIES DATA: NONSTATIONARY VARIABLES

Stationary and nonstationary data

Review: generating dates in Stata
Extracting dates
Graphing the data

Spurious regressions
Unit root tests for stationarity
Integration and cointegration

Engle-Granger test
Error-correction model

Key terms

Chapter 12 do-file

 

CHAPTER 13 VECTOR ERROR CORRECTION AND VECTOR AUTOREGRESSIVE MODELS

VEC and VAR models
Estimating a VEC model
Estimating a VAR
Impulse responses and variance decompositions

Key terms

Chapter 13 do-file

 

CHAPTER 14 TIME-VARYING VOLATILITY AND ARCH MODELS

ARCH model and time-varying volatility
Estimating, testing, and forecasting
Extensions

GARCH
T-GARCH
GARCH-in-mean

Key terms

Chapter 14 do-file

 

CHAPTER 15 PANEL DATA MODELS

A microeconomic panel
A pooled model

Cluster-robust standard errors

The fixed effects model

The fixed effects estimator
The fixed effects estimator using xtreg
Fixed effects using the complete panel

Random effects estimation

The GLS transformation
The Breusch-Pagan test
The Hausman test
The Hausman-Taylor model

Sets of regression equations

Seemingly unrelated regressions
SUR with wide data

Mixed models

Key terms

Chapter 15 do-file

 

CHAPTER 16 QUALITATIVE AND LIMITED DEPENDENT VARIABLE MODELS

Models with binary dependent variables

Average marginal effects
Probit marginal effects: details
Standard error of average marginal effect

The logit model for binary choice

Wald tests
Likelihood ratio tests
Logit estimation
Out-of-sample prediction

Multinomial logit
Conditional logit

Estimation using asclogit

Ordered choice models
Models for count data
Censored data models

Simulated data example
Mroz data example

Selection bias

Key terms

Chapter 16 do-file

 

APPENDIX A REVIEW OF MATH ESSENTIALS

Stata math and logical operators
Math functions
Extensions to generate
The calculator
Scientific notation
Numerical derivatives and integrals

Key terms

Appendix A do-file

 

APPENDIX B REVIEW OF PROBABILITY

Stata probability functions
Binomial distribution
Normal distribution

Normal density plots
Normal probability calculations

Student’s t-distribution

Plot of standard normal and t(3)
t-distribution probabilities

Graphing tail probabilities

F-distribution

Plotting the F-density
F-distribution probability calculations

Chi-square distribution

Plotting the chi-square density
Chi-square probability calculations

Random numbers

Using inversion method
Creating uniform random numbers

Key terms

Appendix B do-file

 

APPENDIX C REVIEW OF STATISTICAL INFERENCE

Examining the hip data

Constructing a histogram
Obtaining summary statistics
Estimating the population mean

Using simulated data values
The central limit theorem
Interval estimation

Using simulated data
Using the hip data

Testing the mean of a normal population

Right-tail test
Two-tail test

Testing the variance of a normal population
Testing the equality of two normal population means

Population variances are equal
Population variances are unequal

Testing the equality of two normal population variances
Testing normality
Maximum likelihood estimation
Kernel density estimator

Key terms

Appendix C do-file

Author: Lee C. Adkins and R. Carter Hill
Edition: Fourth Edition
ISBN-13: 978-1-118-03208-4
©Copyright: 2011

Using Stata for Principles of Econometrics, Fourth Edition, by Lee C. Adkins and R. Carter Hill, is a companion to the introductory econometrics textbook Principles of Econometrics, Fourth Edition. Together, the two books provide a very good introduction to econometrics for undergraduate students and first-year graduate students.