Notebook Aug2006

Download as pdf or txt
Download as pdf or txt
You are on page 1of 57

1

NOTEBOOK1
Panel Data Course
Social Policy Evaluation, Analysis and
Research Centre

Robert Breunig

Centre for Economic Policy Research,


Research School of Social Sciences
& Faculty of Economics and Commerce
The Australian National University

1 Copyright 2001 and 2004, Robert V. Breunig


2
1 Introduction

Models
The two key ingredients in any economic policy analysis are an economic model and
a sample of data. The economic model is combined with some statistical assumptions
to produce an econometric model which is the basis for estimation using the sample
data. This course will focus almost exclusively on econometric models and data issues.
However, it is good to keep in mind that a sound economic model must lie behind any
successful empirical analysis The economic model informs the questions we ask, the
estimation strategy, and the interpretation of the results. Without careful thinking about
the underlying economic model, it is easy to fall into the trap of producing senseless
results. This will become more clear during the course.

Data and Surveys


How should I collect a sample of data? How should I ensure that my sample is repre-
sentative? How should I ensure that I get enough observations about small populations
of particular interest? How should I ask questions so that respondents answer correctly
and accurately? What is the right number of questions to ask? How big should my
sample be?
All of these questions, and a bevy of others, are important in designing and imple-
menting any successful survey. I will take the standard approach in econometrics of
assuming that we have a sample of data in hand and that the data accurately reflects re-
ality. By brushing over the issues of survey design, data collection, and data quality, I
would be disappointed if I gave the impression that these issues were not of first order
importance. I think they are. Time does not allow me to address them satisfactorily.
There are no fancy econometric techniques available to solve serious problems of
poor quality data. Getting the data right in the first place is crucial. After that it is very
important for producers of data to clearly document the source of the data, the techniques
that were used for weighting the data, how problems of non-response or conflicting re-
sponses were dealt with, how constructed variables were made, etc. Without knowledge
of what the data is, it is impossible to interpret the econometric results from any estima-
tion technique.
Groves (1989) is an excellent text on survey design and focuses heavily on questions
of data quality and how to design surveys to maximize accurate response. Griliches
(1986) treats the problem of data quality from an econometric point of view and dis-
cusses some of the methods that econometricians have developed to “fix” problems of
data quality and measurement error after they occur.
4 Chapter 1 Introduction

Samples and Populations


In order to discuss econometric models in a general framework, it is useful to develop
some notation. Suppose that we have a sample of data on some variable which we will
represent with the letter y. Our sample is of size n and is gathered at one point in time
from n different individuals. This is what is called a cross-section of data. We represent
this data as
yi , i = 1, 2, 3, . . . , n
We may think of this data being a sample from a population of size N
Yi , i = 1, 2, 3, . . . , N
or we may think of this data as coming from some kind of distribution (an infinitely-
sized population) such as a normal distribution
Y ∼ N(μy , σ 2y ).
The preceding line should be read as “Y is normally distributed with mean mu of y and
variance sigma-squared of y.” We call the true mean and variance of a random variable
the population mean and variance. In a finite population of size N these quantities
could be known if we had a census, i.e. all the data.
Interestingly, economists usually think of the infinite-population framework when
they study economic issues. This is based upon the belief that the behaviour in eco-
nomic models applies not only to individuals in the population but also to ‘hypothetical’
individuals who don’t actually exist but to whom we might wish to apply the analysis.
Economists also study time series of data. We use t to index observations over time

yt , t = 1, 2, 3, . . . , T
Not knowing which t will be the last, we can only apply the infinite-population thinking
to this type of problem. An example is Australian GDP observed quarterly since 1946.
We usually number the first observation in the time series t = 1 and then increase the
index by 1 each time period. The time subscript t helps to preserve the correct order of
the data. It does not have any particular real-world content, however, as the difference
between t = 2 and t = 3 may be one quarter, one year, or five years.
When the data are a time series, it is important to maintain the order of the data,
since observations which follow one another in time must be kept in the same order in
the sample in order to conduct the analysis. For cross-sectional data, it is generally the
case that order is unimportant. We can rearrange our n observations on n individuals
and this has no affect on our analysis.
Being multi-variate type people, economists generally use data on many variables.
Suppose for example that we have cross-sectional data on some variable y and five
variables which we might call x1 , x2 , x3 , x4 , and x5 . Our data is now represented by
yi , i = 1, 2, 3, . . . , n
xi1 , i = 1, 2, 3, . . . , n
xi2 , i = 1, 2, 3, . . . , n
xi3 , i = 1, 2, 3, . . . , n
xi4 , i = 1, 2, 3, . . . , n
xi5 , i = 1, 2, 3, . . . , n
Parameters, Estimates, and Estimators 5

Thinking about the data in the way that I have written above is actually pretty clumsy.
Instead, it is best to think about the data arranged as a kind of spreadsheet
y1 x11 x12 x13 x14 x15
y2 x21 x22 x23 x24 x25
y3 x31 x32 x33 x34 x35
.. .. .. .. .. ..
. . . . . .
yn xn1 xn2 xn3 xn4 xn5

where each column is one variable and each row represents one observation or individ-
ual. We can still rearrange our n data points in any way that we like, however, now we
need to keep all the elements of any row together since these variables relate to the same
individual. An observation is thus made up of many variables observed for the same
individual.

Parameters, Estimates, and Estimators


A parameter is simply a number–some value of interest. For example, the average
income in the Australian population or the own-price elasticity (percentage demand
change for a 1 percent price change) of gasoline. For the purposes of this course,
we can think of a parameter as the ‘true’ value of this object of interest. An estimator is
a rule for constructing a guess of the true parameter value. An estimate is the number
that comes out of the rule for a given sample of size n. An estimate is based upon a col-
lection of random variables (the data from the sample) and is therefore itself a random
variable. It has a variance which will depend upon the rule used to construct the esti-
mate (estimator) and the actual sample of data. Parameters are constant and therefore
have no variance.
Consider a simple example. An estimator for the population mean μy of a variable
y is the sample average
n
1X
y= yi (1)
n i=1
It is easy to show2 that the variance of the estimator y is
σ2y
V ar(y) =
n
and we can estimate (we frequently usebto indicate that the quantity is an estimate) that
for any given sample as
s2y
Vdar(y) =
n
using the estimate of the variance of y from that particular sample
n
1 X
s2y = (yi − y)2 (2)
n − 1 i=1
The smaller the variance of y the more precise will be our estimate of y. Two things
should be immediately apparent. One is that the estimate is more precise if the variance

2 In all of what follows we assume simple random sampling with replacement as the sample design. It is

easy to correct for deviations from this in most applications.


6 Chapter 1 Introduction

of y, σ 2y is small. The second is that, in general, larger samples will be more precise
than smaller samples. Having a small variance of y would appear to be a good thing for
estimating a mean. This is true if the true population variance of y is small. If in fact
the true population variance is large but the particular sample has small variance, then
the ‘precision’ will be misleading.
Here we introduce some notation for several parameters involving two different ran-
dom variables, y and x, that will be very valuable in the discussion that follows.
The expected value of y is the population mean of y and is written as
E(y)
The expected value of y conditional on x is the population mean of y for some given
value of x

E(y|x)
The population variance of y is given by
V ar(y) = E[y − E(y)]2
and the population variance of y conditional on x
V ar(y|x)
is defined analogously.
We also define the population covariance of y and x
Cov(y, x) = E (y − E(y)) (x − E(x)) .
Given a sample of data, we can estimate the mean and variance of a variable using
(1) and (2) above. The sample covariance is
n
1X
c
cov(x, y) = (xi − x) (yi − y) .
n i=1
2 Linear Regression Analysis

The basis of the panel data techniques discussed in this course is the linear regression
model. Understanding the main aspects of this model, how to interpret the coefficients,
and how to test simple hypotheses provide a necessary foundation for discussing panel
data methods.

Two-variable linear regression: a simple example


Consider the following very simple model which we have estimated by ordinary least
squares (OLS)
d = 38.61 + .13 ∗ income
fexp
(2.69) (.01)
n = 975 R2 = .143
dataset : sandiego.raw

where fexp is total weekly household food expenditure and income is total weekly
household income. We want to know how expenditure on food changes with income.
We can estimate this relationship as a two-variable linear regression model.
What is the economic theory behind this relationship? What is the econometric
theory?

Economic Theory
1. Increasing income causes increasing food expenditure, not the other way around.

2. Linear budget constraint.

3. Utility-maximizing consumers (consistent behaviour)

4. Non-satiation.

5. Continuity (for mathematical convenience, but also implies that small changes have
small effects)

Econometric Theory
1. fexp= β 1 + β 2 ∗ income + u

2. the sample of data is random


8 Chapter 2 Linear Regression Analysis

3. u captures everything that affects food expenditure besides income

4. Omitted variables (u) not correlated with income

5. income does not depend upon food expenditure

What do I learn from this model? first, the relationship between food expenditure
and income is positive as expected. Secondly, I learn something about the size of
the relationship. Consider the following thought experiment: consider an average
household with $100 of income and hold everything about that household constant but
increase income by 1 dollar. The model tells me that before the increase in income
the household was spending $51.61 on food. After the $1 increase, the household is
spending $51.74 on food. So the model is telling me that a $1 increase in expenditure
is associated, on average, with a $0.13 increase in food expenditure. It is easy to verify
that this change is constant starting at any initial level of income, not just at $100.
Thirdly, I can conjecture that a household with income = 0 might be expected
to spend $38.61 on food. There may not be any households in the sample with no
income so this may not be a very good estimate. (It is best to be careful about making
conjectures about behaviour outside of the range of the sample used to estimate the
model.) It is generally the case in economics that we are more interested in the “slope”
coefficient than the “intercept” coefficient.

Two-variable linear regression: a general model


The simplest model is one in which one variable y depends upon some variable x and
all other influences are grouped into an error term labelled u
y = β1 + β2x + u (3)
y is called the
• Dependent variable

x is called the
• Independent Variable; or
• Control Variable; or
• Explanatory Variable

u is known as the
• error term; or
• disturbance
and contains all other unobserved factors affecting y.

β 1 and β 2 are called the


• partial regression coefficients
9

Letting ∆ denote a small change, consider changing x by some small amount ∆x


and keeping u unchanged. Then
∆y = β 2 ∆x
and if ∆x = 1 then β 2 is easily seen to be the change in y for a one unit change in x.
This can also be derived using calculus arguments. The term marginal regression coef-
ficient is often applied to β because its interpretation involves holding all other random
variables constant and looking at the effect of varying one aspect of the model at a time.
The model can be thought of as consisting of two parts. The first part is the condi-
tional mean model for a given value of x
E(y|x) = β 1 + β 2 x
and the second part is the idiosyncratic part that will differ for each individual
u = y − E(y|x)
If you consider the food expenditure example, we can think of there being many
households with $100 income and the model tells us what we would expect those house-
holds, on average, to consume. We do not expect the households to behave identically
and u captures the individual heterogeneity that any economic relationship will exhibit.

Estimation
When we estimate this model, we make five key assumptions
A1 The data come from a random sample

A2 The model is linear in parameters

A3 E(u|x) = 0.

A4 Variance of u is constant (σ2 ) and u is uncorrelated across individuals.

A5 The sample variance of x is not zero.

Deriving estimators is far from the purpose of this course. Advanced econometric
software packages take care of estimation for us. I will just make three comments.
first there are essentially three approaches to estimating (3):
• OLS: We pick the parameters to minimize the sum of u2 where u = y − β 1 − β 2 x
• GMM: We impose the moment conditions E(u) = 0 and Cov(u, x) = 0 over the
sample. That gives two equations
X
ui = 0
X
ui xi = 0
that can be solved for the two values of β.
• Maximum Likelihood: We specify a probability distribution function for the u (usu-
ally normal) and we pick the parameters such that the likelihood (probability) of
observing the actual sample is maximized.

In this simple framework, all three methods lead to the same outcome. In more com-
plicated models that will not be the case, so we need to take some care about weighing
10 Chapter 2 Linear Regression Analysis

the pros and cons of each method. Further discussion of these issues is well beyond the
scope of this course.
Secondly, the formula for estimating the slope is
c
b2 = cov(x, y)
β .
vd
ar(x)
One obvious thing that we learn by looking at this formula is that if there is no variation
in x we can not learn anything about β 2 . Take a trivial example: suppose we only have
people in our sample with incomes of $100. Then we can not learn anything about the
relationship between food expenditure and income. Having the “right kind” of variation
in the data is crucial for econometric estimation. This intuition also extends to much
more complicated problems. In any situation where one variable does not vary or varies
only a little, it will be very difficult to learn about its relationship with other variables.
Thirdly, the variance of β b2 in this simple model is

b )= σ2
V ar(β 2 P
n .
2
(xi − x)
i=1
If the variance in the disturbance term is small, then our estimate of β 2 will be precise.
Likewise, if the variance of x is large, our estimate will be precise. Notice that this is
different than in the case of estimating a mean from (1), where we prefer the variance of
y to be small. Again, variation in the independent variable is crucial to our estimation
techniques.

Nonlinearity
The relationship posited above implies that the rate of change of y for changes in x is
constant at all levels of y and x. This may be a poor assumption. Consider the case of
the effect of education on wages. An additional year of education in year 14 is probably
more valuable than an additional year of education at year 2. One simple way to capture
this is to use the natural log of variables instead of the level. In fact, one never sees
wage level in applied economics but always the natural log of wage. This changes the
interpretation of coefficients as described below

Table 1: Interpretation of β 2 for various functional forms


x ln(x)
β2
y ∆y = β 2 ∆x ∆y = 100 %∆x
ln(y) %∆y = 100β 2 ∆x %∆y = β 2 %∆x

where x is the independent variable, y is the dependent variable, and %∆ indicates per-
centage change in a variable. Thus a model with both the dependent and the independent
variable measured in logs is a model that will have constant percentage changes. This
is very common and is referred to as a constant elasticity model.
Another way of incorporating non-linearity in a model is to add terms like x2 and x3
to the regression model.
11

Reading the Output


Most econometric software packages will produce output like the following output from
STATA:
regress FEXP totalinc

Source | SS df MS Number of obs = 975


---------+---------------------------- F( 1, 973) = 161.95
Model |257431.315 1 257431.315 Prob > F = 0.0000
Residual |1546612.66 973 1589.52997 R-squared = 0.1427
---------+---------------------------- Adj R-squared = 0.1418
Total |1804043.98 974 1852.20121 Root MSE = 39.869

-------------------------------------------------------------------
FEXP | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+---------------------------------------------------------
totalinc | .1299981 .0102151 12.726 0.000 .1099521 .1500442
_cons | 38.60856 2.690782 14.348 0.000 33.32815 43.88896
-------------------------------------------------------------------
The main items of interest in the computer output are
1. Coefficient Estimates

2. Coefficient Standard Errors

3. t-ratios

4. p-values

5. F-test of overall significance

6. R-squared
Coefficient estimates are combinations of the data from the sample. Since these
are random variables, the coefficients themselves are random variables. Econometric
software packages compute the variance of these estimates. The standard error which
is printed is the square root of this estimated variance of the coefficient. The t-ratio for
b2
β
b
β
t = ³2 ´
b β
se b2
may be used to test the hypothesis that β 2 = 0 against a two-sided alternative that
β 2 6= 0. This is sometimes called a test of significance of β 2 . When this number is
greater than 2 (or less than -2), we conclude with at least 95% confidence that β 2 6= 0.
The p-value gives us the exact size of this t-test. The smaller it is, the more confident we
are in concluding that β 2 6= 0. Economists generally use .10 and .05 (i.e. confidence
levels of 90% or 95%) as the preferred size of their hypothesis tests.
The coefficient estimates and standard errors may also be combined to form confi-
dence intervals and most econometric software packages produce confidence intervals
either automatically or as an extra option. If the confidence interval does not contain
12 Chapter 2 Linear Regression Analysis

zero, then we would reject the hypothesis that β 2 is zero at the .05 significance level.
The converse also holds true. The meaning of a confidence interval is as follows: if
we were to repeatedly sample from the population and construct a confidence interval
from each sample, then the true parameter would lie in that interval 95% of the time.
Whether the one sample we have corresponds to one in which the true parameter value
lies within the confidence interval is simply unknowable.
The F-test of overall significance is a simultaneous test of whether all of the co-
efficients in the model (except the intercept) are jointly significant. In the case of this
simple model this is identical to the test of whether β 2 = 0 or not. The interpretation of
the p-value in relation to this test is the same as in the case of the t-test.
R-squared is a simplistic measure of fit of the model. If all the points fit exactly on
the line so that u = 0 for every observation, then R-squared will be 1. If Cov(x, y) = 0,
then R-squared will be zero. R-squared can be interpreted as giving us the percentage
of the variation in the dependent variable that is explained by the independent variables.
Two common fallacies are: 1) R-squared must be high for a model to be good; and 2) a
high R-squared is the sign of a good model. R-squared is simply one summary statistic
of the fit of the data to the regression line, but statistical fit alone does not a good model
make.

Multivariate Regression Models: the simple example


extended
In our food expenditure example of before, suppose that we now control for household
size (hhsize) in addition to income.

d = 17.71 + .065 ∗ income + 9.6 ∗ hhsize


fexp
(3.03) (.011) (.78)
2
n = 975 R = .258
dataset : sandiego.raw
Using the output of multivariate regression models is similar to the simple case. The
interpretation of the coefficient on income is now: holding household size constant, a
$1 increase in total household income leads to a 6.5 cent increase in food expenditure.
Likewise, holding income constant, an additional person in the household leads to a
$9.6 increase in weekly household food expenditure. I can also consider changing
both variables simultaneously: What if income increased by $100 dollars and hhsize
increased by one? Then I would say ∆fexp=.065*∆income + 9.6 ∗ ∆hhsize=$16.1
additional per week spent on food.

Question
What is the interpretation of the constant in this case? Is this an interesting number?
13

Econometric software packages can easily estimate such models even when there are
many parameters
y = β 1 + β 2 x2 + β 3 x3 + . . . + β k xk + u
We often use this general notation to indicate the k−variable regression model.
The t−ratios can be used to test the hypothesis of individual significance for each
coefficient. The F −test of overall significance of the regression is now a test of
H0 : β 2 = 0 and β 3 = 0 and . . . and β k = 0
vs. H1 : β 2 = 0 or β 3 = 0 or . . . or β k = 0
We can also test any linear hypothesis about some or all of the coefficients using F −tests.
It is easiest to use the econometric package to write out the hypothesis test and then make
our decision on the basis of the p−value. An equivalent technique is comparing the test
statistic to the proper value from a statistical table. Hypothesis testing is a large topic
and we will focus only on some simple techniques and examples in the course.
In the multiple regression framework the variance of each coefficient depends upon
the variability of the associated x variable and also upon the covariance between that
variable and the other variables in the model. This may be represented as
bj ) = σ2
V ar(β P
n
[1 − R2j ] (xij − xj )2
i=1
where R2j is the R-squared from a regression of xj on all the other x variables in the
model. The computer calculates this for us, but it is interesting to examine the formula.
As before, low variance of the disturbance and large variation in xj lead to a precise
estimate. In the multivariate case there is another term however that depends upon how
closely associated xj is with the other x variables in the model. The less that xj is
correlated with the other x variables, the more precise will be our estimate of β j . If
xj is highly correlated with the other x variables, then we can not hope to get a precise
estimate of that coefficient.
Consider this example: in an equation to estimate wages we include both age and
experience and the two are very highly correlated, then we will not learn anything about
the independent effect of age and experience. We can only learn about the combination
of the two variables. If we have a sufficiently large sample and sufficient independent
variation in age and experience, this will not be a problem. Again, the right kind of
variation is important.
When we estimate this model, we replace assumption A5 above with a new assump-
tion
A5’ None of the independent variables are constant in the sample and there are no exact
linear relationships between any of the independent variables.
This rules out the case where Rj2 = 1.
14 Chapter 2 Linear Regression Analysis

Omitted Variable Bias


Suppose the true model is
y = β 1 + β 2 x2 + β 3 x3 + u (4)
b
but I estimate a model without x3 ? What is the bias in β 2 ? It depends on the relationship
between the included and the omitted variable as shown in the following table:

b from omitting x3
Table 2: Bias in β 2
Cov(x2 , x3 ) < 0 Cov(x2 , x3 ) > 0
β 2 < 0 positive bias negative bias
β 2 > 0 negative bias positive bias

Determining the sign of the bias in more general cases is very difficult. It is important to
remember that even if only one included variable is correlated with the omitted variables
that all the coefficient estimates will be biased.

Example: Wage equation


We think that a person’s wage depends upon two factors, education (educ) and ability
(abil). The model is
ln(wage) = β 1 + β 2 educ + β 3 abil + u.
And suppose we estimate
ln(wage) = β 1 + β 2 educ + u
because we do not have any information about ability in our data. Our estimates of this
relationship from two data sets is

\
ln(wage) = .583 + .083 ∗ educ
(.097) (.008)
n = 526 R2 = .186
dataset : wage.raw

\
ln(wage) = −.185 + .109 ∗ educ
(.185) (.014)
n = 428 R2 = .118
dataset : femwage.raw

According to Table 2, the true returns to education will be less than the 8.3% and
10.9% shown in these equations. This is based upon the assumption that ability and
education are positively correlated.
3 References

[1] Arellano, M. (2003) Panel Data Econometrics. Advanced Texts in Econometrics New
York: Oxford University Press.
[2] Ashenfelter, O. and A. Kreuger (1994) Estimates of the Economic Return to Schooling
from a New Sample of Twins, American Economic Review 84, 1157-1173.
[3] Baker, M. (1997). Growth-Rate Heterogeneity and the Covariance Structure of Life-
Cycle Earnings. Journal of Labor Economics 15, 338-75.
[4] Baltagi, B. (2005) Econometric Analysis of Panel Data. Third Edition. New York: John
Wiley and Sons.
[5] Behrman, J. and A. Deolalikar (1987) Will Developing Country Nutrition Improve with
Income? A Case Study for Rural India, Journal of Political Economy 95, 492-507.
[6] Behrman, J. and B. Wolfe (1984) More Evidence on Nutrition Demand: Income Seems
Overrated and Women's Schooling Underemphasized, Journal of Development Eco-
nomics 14, 105-128.
[7] Biddle, J. and D. Hamermesh (1990) Sleep and the Allocation of Time, Journal of Po-
litical Economy 98, 922-943.
[8] Bollinger, C. and M. David (1997) Modelling Discrete Choice with Response Error:
Food Stamp Participation, Journal of the American Statistical Assocation 92, 827-835.
[9] Breunig, R. and I. Dasgupta. (2003) Are People Ashamed of Paying with Food Stamps?
Journal of Agricultural Economics, 54(3), 203-225.
[10] Browning, M. and T. Crossley (2001) Unemployment Insurance Benefit Levels and Con-
sumption Changes, Journal of Public Economics 80, 1-23.
[11] Cornwell, C and W. Trumbull (1994) Estimating the Economic Model of Crime Using
Panel Data, Review of Economics and Statistics 76, 360-366.
[12] Eide, E. (1994) Economics of Crime: Deterrence and the Rational Offender. Amster-
dam: North-Holland.
[13] Geronimus, A. and S. Korenman (1992) The Socioeconomic Consequences of Teen
Childbearing Reconsidered, Quarterly Journal of Economics 107, 1187-1214.
[14] Griliches, Z. (1986) Economic Data Issues. Handbook of Econometrics Volume 3, Chap-
ter 25. Amsterdam: North-Holland.
[15] Groves, R. (1989) Survey Errors and Survey Costs. Wiley Series in Probability and
Mathematical Statistics. New York: John Wiley and Sons.
[16] Harris, R. and E. Tzavalis (1999) Inference for Unit Roots in Dynamic Panels Where
the Time Dimension is Fixed. Journal of Econometrics 91(2), 201-226.
[17] Harris, R. and E. Tzavalis (2004) Testing for Unit Roots for Dynamic Panels in the
16 Chapter 3 References

Presence of Deterministic Trends: Do Stock Prices and Dividends Follow a Random


Walk? Econometric Reviews, 23(2), 149-166.
[18] Hsiao, C. (2003) Analysis of Panel Data. Second Edition. New York: Cambridge
University Press.
[19] Kiel, K. and K. McClain (1995) House Prices During Siting Decision Stages: The Case
of an Incinerator from Rumor Through Operation, Journal of Environmental Economics
and Management 28, 241-255.
[20] Klepinger, D., S. Lundberg, and R. Plotnick (1997) How Does Adolescent Fertility Af-
fect the Human Capital and Wages of Young Women? Institute for Research on Poverty,
Discussion Paper No. 1145, University of Wisconsin.
[21] Krueger, A. (1993) How Computers Have Changed the Wage Structure: Evidence from
Microdata, 1984-1989, Quarterly Journal of Economics 108, 33-60.
[22] Lee, M. (2002) Panel Data Econometrics: Methdods-of-Moments and Limited Depen-
dent Varibles. San Diego, CA: Academic Press.
[23] Meyer, B., W. Viscusi and D. Durbin (1995) Workers' Compensation and Injury Dura-
tion: Evidence from a Natural Experiment, American Economic Review 85, 322-340.
[24] Mroz, T. (1987) The Sensitivity of an Empirical Model of Married Women's Hours of
Work to Economic and Statistical Assumptions. Econometrica. 55(4), 765-799.
[25] Papke, L. (1999) Are 401(k) Plans Replacing Other Employer-Provided Pensions? Ev-
idence from Panel Data, Journal of Human Resources 34, 346-368.
[26] Phillips, P. and H. Moon (2000) Nonstationary Panel Data Analysis: An Overview of
Some Recent Developments, Econometric Reviews, 19(3), 263-286.
[27] Sander, W. (1992) The Effect of Women's Schooling on Fertility, Economics Letters 40,
229-233.
[28] Schrooten, M. and S. Stephan (2001) Savings in Central Eastern Europe, DIW Discus-
sion Paper No. 250.
[29] STATA Corporation (2005) Reference Manuals, Release 9. College Station, TX: Stata
Press.
[30] Vella, F. and M. Verbeek (1998) Whose Wages Do Unions Raise? A Dynamic Model
of Unionism and Wage Rate Determination for Young Men, Journal of Applied Econo-
metrics 13, 783-820.
[31] Wooldridge, J. (2001) Econometric Analysis of Cross Section and Panel Data. Boston,
MA: MIT Press.
[32] Wooldridge, J. (2006) Introductory Econometrics: A Modern Appraoch. Third Edition.
South-Western College Publishing.
A Web sites of International
Panel Data Sets

Australia
The Household Income and Labour Dynamics in Australia Survey (HILDA)
Melbourne Institute, University of Melbourne
www.melbourneinstitute.com/hilda/

Australian Longitudinal Study of Ageing(ALSA)


Center for Ageing Studies (CAS), Flinders University
http://www.cas.flinders.edu.au/alsa.html

Longitudinal Surveys of Australian Youth (LSAY)


Australian Council for Educational Research (ACER)
http://www.acer.edu.au/research/LSAY/overview.html

Belgium
Belgian Socio-Economic Panel (SEP)
Centre for Social Policy, University of Antwerp
http://www.ufsia.ac.be/~csb/eng/septab.htm

Britain
British Household Panel Study (BHPS)
Institute for Social and Economic Research, University of Essex
http://www.iser.essex.ac.uk/bhps/index.html

Canada
Labour Market Activity Survey (LMAS)
Statistics Canada
http://www.statcan.ca/start.html
18 Appendix A Web sites of International Panel Data Sets

Survey of Labour and Income Dynamics (SLID)


Statistics Canada
http://www.statcan.ca/start.html

Canadian Out of Employment Panel (COEP)


Human Resources Development, Canada.
http://hrdc-drhc.gc.ca/common/home.shtml

Unemployment Insurance Longitudinal files


Provincial Social Assistance Longitudinal files
Human Resources Development, Canada.
http://hrdc-drhc.gc.ca/common/home.shtml

France
French Household Panel
www.ceps.lu/paco/pacofrpa.htm

Germany
German Socio-Economic Panel (GSOEP)
German National Science Foundation
http://www.diw-berlin.de/soep/soepe.htm

Hungary
Hungarian Household Panel
www.tarki.hu/ www.ceps.lu/paco/pacohupa.htm

Indonesia
Indonesia Family Life Survey
www.rand.org/flS/IflS/

Japan
Japanese Panel Survey on Consumers
www.kakeiken.or.jp/

Korea
Korea Labor and Income Panel Study (KLIPS)
www.kli.re.kr/klips
19

Luxembourg
Panel Socie-economique de Luxembourg
www.ceps.lu/psell/pselpres.htm

Mexico
Mexican Family Life Survey (MxflS)
Department of Economics at the Universidad Iberoamericana (UIA) and the Division
of Economics at the Centro de Investigación y Docencia Económicas, A.C. (CIDE).

The Netherlands
Dutch Socio-Economic Panel (ISEP)
www.osa.kub.nl

Poland
Polish Household Panel
www.ceps.lu/paco/pacopopa.htm

Russia
Russian Longitudinal Monitoring Survey
www.cpc.unc.edu/projects/rlms/home.html

Spain
Encuesta de Presupuestos Familiares
www.lander.es:800/~cerro/presu.html

Sweden
The Swedish Panel Study Market and Non-Market Activities
www.nek.uu.se/faculty/klevmark/hus.htm

Switzerland
Swiss household panel
ww.unine.ch/psm
20 Appendix A Web sites of International Panel Data Sets

Taiwan
Taiwan
Panel Study of Family Dynamics (PSFD)
Institute of Economics, Institute of Sociology and Office of Survey Research of
Academia Sinica

United States
Panel Study of Income Dynamics (PSID)
Institute for Social Research, University of Michigan
http://www.isr.umich.edu/src/psid/

National Longitudinal Survey (NLS)


Bureau of Labor Statistics
http://stats.bls.gov:80/nlshome.htm

Survey of Income and Program Participation (SIPP)


US Census Bureau
http://www.sipp.census.gov/sipp/
B Computer Output

The attached output files include all the raw output for the examples presented during
the course. They sometimes also include estimation of various alternative models that
were not discussed but that may be of interest.
They are organized by dataset. All of the output pertaining to a data set is kept
together. The order in which the output appears below is the order in which the datasets
were (roughly) used during the course. For example, the first set of output uses the
sandiego.raw file since this is the first empirical example which appears in the paper.
All output for this data set appears together.

DATASET Page #
sandiego.raw 22
wage.raw 24
fertil1.raw 25
CPS78_85.raw 27
kielmc.raw 29
injury.raw 33
crime2.raw 35
SLP75_81.raw 37
crime3.raw 38
jtrain.raw 39
traffic1.raw 42
ezunem.raw 42
crime4.raw 45
rental.raw 47
vote2.raw 48
wagepan.raw 49
22 Appendix B Computer Output

sandiego.raw
. infile CASE_ID CHECK HHSIZE FEXP FSB INC WIC BREAK LUNCH ASGUEST BYGUEST HISP
> ANIC BLACK EDUC HOUSE FEMHEAD HH011 HH1217 HH1834 HH1850 HH3559 HH51P HH60P u
> sing e:\panel\Facspan\data\sandiego.raw

. gen totalinc=INC+FSB
. gen lntinc=ln(totalinc)
. gen lnfexp=ln(FEXP)
(1 missing value generated)
. gen ppfexp=FEXP/HHSIZE
. gen lnppfexp=ln(ppfexp)
(1 missing value generated)
. gen lnhhsize=ln(HHSIZE)
. gen pptinc=totalinc/HHSIZE
. gen lnpptinc=ln(pptinc)

. regress FEXP totalinc


Source | SS df MS Number of obs = 975
---------+------------------------------ F( 1, 973) = 161.95
Model | 257431.315 1 257431.315 Prob > F = 0.0000
Residual | 1546612.66 973 1589.52997 R-squared = 0.1427
---------+------------------------------ Adj R-squared = 0.1418
Total | 1804043.98 974 1852.20121 Root MSE = 39.869
------------------------------------------------------------------------------
FEXP | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
totalinc | .1299981 .0102151 12.726 0.000 .1099521 .1500442
_cons | 38.60856 2.690782 14.348 0.000 33.32815 43.88896
------------------------------------------------------------------------------

. regress lnfexp lntinc


Source | SS df MS Number of obs = 974
---------+------------------------------ F( 1, 972) = 181.47
Model | 50.9496005 1 50.9496005 Prob > F = 0.0000
Residual | 272.904424 972 .280765869 R-squared = 0.1573
---------+------------------------------ Adj R-squared = 0.1565
Total | 323.854025 973 .332840725 Root MSE = .52987

------------------------------------------------------------------------------
lnfexp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
lntinc | .4278475 .0317608 13.471 0.000 .36552 .4901751
_cons | 1.798971 .1698152 10.594 0.000 1.465725 2.132218
------------------------------------------------------------------------------

. regress FEXP totalinc HHSIZE


Source | SS df MS Number of obs = 975
---------+------------------------------ F( 2, 972) = 169.06
Model | 465597.497 2 232798.748 Prob > F = 0.0000
Residual | 1338446.48 972 1377.00255 R-squared = 0.2581
---------+------------------------------ Adj R-squared = 0.2566
Total | 1804043.98 974 1852.20121 Root MSE = 37.108

------------------------------------------------------------------------------
FEXP | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
totalinc | .0649059 .0108822 5.964 0.000 .0435505 .0862613
HHSIZE | 9.614927 .7820028 12.295 0.000 8.080319 11.14954
_cons | 17.70705 3.026901 5.850 0.000 11.76703 23.64706
------------------------------------------------------------------------------
23 Appendix B Computer Output

. regress lnfexp lntinc lnhhsize

Source | SS df MS Number of obs = 974


---------+------------------------------ F( 2, 971) = 182.55
Model | 88.4960722 2 44.2480361 Prob > F = 0.0000
Residual | 235.357953 971 .242387181 R-squared = 0.2733
---------+------------------------------ Adj R-squared = 0.2718
Total | 323.854025 973 .332840725 Root MSE = .49233

------------------------------------------------------------------------------
lnfexp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
lntinc | .2083369 .0343791 6.060 0.000 .140871 .2758028
lnhhsize | .4957143 .0398292 12.446 0.000 .417553 .5738755
_cons | 2.363745 .1641783 14.397 0.000 2.041559 2.68593
------------------------------------------------------------------------------

. regress ppfexp pptinc HHSIZE

Source | SS df MS Number of obs = 975


---------+------------------------------ F( 2, 972) = 63.23
Model | 11856.5856 2 5928.29278 Prob > F = 0.0000
Residual | 91126.9918 972 93.7520492 R-squared = 0.1151
---------+------------------------------ Adj R-squared = 0.1133
Total | 102983.577 974 105.732626 Root MSE = 9.6826

------------------------------------------------------------------------------
ppfexp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
pptinc | .0500437 .010325 4.847 0.000 .0297818 .0703057
HHSIZE | -1.471733 .1913777 -7.690 0.000 -1.847294 -1.096172
_cons | 21.96442 1.206679 18.202 0.000 19.59643 24.33242
------------------------------------------------------------------------------

. regress lnppfexp lnpptinc lnhhsize

Source | SS df MS Number of obs = 974


---------+------------------------------ F( 2, 971) = 80.28
Model | 38.9185074 2 19.4592537 Prob > F = 0.0000
Residual | 235.357957 971 .242387186 R-squared = 0.1419
---------+------------------------------ Adj R-squared = 0.1401
Total | 274.276465 973 .281887425 Root MSE = .49233

------------------------------------------------------------------------------
lnppfexp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
lnpptinc | .2083369 .0343791 6.060 0.000 .140871 .2758028
lnhhsize | -.2959488 .0369236 -8.015 0.000 -.368408 -.2234896
_cons | 2.363745 .1641783 14.397 0.000 2.041559 2.68593
------------------------------------------------------------------------------
24 Appendix B Computer Output

wage.raw ( & femwage.raw)

. infile wage educ exper tenure nonwhite female married


> numdep
> smsa northcen south west construc ndurman trcommpu trade
>
> services profserv profocc clerocc servocc lwage expersq tenursq
>
> using c:\data\wage1.raw;
(526 observations read)

. regress lwage educ;

Source | SS df MS Number of obs = 526


---------+------------------------------ F( 1, 524) = 119.58
Model | 27.5606296 1 27.5606296 Prob > F = 0.0000
Residual | 120.769132 524 .230475443 R-squared = 0.1858
---------+------------------------------ Adj R-squared = 0.1843
Total | 148.329762 525 .28253288 Root MSE = .48008

------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
educ | .0827444 .0075667 10.935 0.000 .0678796 .0976092
_cons | .5837726 .0973358 5.998 0.000 .3925562 .774989
------------------------------------------------------------------------------

. infile inlf hours kidslt6 kidsge6 age educ wage


> repwage
> hushrs husage huseduc huswage faminc mtr motheduc
> fatheduc unem city exper nwifeinc lwage expersq
> using c:\data\mroz.raw;
(753 observations read)

. regress lwage educ;

Source | SS df MS Number of obs = 428


---------+------------------------------ F( 1, 426) = 56.93
Model | 26.3264237 1 26.3264237 Prob > F = 0.0000
Residual | 197.001028 426 .462443727 R-squared = 0.1179
---------+------------------------------ Adj R-squared = 0.1158
Total | 223.327451 427 .523015108 Root MSE = .68003

------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
educ | .1086487 .0143998 7.545 0.000 .0803451 .1369523
_cons | -.1851969 .1852259 -1.000 0.318 -.5492674 .1788735
------------------------------------------------------------------------------
25 Appendix B Computer Output

fertil1.raw
. infile year educ meduc feduc age kids black east northcen west farm othrural
> town smcity y74 y76 y78 y80 y82 y84 agesq y74educ y76educ y78educ y80educ y82
> educ y84educ using c:\data\fertil1
(1129 observations read)

. regress kids educ age agesq black east northcen west farm othrural town smcit
> y y74 y76 y78 y80 y82 y84

Source | SS df MS Number of obs = 1129


---------+------------------------------ F( 17, 1111) = 9.72
Model | 399.610888 17 23.5065228 Prob > F = 0.0000
Residual | 2685.89841 1111 2.41755033 R-squared = 0.1295
---------+------------------------------ Adj R-squared = 0.1162
Total | 3085.5093 1128 2.73538059 Root MSE = 1.5548

------------------------------------------------------------------------------
kids | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
educ | -.1284268 .0183486 -6.999 0.000 -.1644286 -.092425
age | .5321346 .1383863 3.845 0.000 .2606065 .8036626
agesq | -.005804 .0015643 -3.710 0.000 -.0088733 -.0027347
black | 1.075658 .1735356 6.198 0.000 .7351631 1.416152
east | .217324 .1327878 1.637 0.102 -.0432192 .4778672
northcen | .363114 .1208969 3.004 0.003 .125902 .6003261
west | .1976032 .1669134 1.184 0.237 -.1298978 .5251041
farm | -.0525575 .14719 -0.357 0.721 -.3413592 .2362443
othrural | -.1628537 .175442 -0.928 0.353 -.5070887 .1813814
town | .0843532 .124531 0.677 0.498 -.1599893 .3286957
smcity | .2118791 .160296 1.322 0.187 -.1026379 .5263961
y74 | .2681825 .172716 1.553 0.121 -.0707039 .6070689
y76 | -.0973795 .1790456 -0.544 0.587 -.448685 .2539261
y78 | -.0686665 .1816837 -0.378 0.706 -.4251483 .2878154
y80 | -.0713053 .1827707 -0.390 0.697 -.42992 .2873093
y82 | -.5224842 .1724361 -3.030 0.003 -.8608214 -.184147
y84 | -.5451661 .1745162 -3.124 0.002 -.8875846 -.2027477
_cons | -7.742457 3.051767 -2.537 0.011 -13.73033 -1.754579
------------------------------------------------------------------------------

. test farm othrural town smcity

( 1) farm = 0.0
( 2) othrural = 0.0
( 3) town = 0.0
( 4) smcity = 0.0

F( 4, 1111) = 1.16
Prob > F = 0.3275

. test east northcen west

( 1) east = 0.0
( 2) northcen = 0.0
( 3) west = 0.0

F( 3, 1111) = 3.01
Prob > F = 0.0293
26 Appendix B Computer Output

. regress kids educ age agesq black east northcen west farm othrural town smcit
> y y74 y76 y78 y80 y82 y84 y74educ y76educ y78educ y80educ y82educ y84educ

Source | SS df MS Number of obs = 1129


---------+------------------------------ F( 23, 1105) = 7.59
Model | 421.074456 23 18.307585 Prob > F = 0.0000
Residual | 2664.43484 1105 2.41125325 R-squared = 0.1365
---------+------------------------------ Adj R-squared = 0.1185
Total | 3085.5093 1128 2.73538059 Root MSE = 1.5528

------------------------------------------------------------------------------
kids | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
educ | -.0225152 .0536183 -0.420 0.675 -.1277203 .0826899
age | .5074658 .1389215 3.653 0.000 .2348861 .7800456
agesq | -.005525 .00157 -3.519 0.000 -.0086055 -.0024444
black | 1.074055 .173701 6.183 0.000 .7332338 1.414876
east | .2060559 .133143 1.548 0.122 -.0551857 .4672975
northcen | .3482867 .1210987 2.876 0.004 .1106773 .5858961
west | .1771221 .1674523 1.058 0.290 -.1514382 .5056825
farm | -.0721622 .147508 -0.489 0.625 -.3615895 .2172651
othrural | -.1911539 .175934 -1.087 0.277 -.5363563 .1540486
town | .0882295 .1245356 0.708 0.479 -.1561234 .3325824
smcity | .2053576 .1602104 1.282 0.200 -.1089933 .5197085
y74 | .9469149 .9041589 1.047 0.295 -.8271472 2.720977
y76 | 1.019963 .8820339 1.156 0.248 -.7106871 2.750613
y78 | 1.805985 .9518659 1.897 0.058 -.0616833 3.673654
y80 | 1.114183 .897601 1.241 0.215 -.6470115 2.875378
y82 | 1.199807 .8762891 1.369 0.171 -.5195709 2.919186
y84 | 1.671261 .8990501 1.859 0.063 -.0927771 3.435299
y74educ | -.0564248 .0725607 -0.778 0.437 -.198797 .0859474
y76educ | -.0920997 .0708748 -1.299 0.194 -.231164 .0469646
y78educ | -.1523873 .0752819 -2.024 0.043 -.3000988 -.0046757
y80educ | -.0979049 .0704523 -1.390 0.165 -.2361402 .0403305
y82educ | -.1389447 .0683712 -2.032 0.042 -.2730969 -.0047926
y84educ | -.176097 .0699149 -2.519 0.012 -.313278 -.038916
_cons | -8.477302 3.12636 -2.712 0.007 -14.61157 -2.34303
------------------------------------------------------------------------------

. test y74educ y76educ y78educ y80educ y82educ y84educ

( 1) y74educ = 0.0
( 2) y76educ = 0.0
( 3) y78educ = 0.0
( 4) y80educ = 0.0
( 5) y82educ = 0.0
( 6) y84educ = 0.0

F( 6, 1105) = 1.48
Prob > F = 0.1803
27 Appendix B Computer Output

CPS78_85.raw

. infile educ south nonwhite female married exper expersq union lwage age year
> y85 y85fem y85educ y85union using c:\data\cps78_85
(1084 observations read)

. regress lwage y85 educ y85educ exper expersq union female y85fem

Source | SS df MS Number of obs = 1084


---------+------------------------------ F( 8, 1075) = 99.80
Model | 135.992074 8 16.9990092 Prob > F = 0.0000
Residual | 183.099094 1075 .170324738 R-squared = 0.4262
---------+------------------------------ Adj R-squared = 0.4219
Total | 319.091167 1083 .29463635 Root MSE = .4127

------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y85 | .1178062 .1237817 0.952 0.341 -.125075 .3606874
educ | .0747209 .0066764 11.192 0.000 .0616206 .0878212
y85educ | .0184605 .0093542 1.974 0.049 .000106 .036815
exper | .0295843 .0035673 8.293 0.000 .0225846 .036584
expersq | -.0003994 .0000775 -5.151 0.000 -.0005516 -.0002473
union | .2021319 .0302945 6.672 0.000 .1426888 .2615749
female | -.3167086 .0366215 -8.648 0.000 -.3885663 -.244851
y85fem | .085052 .051309 1.658 0.098 -.0156251 .185729
_cons | .4589329 .0934485 4.911 0.000 .2755707 .642295
------------------------------------------------------------------------------

. gen educm12=educ-12

. gen y85edm12=y85*educm12

. regress lwage y85 educ y85edm12 exper expersq union female y85fem

Source | SS df MS Number of obs = 1084


---------+------------------------------ F( 8, 1075) = 99.80
Model | 135.992074 8 16.9990092 Prob > F = 0.0000
Residual | 183.099094 1075 .170324738 R-squared = 0.4262
---------+------------------------------ Adj R-squared = 0.4219
Total | 319.091167 1083 .29463635 Root MSE = .4127

------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y85 | .3393326 .0340099 9.977 0.000 .2725993 .4060659
educ | .0747209 .0066764 11.192 0.000 .0616206 .0878212
y85edm12 | .0184605 .0093542 1.974 0.049 .000106 .036815
exper | .0295843 .0035673 8.293 0.000 .0225846 .036584
expersq | -.0003994 .0000775 -5.151 0.000 -.0005516 -.0002473
union | .2021319 .0302945 6.672 0.000 .1426888 .2615749
female | -.3167086 .0366215 -8.648 0.000 -.3885663 -.244851
y85fem | .085052 .051309 1.658 0.098 -.0156251 .185729
_cons | .4589329 .0934485 4.911 0.000 .2755707 .642295
------------------------------------------------------------------------------

. gen wage=exp(lwage)

. gen pindx=(1.65*y85)+(1-y85)

. gen rwage=wage/pindx
28 Appendix B Computer Output

. gen lnrwage=ln(rwage)

. regress lnrwage y85 educ y85educ exper expersq union female y85fem

Source | SS df MS Number of obs = 1084


---------+------------------------------ F( 8, 1075) = 74.35
Model | 101.314347 8 12.6642934 Prob > F = 0.0000
Residual | 183.099088 1075 .170324733 R-squared = 0.3562
---------+------------------------------ Adj R-squared = 0.3514
Total | 284.413435 1083 .262616284 Root MSE = .4127

------------------------------------------------------------------------------
lnrwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y85 | -.382969 .1237817 -3.094 0.002 -.6258502 -.1400879
educ | .0747209 .0066764 11.192 0.000 .0616206 .0878212
y85educ | .0184605 .0093542 1.974 0.049 .000106 .036815
exper | .0295843 .0035673 8.293 0.000 .0225846 .036584
expersq | -.0003994 .0000775 -5.151 0.000 -.0005516 -.0002473
union | .2021319 .0302945 6.672 0.000 .1426888 .2615749
female | -.3167086 .0366214 -8.648 0.000 -.3885663 -.244851
y85fem | .085052 .051309 1.658 0.098 -.0156251 .1857291
_cons | .4589329 .0934485 4.911 0.000 .2755708 .642295
------------------------------------------------------------------------------

. tabulate union year

| year
union | 78 85 | Total
-----------+----------------------+----------
0 | 382 438 | 820
1 | 168 96 | 264
-----------+----------------------+----------
Total | 550 534 | 1084

. regress lwage y85 educ y85educ exper expersq union y85union female y85fem

Source | SS df MS Number of obs = 1084


---------+------------------------------ F( 9, 1074) = 88.63
Model | 135.992081 9 15.1102312 Prob > F = 0.0000
Residual | 183.099087 1074 .170483321 R-squared = 0.4262
---------+------------------------------ Adj R-squared = 0.4214
Total | 319.091167 1083 .29463635 Root MSE = .4129

------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y85 | .1179667 .1262826 0.934 0.350 -.1298219 .3657552
educ | .0747241 .0066971 11.158 0.000 .0615832 .0878649
y85educ | .0184566 .0093778 1.968 0.049 .0000558 .0368574
exper | .029584 .0035693 8.289 0.000 .0225804 .0365876
expersq | -.0003994 .0000776 -5.148 0.000 -.0005517 -.0002472
union | .2022921 .0390836 5.176 0.000 .1256031 .278981
y85union | -.0003962 .0610404 -0.006 0.995 -.1201681 .1193757
female | -.3166909 .0367405 -8.620 0.000 -.3887821 -.2445996
y85fem | .0850057 .0518255 1.640 0.101 -.016685 .1866964
_cons | .45884 .0945804 4.851 0.000 .2732567 .6444234
------------------------------------------------------------------------------
29 Appendix B Computer Output

kielmc.raw

. infile year age agesq nbh cbd intst lintst price


> rooms area land baths dist ldist wind lprice
> y81 larea lland y81ldist lintstsq nearinc y81nrinc rprice lrprice
> using c:\data\kielmc;
(321 observations read)

. regress rprice nearinc if y81==1;

Source | SS df MS Number of obs = 142


---------+------------------------------ F( 1, 140) = 27.73
Model | 2.7059e+10 1 2.7059e+10 Prob > F = 0.0000
Residual | 1.3661e+11 140 975815069 R-squared = 0.1653
---------+------------------------------ Adj R-squared = 0.1594
Total | 1.6367e+11 141 1.1608e+09 Root MSE = 31238

------------------------------------------------------------------------------
rprice | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
nearinc | -30688.27 5827.709 -5.266 0.000 -42209.97 -19166.58
_cons | 101307.5 3093.027 32.754 0.000 95192.43 107422.6
------------------------------------------------------------------------------

. regress rprice nearinc if y81==0;

Source | SS df MS Number of obs = 179


---------+------------------------------ F( 1, 177) = 15.74
Model | 1.3636e+10 1 1.3636e+10 Prob > F = 0.0001
Residual | 1.5332e+11 177 866239953 R-squared = 0.0817
---------+------------------------------ Adj R-squared = 0.0765
Total | 1.6696e+11 178 937979126 Root MSE = 29432

------------------------------------------------------------------------------
rprice | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
nearinc | -18824.37 4744.594 -3.968 0.000 -28187.62 -9461.118
_cons | 82517.23 2653.79 31.094 0.000 77280.09 87754.37
------------------------------------------------------------------------------

. regress rprice y81 nearinc y81nrinc;

Source | SS df MS Number of obs = 321


---------+------------------------------ F( 3, 317) = 22.25
Model | 6.1055e+10 3 2.0352e+10 Prob > F = 0.0000
Residual | 2.8994e+11 317 914632749 R-squared = 0.1739
---------+------------------------------ Adj R-squared = 0.1661
Total | 3.5099e+11 320 1.0969e+09 Root MSE = 30243

------------------------------------------------------------------------------
rprice | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y81 | 18790.29 4050.065 4.640 0.000 10821.88 26758.69
nearinc | -18824.37 4875.322 -3.861 0.000 -28416.45 -9232.293
y81nrinc | -11863.9 7456.646 -1.591 0.113 -26534.67 2806.866
_cons | 82517.23 2726.91 30.260 0.000 77152.1 87882.36
------------------------------------------------------------------------------
30 Appendix B Computer Output

. regress rprice y81 nearinc y81nrinc age agesq;

Source | SS df MS Number of obs = 321


---------+------------------------------ F( 5, 315) = 44.59
Model | 1.4547e+11 5 2.9094e+10 Prob > F = 0.0000
Residual | 2.0552e+11 315 652459465 R-squared = 0.4144
---------+------------------------------ Adj R-squared = 0.4052
Total | 3.5099e+11 320 1.0969e+09 Root MSE = 25543

------------------------------------------------------------------------------
rprice | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y81 | 21321.04 3443.631 6.191 0.000 14545.62 28096.47
nearinc | 9397.936 4812.222 1.953 0.052 -70.22393 18866.1
y81nrinc | -21920.27 6359.745 -3.447 0.001 -34433.22 -9407.322
age | -1494.424 131.8603 -11.333 0.000 -1753.862 -1234.986
agesq | 8.691277 .8481268 10.248 0.000 7.022567 10.35999
_cons | 89116.54 2406.051 37.039 0.000 84382.57 93850.5
------------------------------------------------------------------------------

. regress rprice y81 nearinc y81nrinc age agesq intst land area rooms baths;

Source | SS df MS Number of obs = 321


---------+------------------------------ F( 10, 310) = 60.19
Model | 2.3167e+11 10 2.3167e+10 Prob > F = 0.0000
Residual | 1.1932e+11 310 384905873 R-squared = 0.6600
---------+------------------------------ Adj R-squared = 0.6491
Total | 3.5099e+11 320 1.0969e+09 Root MSE = 19619

------------------------------------------------------------------------------
rprice | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y81 | 13928.48 2798.747 4.977 0.000 8421.533 19435.42
nearinc | 3780.334 4453.415 0.849 0.397 -4982.41 12543.08
y81nrinc | -14177.93 4987.267 -2.843 0.005 -23991.11 -4364.759
age | -739.451 131.1272 -5.639 0.000 -997.4629 -481.4391
agesq | 3.45274 .8128214 4.248 0.000 1.853395 5.052084
intst | -.5386353 .1963359 -2.743 0.006 -.9249549 -.1523158
land | .1414196 .0310776 4.551 0.000 .0802698 .2025693
area | 18.08621 2.306064 7.843 0.000 13.54869 22.62373
rooms | 3304.225 1661.248 1.989 0.048 35.47769 6572.973
baths | 6977.318 2581.321 2.703 0.007 1898.192 12056.44
_cons | 13807.67 11166.59 1.237 0.217 -8164.23 35779.58
------------------------------------------------------------------------------

. regress lprice y81 nearinc y81nrinc;


Source | SS df MS Number of obs = 321
---------+------------------------------ F( 3, 317) = 73.15
Model | 25.1331556 3 8.37771854 Prob > F = 0.0000
Residual | 36.3057473 317 .114529171 R-squared = 0.4091
---------+------------------------------ Adj R-squared = 0.4035
Total | 61.4389029 320 .191996572 Root MSE = .33842

------------------------------------------------------------------------------
lprice | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y81 | .4569954 .0453207 10.084 0.000 .367828 .5461628
nearinc | -.3399216 .0545554 -6.231 0.000 -.4472581 -.2325851
y81nrinc | -.0626505 .0834408 -0.751 0.453 -.2268181 .1015172
_cons | 11.28542 .0305144 369.839 0.000 11.22539 11.34546
------------------------------------------------------------------------------
31 Appendix B Computer Output

. regress lprice y81 nearinc y81nrinc age agesq lintst lland larea rooms baths;

Source | SS df MS Number of obs = 321


---------+------------------------------ F( 10, 310) = 116.91
Model | 48.5620519 10 4.85620519 Prob > F = 0.0000
Residual | 12.8768511 310 .041538229 R-squared = 0.7904
---------+------------------------------ Adj R-squared = 0.7837
Total | 61.4389029 320 .191996572 Root MSE = .20381

------------------------------------------------------------------------------
lprice | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y81 | .4259742 .0284999 14.947 0.000 .3698965 .482052
nearinc | .032234 .0474876 0.679 0.498 -.0612047 .1256726
y81nrinc | -.1315147 .0519712 -2.531 0.012 -.2337756 -.0292538
age | -.0083591 .0014111 -5.924 0.000 -.0111357 -.0055825
agesq | .0000376 8.67e-06 4.342 0.000 .0000206 .0000547
lintst | -.0614476 .0315075 -1.950 0.052 -.1234432 .0005479
lland | .0998452 .024491 4.077 0.000 .0516556 .1480349
larea | .3507717 .0514865 6.813 0.000 .2494645 .4520789
rooms | .0473344 .0173274 2.732 0.007 .0132402 .0814286
baths | .0942769 .0277256 3.400 0.001 .0397227 .1488311
_cons | 7.65175 .4158831 18.399 0.000 6.83344 8.470061
------------------------------------------------------------------------------

. regress lprice nearinc y81nrinc;

Source | SS df MS Number of obs = 321


---------+------------------------------ F( 2, 318) = 44.72
Model | 13.4879697 2 6.74398485 Prob > F = 0.0000
Residual | 47.9509332 318 .150789098 R-squared = 0.2195
---------+------------------------------ Adj R-squared = 0.2146
Total | 61.4389029 320 .191996572 Root MSE = .38832

------------------------------------------------------------------------------
lprice | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
nearinc | -.5470928 .05799 -9.434 0.000 -.6611853 -.4330004
y81nrinc | .3943449 .080389 4.905 0.000 .2361835 .5525064
_cons | 11.49259 .0258877 443.940 0.000 11.44166 11.54353
------------------------------------------------------------------------------

. regress lprice y81 y81nrinc;

Source | SS df MS Number of obs = 321


---------+------------------------------ F( 2, 318) = 80.71
Model | 20.6868675 2 10.3434337 Prob > F = 0.0000
Residual | 40.7520354 318 .128151055 R-squared = 0.3367
---------+------------------------------ Adj R-squared = 0.3325
Total | 61.4389029 320 .191996572 Root MSE = .35798

------------------------------------------------------------------------------
lprice | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y81 | .5633396 .0444107 12.685 0.000 .4759637 .6507155
y81nrinc | -.4025721 .0667844 -6.028 0.000 -.5339672 -.2711769
_cons | 11.17908 .0267568 417.803 0.000 11.12644 11.23172
------------------------------------------------------------------------------
32 Appendix B Computer Output

. regress lprice y81 ldist y81ldist;

Source | SS df MS Number of obs = 321


---------+------------------------------ F( 3, 317) = 69.22
Model | 24.3172122 3 8.10573739 Prob > F = 0.0000
Residual | 37.1216908 317 .117103125 R-squared = 0.3958
---------+------------------------------ Adj R-squared = 0.3901
Total | 61.4389029 320 .191996572 Root MSE = .3422

------------------------------------------------------------------------------
lprice | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y81 | -.0113238 .8050617 -0.014 0.989 -1.595263 1.572616
ldist | .316688 .0515322 6.145 0.000 .2152996 .4180764
y81ldist | .0481875 .0817929 0.589 0.556 -.1127379 .209113
_cons | 8.058478 .5084355 15.850 0.000 7.058143 9.058812
------------------------------------------------------------------------------

. regress lprice y81 ldist y81ldist age agesq lintst lland larea rooms baths;

Source | SS df MS Number of obs = 321


---------+------------------------------ F( 10, 310) = 114.55
Model | 48.3536866 10 4.83536866 Prob > F = 0.0000
Residual | 13.0852163 310 .042210375 R-squared = 0.7870
---------+------------------------------ Adj R-squared = 0.7802
Total | 61.4389029 320 .191996572 Root MSE = .20545

------------------------------------------------------------------------------
lprice | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y81 | -.2254593 .4946913 -0.456 0.649 -1.198837 .747918
ldist | .0009216 .0446167 0.021 0.984 -.0868683 .0887116
y81ldist | .062468 .0502788 1.242 0.215 -.0364627 .1613988
age | -.0080074 .0014173 -5.650 0.000 -.0107962 -.0052187
agesq | .0000357 8.71e-06 4.099 0.000 .0000186 .0000528
lintst | -.0599756 .0317217 -1.891 0.060 -.1223927 .0024416
lland | .0953427 .0247252 3.856 0.000 .0466922 .1439932
larea | .3507425 .0519485 6.752 0.000 .2485262 .4529588
rooms | .0461389 .0173442 2.660 0.008 .0120116 .0802661
baths | .101048 .0278224 3.632 0.000 .0463034 .1557926
_cons | 7.673861 .5015717 15.300 0.000 6.686946 8.660777
------------------------------------------------------------------------------
33 Appendix B Computer Output

injury.raw

. infile durat afchnge highearn male married ky mi


> ldurat
> afhigh head neck upextr trunk lowback lowextr occdis
>
> manuf construc using c:\data\injury.raw;
(7150 observations read)

. regress ldurat afchnge highearn afhigh if ky==1;

Source | SS df MS Number of obs = 5626


---------+------------------------------ F( 3, 5622) = 39.54
Model | 191.071427 3 63.6904757 Prob > F = 0.0000
Residual | 9055.93393 5622 1.6108029 R-squared = 0.0207
---------+------------------------------ Adj R-squared = 0.0201
Total | 9247.00536 5625 1.64391206 Root MSE = 1.2692

------------------------------------------------------------------------------
ldurat | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
afchnge | .0076573 .0447173 0.171 0.864 -.0800058 .0953204
highearn | .2564785 .0474464 5.406 0.000 .1634652 .3494918
afhigh | .1906012 .0685089 2.782 0.005 .0562973 .3249051
_cons | 1.125615 .0307368 36.621 0.000 1.065359 1.185871
------------------------------------------------------------------------------

. regress ldurat afchnge highearn afhigh male married head neck upextr trunk lo
> wback lowextr occdis manuf construc if ky==1;

Source | SS df MS Number of obs = 5349


---------+------------------------------ F( 14, 5334) = 16.37
Model | 358.441775 14 25.602984 Prob > F = 0.0000
Residual | 8341.41147 5334 1.56381917 R-squared = 0.0412
---------+------------------------------ Adj R-squared = 0.0387
Total | 8699.85325 5348 1.62674892 Root MSE = 1.2505

------------------------------------------------------------------------------
ldurat | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
afchnge | .0106274 .0449167 0.237 0.813 -.0774276 .0986824
highearn | .1757598 .0517462 3.397 0.001 .0743161 .2772034
afhigh | .2308768 .0695248 3.321 0.001 .0945798 .3671737
male | -.0979407 .0445498 -2.198 0.028 -.1852765 -.0106049
married | .1220995 .0391228 3.121 0.002 .0454028 .1987962
head | -.5139003 .1292776 -3.975 0.000 -.7673371 -.2604634
neck | .2699126 .1614899 1.671 0.095 -.0466736 .5864988
upextr | -.178539 .1011794 -1.765 0.078 -.376892 .0198141
trunk | .1264514 .1090163 1.160 0.246 -.0872651 .3401679
lowback | -.0085967 .1015267 -0.085 0.933 -.2076305 .1904371
lowextr | -.1202911 .1023262 -1.176 0.240 -.3208922 .08031
occdis | .2727118 .210769 1.294 0.196 -.1404816 .6859052
manuf | -.1606709 .0409038 -3.928 0.000 -.2408591 -.0804827
construc | .1101967 .0518063 2.127 0.033 .0086352 .2117581
_cons | 1.245922 .1061677 11.735 0.000 1.03779 1.454054
------------------------------------------------------------------------------
34 Appendix B Computer Output

. regress ldurat afchnge highearn afhigh if mi==1;

Source | SS df MS Number of obs = 1524


---------+------------------------------ F( 3, 1520) = 6.05
Model | 34.3850186 3 11.4616729 Prob > F = 0.0004
Residual | 2879.96982 1520 1.89471698 R-squared = 0.0118
---------+------------------------------ Adj R-squared = 0.0098
Total | 2914.35483 1523 1.91356194 Root MSE = 1.3765

------------------------------------------------------------------------------
ldurat | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
afchnge | .0973808 .0847879 1.149 0.251 -.0689329 .2636945
highearn | .1691388 .1055676 1.602 0.109 -.0379349 .3762124
afhigh | .1919906 .1541699 1.245 0.213 -.1104176 .4943989
_cons | 1.412737 .0567172 24.908 0.000 1.301485 1.523989
------------------------------------------------------------------------------
35 Appendix B Computer Output

crime2.raw
. infile pop crimes unem officers pcinc west nrtheast south
> year area d87 popden crmrte offarea lawexpc polpc
> lpop loffic lpcinc llawexpc lpopden lcrimes larea lcrmrte
> clcrimes clpop clcrmrte lpolpc clpolpc cllawexp cunem
> clpopden lcrmrt_1 ccrmrte using c:\data\crime2;
(92 observations read)

. tis year;
. iis area;
. regress crmrte unem if year==82;

Source | SS df MS Number of obs = 46


---------+------------------------------ F( 1, 44) = 1.62
Model | 912.893498 1 912.893498 Prob > F = 0.2099
Residual | 24808.2446 44 563.823741 R-squared = 0.0355
---------+------------------------------ Adj R-squared = 0.0136
Total | 25721.1381 45 571.580847 Root MSE = 23.745

------------------------------------------------------------------------------
crmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
unem | 1.306913 1.02709 1.272 0.210 -.76305 3.376876
_cons | 84.56874 10.90404 7.756 0.000 62.59309 106.5444
------------------------------------------------------------------------------

. regress crmrte unem if year==87;

Source | SS df MS Number of obs = 46


---------+------------------------------ F( 1, 44) = 1.48
Model | 1775.90928 1 1775.90928 Prob > F = 0.2297
Residual | 52674.6428 44 1197.15097 R-squared = 0.0326
---------+------------------------------ Adj R-squared = 0.0106
Total | 54450.5521 45 1210.01227 Root MSE = 34.60

------------------------------------------------------------------------------
crmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
unem | -4.161134 3.416456 -1.218 0.230 -11.04655 2.72428
_cons | 128.3781 20.75663 6.185 0.000 86.54589 170.2104
------------------------------------------------------------------------------

. regress crmrte d87 unem;

Source | SS df MS Number of obs = 92


---------+------------------------------ F( 2, 89) = 0.55
Model | 989.717314 2 494.858657 Prob > F = 0.5788
Residual | 80055.7864 89 899.503218 R-squared = 0.0122
---------+------------------------------ Adj R-squared = -0.0100
Total | 81045.5037 91 890.609931 Root MSE = 29.992

------------------------------------------------------------------------------
crmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d87 | 7.940413 7.975324 0.996 0.322 -7.906386 23.78721
unem | .4265461 1.188279 0.359 0.720 -1.934539 2.787631
_cons | 93.42026 12.73947 7.333 0.000 68.1072 118.7333
------------------------------------------------------------------------------
36 Appendix B Computer Output

. xtreg crmrte unem , fe;

Fixed-effects (within) regression Number of obs = 92


Group variable (i) : area Number of groups = 46

R-sq: within = 0.0000 Obs per group: min = 2


between = 0.0036 avg = 2.0
overall = 0.0012 max = 2

F(1,45) = 0.00
corr(u_i, Xb) = 0.0352 Prob > F = 0.9764
------------------------------------------------------------------------------
crmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
unem | -.0180957 .6086844 -0.030 0.976 -1.244049 1.207858
_cons | 100.935 5.118783 19.719 0.000 90.62527 111.2448
------------------------------------------------------------------------------
sigma_u | 27.895185
sigma_e | 15.635845
rho | .76092839 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(45,45) = 6.36 Prob > F = 0.0000

. xtreg crmrte d87 unem , fe;

Fixed-effects (within) regression Number of obs = 92


Group variable (i) : area Number of groups = 46

R-sq: within = 0.1961 Obs per group: min = 2


between = 0.0036 avg = 2.0
overall = 0.0067 max = 2

F(2,44) = 5.37
corr(u_i, Xb) = -0.1477 Prob > F = 0.0082
------------------------------------------------------------------------------
crmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d87 | 15.40219 4.702116 3.276 0.002 5.925702 24.87869
unem | 2.217997 .8778657 2.527 0.015 .4487746 3.987219
_cons | 75.40839 9.07054 8.314 0.000 57.12792 93.68886
------------------------------------------------------------------------------
sigma_u | 28.529801
sigma_e | 14.178065
rho | .80194674 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(45,44) = 7.87 Prob > F = 0.0000

. regress ccrmrte cunem;


Source | SS df MS Number of obs = 46
---------+------------------------------ F( 1, 44) = 6.38
Model | 2566.43732 1 2566.43732 Prob > F = 0.0152
Residual | 17689.5504 44 402.035236 R-squared = 0.1267
---------+------------------------------ Adj R-squared = 0.1069
Total | 20255.9877 45 450.13306 Root MSE = 20.051

------------------------------------------------------------------------------
ccrmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
cunem | 2.217999 .8778659 2.527 0.015 .4487771 3.987222
_cons | 15.4022 4.702117 3.276 0.002 5.925709 24.8787
------------------------------------------------------------------------------
37 Appendix B Computer Output

SLP75_81.raw

. infile age75 educ75 educ81 gdhlth75 gdhlth81 male marr75


> marr81
> slpnap75 slpnap81 totwrk75 totwrk81 yngkid75 yngkid81 ceduc cgdhlth
>
> cmarr cslpnap ctotwrk cyngkid using c:\data\slp75_81;
(239 observations read)

. regress cslpnap ctotwrk ceduc cmarr cyngkid cgdhlth;

Source | SS df MS Number of obs = 239


---------+------------------------------ F( 5, 233) = 8.19
Model | 14674698.2 5 2934939.64 Prob > F = 0.0000
Residual | 83482611.7 233 358294.471 R-squared = 0.1495
---------+------------------------------ Adj R-squared = 0.1313
Total | 98157309.9 238 412425.672 Root MSE = 598.58

------------------------------------------------------------------------------
cslpnap | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
ctotwrk | -.2266694 .036054 -6.287 0.000 -.2977029 -.1556359
ceduc | -.0244717 48.75938 -0.001 1.000 -96.09008 96.04113
cmarr | 104.2139 92.85536 1.122 0.263 -78.72946 287.1574
cyngkid | 94.6654 87.65252 1.080 0.281 -78.02738 267.3582
cgdhlth | 87.57785 76.59913 1.143 0.254 -63.33758 238.4933
_cons | -92.63404 45.8659 -2.020 0.045 -182.9989 -2.269153
------------------------------------------------------------------------------
38 Appendix B Computer Output

CRIME3.raw

. infile district year crime clrprc1 clrprc2 d78 avgclr lcrime


> clcrime cavgclr cclrprc1 cclrprc2 using c:\data\crime3;
(106 observations read)

. xtreg lcrime d78 clrprc1 clrprc2, fe;


Fixed-effects (within) regression Number of obs = 106
Group variable (i) : district Number of groups = 53

R-sq: within = 0.4209 Obs per group: min = 2


between = 0.4798 avg = 2.0
overall = 0.4234 max = 2

F(3,50) = 12.12
corr(u_i, Xb) = 0.3645 Prob > F = 0.0000
------------------------------------------------------------------------------
lcrime | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d78 | .0856556 .0637825 1.343 0.185 -.0424552 .2137664
clrprc1 | -.0040475 .0047199 -0.858 0.395 -.0135276 .0054326
clrprc2 | -.0131966 .0051946 -2.540 0.014 -.0236302 -.0027629
_cons | 3.350995 .2324735 14.415 0.000 2.884058 3.817932
------------------------------------------------------------------------------
sigma_u | .47140475
sigma_e | .24366443
rho | .78915677 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(52,50) = 5.88 Prob > F = 0.0000

( 1) clrprc1 - clrprc2 = 0.0


------------------------------------------------------------------------------
lcrime | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
(1) | .009149 .0085216 1.074 0.288 -.007967 .0262651
------------------------------------------------------------------------------

. xtreg lcrime d78 avgclr, fe;

Fixed-effects (within) regression Number of obs = 106


Group variable (i) : district Number of groups = 53

R-sq: within = 0.4076 Obs per group: min = 2


between = 0.5101 avg = 2.0
overall = 0.4360 max = 2

F(2,51) = 17.54
corr(u_i, Xb) = 0.3947 Prob > F = 0.0000

------------------------------------------------------------------------------
lcrime | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d78 | .0993289 .0625915 1.587 0.119 -.0263289 .2249867
avgclr | -.0166511 .0050672 -3.286 0.002 -.0268239 -.0064783
_cons | 3.316358 .2305684 14.383 0.000 2.853472 3.779243
------------------------------------------------------------------------------
sigma_u | .47091964
sigma_e | .24402892
rho | .78831551 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(52,51) = 5.84 Prob > F = 0.0000
39 Appendix B Computer Output

jtrain.raw

. infile year fcode employ sales avgsal scrap rework tothrs


> union grant d89 d88 totrain hrsemp lscrap lemploy
> lsales lrework lhrsemp lscrap_1 grant_1 clscrap cgrant
> clemploy clsales lavgsal clavgsal cgrant_1 chrsemp clhrsemp using c
> :\data\jtrain.raw;
(471 observations read)
. tis year;
. iis fcode;
. xtreg scrap d88 grant if year~=1989, fe;

Fixed-effects (within) regression Number of obs = 108


Group variable (i) : fcode Number of groups = 54

R-sq: within = 0.1269 Obs per group: min = 2


between = 0.0038 avg = 2.0
overall = 0.0081 max = 2

F(2,52) = 3.78
corr(u_i, Xb) = 0.0119 Prob > F = 0.0293

------------------------------------------------------------------------------
scrap | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d88 | -.5637143 .4049149 -1.392 0.170 -1.376235 .2488069
grant | -.7394437 .6826276 -1.083 0.284 -2.109236 .6303487
_cons | 4.611667 .2305079 20.007 0.000 4.149119 5.074215
------------------------------------------------------------------------------
sigma_u | 6.077795
sigma_e | 1.6938805
rho | .92792474 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(53,52) = 25.74 Prob > F = 0.0000

. regress clscrap cgrant if d89==0;

Source | SS df MS Number of obs = 54


---------+------------------------------ F( 1, 52) = 3.74
Model | 1.23795597 1 1.23795597 Prob > F = 0.0585
Residual | 17.1971864 52 .330715124 R-squared = 0.0672
---------+------------------------------ Adj R-squared = 0.0492
Total | 18.4351424 53 .347832876 Root MSE = .57508

------------------------------------------------------------------------------
clscrap | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
cgrant | -.317058 .1638751 -1.935 0.058 -.6458975 .0117816
_cons | -.0574357 .097206 -0.591 0.557 -.2524938 .1376224
------------------------------------------------------------------------------

. xtreg lscrap d88 grant if year~=1989, fe;

Fixed-effects (within) regression Number of obs = 108


Group variable (i) : fcode Number of groups = 54

R-sq: within = 0.1392 Obs per group: min = 2


between = 0.0049 avg = 2.0
overall = 0.0006 max = 2
40 Appendix B Computer Output

F(2,52) = 4.20
corr(u_i, Xb) = -0.0674 Prob > F = 0.0203

------------------------------------------------------------------------------
lscrap | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d88 | -.0574357 .097206 -0.591 0.557 -.2524938 .1376223
grant | -.3170579 .1638751 -1.935 0.058 -.6458974 .0117816
_cons | .597434 .0553369 10.796 0.000 .4863924 .7084757
------------------------------------------------------------------------------
sigma_u | 1.4833025
sigma_e | .40664178
rho | .93009745 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(53,52) = 26.42 Prob > F = 0.0000

. xtreg lscrap d88 d89 grant grant_1, fe;

Fixed-effects (within) regression Number of obs = 162


Group variable (i) : fcode Number of groups = 54

R-sq: within = 0.2010 Obs per group: min = 3


between = 0.0079 avg = 3.0
overall = 0.0068 max = 3

F(4,104) = 6.54
corr(u_i, Xb) = -0.0714 Prob > F = 0.0001

------------------------------------------------------------------------------
lscrap | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d88 | -.0802157 .1094751 -0.733 0.465 -.2973089 .1368776
d89 | -.2472028 .1332183 -1.856 0.066 -.5113797 .016974
grant | -.2523149 .150629 -1.675 0.097 -.5510178 .046388
grant_1 | -.4215895 .2102 -2.006 0.047 -.8384238 -.0047551
_cons | .597434 .0677344 8.820 0.000 .4631142 .7317539
------------------------------------------------------------------------------
sigma_u | 1.438982
sigma_e | .4977442
rho | .89313867 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(53,104) = 24.66 Prob > F = 0.0000

. xtreg lscrap d88 d89 grant grant_1 lemploy lsales, fe;

Fixed-effects (within) regression Number of obs = 148


Group variable (i) : fcode Number of groups = 51

R-sq: within = 0.2131 Obs per group: min = 1


between = 0.0341 avg = 2.9
overall = 0.0004 max = 3

F(6,91) = 4.11
corr(u_i, Xb) = -0.2258 Prob > F = 0.0011

------------------------------------------------------------------------------
lscrap | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d88 | -.0039606 .1195487 -0.033 0.974 -.2414293 .2335082
d89 | -.1321925 .1536863 -0.860 0.392 -.4374715 .1730864
grant | -.2967544 .157086 -1.889 0.062 -.6087865 .0152777
41 Appendix B Computer Output

grant_1 | -.5355783 .224206 -2.389 0.019 -.9809359 -.0902207


lemploy | -.0763643 .3502912 -0.218 0.828 -.7721746 .619446
lsales | -.0868606 .2596992 -0.334 0.739 -.6027212 .4290001
_cons | 2.115512 3.108437 0.681 0.498 -4.059017 8.29004
------------------------------------------------------------------------------
sigma_u | 1.4415147
sigma_e | .49149052
rho | .89585684 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(50,91) = 20.75 Prob > F = 0.0000

. regress chrsemp d88 d89 cgrant cgrant_1 clemploy, noconstant;

Source | SS df MS Number of obs = 251


---------+------------------------------ F( 5, 246) = 49.32
Model | 93105.4761 5 18621.0952 Prob > F = 0.0000
Residual | 92869.6237 246 377.518796 R-squared = 0.5006
---------+------------------------------ Adj R-squared = 0.4905
Total | 185975.10 251 740.936652 Root MSE = 19.43

------------------------------------------------------------------------------
chrsemp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d88 | -.7400493 1.941707 -0.381 0.703 -4.564541 3.084442
d89 | 4.683154 2.211071 2.118 0.035 .3281089 9.0382
cgrant | 32.60105 2.968219 10.983 0.000 26.75469 38.44742
cgrant_1 | 1.996921 5.554861 0.359 0.720 -8.944234 12.93808
clemploy | .7440387 4.867783 0.153 0.879 -8.843811 10.33189
------------------------------------------------------------------------------

. xtreg hrsemp d88 d89 grant grant_1 lemploy, fe;

Fixed-effects (within) regression Number of obs = 390


Group variable (i) : fcode Number of groups = 135

R-sq: within = 0.4909 Obs per group: min = 1


between = 0.0514 avg = 2.9
overall = 0.2206 max = 3

F(5,250) = 48.21
corr(u_i, Xb) = -0.0270 Prob > F = 0.0000

------------------------------------------------------------------------------
hrsemp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d88 | -1.098678 1.983158 -0.554 0.580 -5.004504 2.807147
d89 | 4.090048 2.481125 1.648 0.101 -.7965236 8.97662
grant | 34.22818 2.858439 11.974 0.000 28.59849 39.85787
grant_1 | .50408 4.127326 0.122 0.903 -7.624681 8.632841
lemploy | -.1762624 4.287935 -0.041 0.967 -8.621342 8.268817
_cons | 9.324943 14.92757 0.625 0.533 -20.07488 38.72476
------------------------------------------------------------------------------
sigma_u | 19.440154
sigma_e | 14.283358
rho | .64942011 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(134,250) = 5.12 Prob > F = 0.0000
42 Appendix B Computer Output

traffic1.raw
. regress cdthrte cadmn copen;

Source | SS df MS Number of obs = 51


---------+------------------------------ F( 2, 48) = 3.23
Model | .762579679 2 .38128984 Prob > F = 0.0482
Residual | 5.6636945 48 .117993635 R-squared = 0.1187
---------+------------------------------ Adj R-squared = 0.0819
Total | 6.42627418 50 .128525484 Root MSE = .3435

------------------------------------------------------------------------------
cdthrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
cadmn | -.1506024 .1168223 -1.289 0.204 -.3854894 .0842846
copen | -.4196787 .2055948 -2.041 0.047 -.8330547 -.0063028
_cons | -.4967872 .0524256 -9.476 0.000 -.6021959 -.3913784
------------------------------------------------------------------------------

ezunem.raw

. regress guclms d82 d83 d84 d85 d86 d87 d88 cez;
Source | SS df MS Number of obs = 176
---------+------------------------------ F( 8, 167) = 34.50
Model | 12.8826331 8 1.61032914 Prob > F = 0.0000
Residual | 7.79583789 167 .046681664 R-squared = 0.6230
---------+------------------------------ Adj R-squared = 0.6049
Total | 20.678471 175 .118162691 Root MSE = .21606

------------------------------------------------------------------------------
guclms | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d82 | .7787595 .0651444 11.954 0.000 .6501469 .9073721
d83 | -.0331192 .0651444 -0.508 0.612 -.1617318 .0954934
d84 | -.0171382 .0685455 -0.250 0.803 -.1524655 .118189
d85 | .323081 .0666774 4.845 0.000 .1914418 .4547202
d86 | .292154 .0651444 4.485 0.000 .1635413 .4207666
d87 | .0539481 .0651444 0.828 0.409 -.0746645 .1825607
d88 | -.0170526 .0651444 -0.262 0.794 -.1456652 .11156
cez | -.1818775 .0781862 -2.326 0.021 -.3362382 -.0275169
_cons | -.3216319 .046064 -6.982 0.000 -.4125748 -.230689
------------------------------------------------------------------------------
43 Appendix B Computer Output

. xtreg luclms d82 d83 d84 d85 d86 d87 d88 ez, fe;
Fixed-effects (within) regression Number of obs = 198
Group variable (i) : city Number of groups = 22

R-sq: within = 0.8148 Obs per group: min = 9


between = 0.0002 avg = 9.0
overall = 0.3415 max = 9

F(8,168) = 92.36
corr(u_i, Xb) = -0.0040 Prob > F = 0.0000

------------------------------------------------------------------------------
luclms | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d82 | .2963116 .0564518 5.249 0.000 .1848653 .4077579
d83 | -.0584397 .0564518 -1.035 0.302 -.169886 .0530065
d84 | -.4183363 .0587569 -7.120 0.000 -.5343332 -.3023393
d85 | -.4309719 .0626458 -6.880 0.000 -.5546462 -.3072976
d86 | -.4604492 .0626458 -7.350 0.000 -.5841236 -.3367749
d87 | -.728133 .0626458 -11.623 0.000 -.8518073 -.6044587
d88 | -1.066817 .0626458 -17.029 0.000 -1.190491 -.9431428
ez | -.1044144 .0597528 -1.747 0.082 -.2223776 .0135487
_cons | 11.53358 .0325925 353.873 0.000 11.46923 11.59792
------------------------------------------------------------------------------
sigma_u | .55551507
sigma_e | .21619388
rho | .8684634 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(21,168) = 59.31 Prob > F = 0.0000

. xtreg luclms d81 d82 d83 d84 d85 d86 d87 d88 ez, fe;
Fixed-effects (within) regression Number of obs = 198
Group variable (i) : city Number of groups = 22

R-sq: within = 0.8416 Obs per group: min = 9


between = 0.0002 avg = 9.0
overall = 0.3528 max = 9

F(9,167) = 98.59
corr(u_i, Xb) = -0.0039 Prob > F = 0.0000

------------------------------------------------------------------------------
luclms | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d81 | -.3216314 .0604572 -5.320 0.000 -.4409903 -.2022725
d82 | .1354959 .0604572 2.241 0.026 .016137 .2548548
d83 | -.2192554 .0604572 -3.627 0.000 -.3386144 -.0998965
d84 | -.579152 .0623179 -9.294 0.000 -.7021843 -.4561196
d85 | -.5917876 .0654953 -9.036 0.000 -.7210931 -.4624821
d86 | -.621265 .0654953 -9.486 0.000 -.7505704 -.4919595
d87 | -.8889487 .0654953 -13.573 0.000 -1.018254 -.7596432
d88 | -1.227633 .0654953 -18.744 0.000 -1.356938 -1.098327
ez | -.1044144 .0554191 -1.884 0.061 -.2138267 .0049979
_cons | 11.69439 .0427497 273.555 0.000 11.60999 11.77879
------------------------------------------------------------------------------
sigma_u | .55551507
sigma_e | .20051387
rho | .88473197 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(21,167) = 68.95 Prob > F = 0.0000
44 Appendix B Computer Output

. xtreg guclms cez, fe;

Fixed-effects (within) regression Number of obs = 176


Group variable (i) : city Number of groups = 22

R-sq: within = 0.0273 Obs per group: min = 8


between = 0.0094 avg = 8.0
overall = 0.0260 max = 8

F(1,153) = 4.29
corr(u_i, Xb) = -0.0555 Prob > F = 0.0399

------------------------------------------------------------------------------
guclms | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
cez | -.2511664 .1212098 -2.072 0.040 -.4906272 -.0117055
_cons | -.145116 .0278899 -5.203 0.000 -.200215 -.090017
------------------------------------------------------------------------------
sigma_u | .05309992
sigma_e | .35854336
rho | .02146257 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(21,153) = 0.17 Prob > F = 1.0000

. xtreg guclms cez d82 d83 d84 d85 d86 d87 d88, fe;

Fixed-effects (within) regression Number of obs = 176


Group variable (i) : city Number of groups = 22

R-sq: within = 0.6373 Obs per group: min = 8


between = 0.0094 avg = 8.0
overall = 0.6230 max = 8

F(8,146) = 32.06
corr(u_i, Xb) = -0.0060 Prob > F = 0.0000

------------------------------------------------------------------------------
guclms | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
cez | -.1919402 .0849908 -2.258 0.025 -.3599113 -.023969
d82 | .7787595 .0675787 11.524 0.000 .6452006 .9123184
d83 | -.0331192 .0675787 -0.490 0.625 -.1666781 .1004397
d84 | -.0143939 .0714434 -0.201 0.841 -.1555908 .126803
d85 | .3249105 .069323 4.687 0.000 .1879044 .4619167
d86 | .292154 .0675787 4.323 0.000 .1585951 .4257128
d87 | .0539481 .0675787 0.798 0.426 -.0796108 .187507
d88 | -.0170526 .0675787 -0.252 0.801 -.1506115 .1165063
_cons | -.3216319 .0477854 -6.731 0.000 -.4160723 -.2271915
------------------------------------------------------------------------------
sigma_u | .05245175
sigma_e | .22413322
rho | .05192202 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(21,146) = 0.44 Prob > F = 0.9849
45 Appendix B Computer Output

crime4.raw
. infile county year crmrte prbarr prbconv prbpris avgsen
> polpc
> density taxpc west central urban pctmin80 wcon wtuc
>
> wtrd wfir wser wmfg wfed wsta wloc mix
>
> pctymle d82 d83 d84 d85 d86 d87 lcrmrte
>
> lprbarr lprbconv lprbpris lavgsen lpolpc ldensity ltaxpc lwcon
>
> lwtuc lwtrd lwfir lwser lwmfg lwfed lwsta lwloc
>
> lmix lpctymle lpctmin clcrmrte clprbarr clprbcon clprbpri
> clavgsen clpolpc cltaxpc clmix using c:\data\crime4;
(630 observations read)

. regress clcrmrte d83 d84 d85 d86 d87 clprbarr clprbcon clprbpri clavgsen clpo
> lpc;

Source | SS df MS Number of obs = 540


---------+------------------------------ F( 10, 529) = 40.32
Model | 9.60042816 10 .960042816 Prob > F = 0.0000
Residual | 12.5963761 529 .023811675 R-squared = 0.4325
---------+------------------------------ Adj R-squared = 0.4218
Total | 22.1968043 539 .041181455 Root MSE = .15431

------------------------------------------------------------------------------
clcrmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d83 | -.0998658 .0238953 -4.179 0.000 -.1468071 -.0529246
d84 | -.0479374 .0235021 -2.040 0.042 -.0941063 -.0017686
d85 | -.0046111 .0234998 -0.196 0.845 -.0507756 .0415533
d86 | .0275143 .0241494 1.139 0.255 -.0199261 .0749548
d87 | .0408267 .0244153 1.672 0.095 -.0071361 .0887895
clprbarr | -.3274942 .0299801 -10.924 0.000 -.3863889 -.2685994
clprbcon | -.2381066 .0182341 -13.058 0.000 -.2739268 -.2022864
clprbpri | -.1650462 .025969 -6.356 0.000 -.2160613 -.1140312
clavgsen | -.0217607 .0220909 -0.985 0.325 -.0651574 .0216361
clpolpc | .3984264 .026882 14.821 0.000 .3456177 .4512351
_cons | .0077134 .0170579 0.452 0.651 -.0257961 .0412229
------------------------------------------------------------------------------

. tis year;

. iis county;

. xtreg lcrmrte d82 d83 d84 d85 d86 d87 lprbarr lprbconv lprbpris lavgsen lpolp
> c lwcon
> lwtuc lwtrd lwfir lwser lwmfg lwfed lwsta lwloc,
> fe;

Fixed-effects (within) regression Number of obs = 630


Group variable (i) : county Number of groups = 90

R-sq: within = 0.4575 Obs per group: min = 7


between = 0.2518 avg = 7.0
overall = 0.2687 max = 7

F(20,520) = 21.92
46 Appendix B Computer Output

corr(u_i, Xb) = 0.0804 Prob > F = 0.0000

------------------------------------------------------------------------------
lcrmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d82 | .0188915 .0251244 0.752 0.452 -.0304662 .0682492
d83 | -.0552858 .0330287 -1.674 0.095 -.1201719 .0096002
d84 | -.0615161 .0410805 -1.497 0.135 -.1422202 .019188
d85 | -.0397113 .0561635 -0.707 0.480 -.1500465 .070624
d86 | -.0001129 .0680124 -0.002 0.999 -.1337258 .1334999
d87 | .0537046 .0798953 0.672 0.502 -.1032527 .2106619
lprbarr | -.3563516 .0321591 -11.081 0.000 -.4195293 -.2931739
lprbconv | -.285954 .0210513 -13.584 0.000 -.32731 -.2445981
lprbpris | -.1751356 .0323403 -5.415 0.000 -.2386694 -.1116018
lavgsen | -.0028739 .0262108 -0.110 0.913 -.054366 .0486181
lpolpc | .4229001 .0263942 16.022 0.000 .3710477 .4747525
lwcon | -.0345448 .0391616 -0.882 0.378 -.1114792 .0423896
lwtuc | .0459747 .019034 2.415 0.016 .0085817 .0833677
lwtrd | -.0201767 .0406073 -0.497 0.619 -.0999512 .0595978
lwfir | -.0035445 .028333 -0.125 0.900 -.0592058 .0521168
lwser | .0101263 .0191915 0.528 0.598 -.0275762 .0478288
lwmfg | -.3005699 .1094068 -2.747 0.006 -.5155037 -.0856362
lwfed | -.3331209 .1764481 -1.888 0.060 -.6797595 .0135177
lwsta | .02152 .1130648 0.190 0.849 -.2005999 .2436399
lwloc | .1810212 .1180643 1.533 0.126 -.0509205 .4129628
_cons | .8931747 1.424067 0.627 0.531 -1.904457 3.690807
------------------------------------------------------------------------------
sigma_u | .47756818
sigma_e | .13700505
rho | .92395782 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(89,520) = 39.12 Prob > F = 0.0000

. test lwcon lwtuc lwtrd lwfir lwser lwmfg lwfed lwsta lwlo
> c;

( 1) lwcon = 0.0
( 2) lwtuc = 0.0
( 3) lwtrd = 0.0
( 4) lwfir = 0.0
( 5) lwser = 0.0
( 6) lwmfg = 0.0
( 7) lwfed = 0.0
( 8) lwsta = 0.0
( 9) lwloc = 0.0

F( 9, 520) = 2.47
Prob > F = 0.0090
47 Appendix B Computer Output

rental.raw
. infile city year pop enroll rent rnthsg tothsg
> avginc
> lenroll lpop lrent ltothsg lrnthsg lavginc clenroll clpop
> clrent cltothsg clrnthsg clavginc pctstu cpctstu y90
> using c:\data\rental.raw;
(128 observations read)

. regress lrent y90 lpop lavginc pctstu;

Source | SS df MS Number of obs = 128


---------+------------------------------ F( 4, 123) = 190.92
Model | 12.1080053 4 3.02700133 Prob > F = 0.0000
Residual | 1.95012621 123 .015854685 R-squared = 0.8613
---------+------------------------------ Adj R-squared = 0.8568
Total | 14.0581315 127 .110693949 Root MSE = .12592

------------------------------------------------------------------------------
lrent | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y90 | .2622267 .0347633 7.543 0.000 .193415 .3310385
lpop | .0406864 .0225154 1.807 0.073 -.0038815 .0852543
lavginc | .5714459 .0530981 10.762 0.000 .4663414 .6765504
pctstu | .0050436 .0010192 4.949 0.000 .0030262 .007061
_cons | -.5688066 .5348815 -1.063 0.290 -1.627572 .4899586
------------------------------------------------------------------------------

. regress clrent y90 clpop clavginc cpctstu, noconstant;

Source | SS df MS Number of obs = 64


---------+------------------------------ F( 4, 60) = 624.15
Model | 20.2790235 4 5.06975588 Prob > F = 0.0000
Residual | .487362109 60 .008122702 R-squared = 0.9765
---------+------------------------------ Adj R-squared = 0.9750
Total | 20.7663856 64 .324474775 Root MSE = .09013

------------------------------------------------------------------------------
clrent | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y90 | .3855214 .0368245 10.469 0.000 .3118615 .4591813
clpop | .0722456 .0883426 0.818 0.417 -.1044659 .248957
clavginc | .3099606 .0664771 4.663 0.000 .1769865 .4429346
cpctstu | .0112033 .0041319 2.711 0.009 .0029382 .0194684
------------------------------------------------------------------------------

. newey clrent y90 clpop clavginc cpctstu, lag(0) noconstant;

Regression with Newey-West standard errors Number of obs = 64


maximum lag : 0 F( 4, 60) = 691.38
Prob > F = 0.0000

------------------------------------------------------------------------------
| Newey-West
clrent | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
y90 | .3855214 .0487186 7.913 0.000 .2880697 .4829731
clpop | .0722456 .0696796 1.037 0.304 -.0671344 .2116255
clavginc | .3099606 .0893099 3.471 0.001 .1313141 .488607
cpctstu | .0112033 .002936 3.816 0.000 .0053305 .0170762
------------------------------------------------------------------------------
48 Appendix B Computer Output

vote2.raw

. regress cvote clinexp clchexp cincshr;

Source | SS df MS Number of obs = 157


---------+------------------------------ F( 3, 153) = 16.43
Model | 2932.65035 3 977.550118 Prob > F = 0.0000
Residual | 9102.29232 153 59.4921067 R-squared = 0.2437
---------+------------------------------ Adj R-squared = 0.2288
Total | 12034.9427 156 77.1470684 Root MSE = 7.7131

------------------------------------------------------------------------------
cvote | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
clinexp | -1.291526 1.382135 -0.934 0.352 -4.022059 1.439007
clchexp | -.5985303 .7113429 -0.841 0.401 -2.003852 .8067919
cincshr | .1558682 .0636806 2.448 0.016 .0300614 .2816749
_cons | -2.555936 .6309071 -4.051 0.000 -3.80235 -1.309522
------------------------------------------------------------------------------

. test clinexp clchexp;

( 1) clinexp = 0.0
( 2) clchexp = 0.0

F( 2, 153) = 1.51
Prob > F = 0.2236

. regress cvote cincshr;

Source | SS df MS Number of obs = 157


---------+------------------------------ F( 1, 155) = 45.97
Model | 2752.66972 1 2752.66972 Prob > F = 0.0000
Residual | 9282.27296 155 59.885632 R-squared = 0.2287
---------+------------------------------ Adj R-squared = 0.2237
Total | 12034.9427 156 77.1470684 Root MSE = 7.7386

------------------------------------------------------------------------------
cvote | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
cincshr | .2175863 .0320934 6.780 0.000 .1541894 .2809832
_cons | -2.681118 .6252773 -4.288 0.000 -3.916283 -1.445954
------------------------------------------------------------------------------

. regress cvote cincshr if rptchall==1;

Source | SS df MS Number of obs = 33


---------+------------------------------ F( 1, 31) = 1.19
Model | 38.298373 1 38.298373 Prob > F = 0.2839
Residual | 998.4289 31 32.2073839 R-squared = 0.0369
---------+------------------------------ Adj R-squared = 0.0059
Total | 1036.72727 32 32.3977273 Root MSE = 5.6752

------------------------------------------------------------------------------
cvote | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
cincshr | .0923912 .0847263 1.090 0.284 -.0804092 .2651915
_cons | -2.249822 .9986083 -2.253 0.031 -4.286497 -.2131474
------------------------------------------------------------------------------
49 Appendix B Computer Output

wagepan.raw
. regress lwage d82 d83 d84 d85 d86 d87 educ black hisp exper expersq married u
> nion;

Source | SS df MS Number of obs = 4360


---------+------------------------------ F( 13, 4346) = 77.70
Model | 233.196533 13 17.9381948 Prob > F = 0.0000
Residual | 1003.33309 4346 .230863573 R-squared = 0.1886
---------+------------------------------ Adj R-squared = 0.1862
Total | 1236.52962 4359 .283672774 Root MSE = .48048

------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d82 | .0272389 .0275967 0.987 0.324 -.0268647 .0813425
d83 | .0231358 .0305801 0.757 0.449 -.0368168 .0830885
d84 | .0489718 .0337867 1.449 0.147 -.0172674 .115211
d85 | .0658025 .0370003 1.778 0.075 -.006737 .138342
d86 | .0972761 .04019 2.420 0.016 .0184831 .176069
d87 | .1286576 .0434966 2.958 0.003 .043382 .2139331
educ | .0921175 .0052237 17.634 0.000 .0818764 .1023587
black | -.1398484 .0235847 -5.930 0.000 -.1860864 -.0936104
hisp | .0162835 .0208031 0.783 0.434 -.0245013 .0570682
exper | .0743651 .0131865 5.640 0.000 .0485129 .1002173
expersq | -.002759 .0008 -3.449 0.001 -.0043274 -.0011905
married | .108592 .0156933 6.920 0.000 .0778251 .1393588
union | .1816199 .0171565 10.586 0.000 .1479844 .2152554
_cons | .092606 .0782938 1.183 0.237 -.0608898 .2461018
------------------------------------------------------------------------------

. xtreg lwage d81 d82 d83 d84 d85 d86 d87 educ black hisp exper expersq married
> union, re;

Random-effects GLS regression Number of obs = 4360


Group variable (i) : nr Number of groups = 545

R-sq: within = 0.1799 Obs per group: min = 8


between = 0.1860 avg = 8.0
overall = 0.1830 max = 8

Random effects u_i ~ Gaussian Wald chi2(14) = 957.77


corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

------------------------------------------------------------------------------
lwage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d81 | .040462 .0246946 1.638 0.101 -.0079386 .0888625
d82 | .0309212 .0323416 0.956 0.339 -.0324672 .0943096
d83 | .0202806 .041582 0.488 0.626 -.0612186 .1017798
d84 | .0431187 .0513163 0.840 0.401 -.0574595 .1436969
d85 | .0578154 .0612323 0.944 0.345 -.0621977 .1778286
d86 | .0919476 .0712293 1.291 0.197 -.0476592 .2315543
d87 | .1349289 .0813135 1.659 0.097 -.0244427 .2943005
educ | .0918763 .0106597 8.619 0.000 .0709836 .1127689
black | -.1393767 .0477228 -2.921 0.003 -.2329117 -.0458417
hisp | .0217317 .0426063 0.510 0.610 -.0617751 .1052385
exper | .1057545 .0153668 6.882 0.000 .0756361 .1358729
expersq | -.0047239 .0006895 -6.851 0.000 -.0060753 -.0033726
married | .063986 .0167742 3.815 0.000 .0311091 .0968629
union | .1061344 .0178539 5.945 0.000 .0711415 .1411273
50 Appendix B Computer Output

_cons | .0235864 .1506683 0.157 0.876 -.2717179 .3188908


---------+--------------------------------------------------------------------
sigma_u | .32460315
sigma_e | .35099001
rho | .46100215 (fraction of variance due to u_i)
------------------------------------------------------------------------------

. xthaus;

Hausman specification test

---- Coefficients ----


| Fixed Random
lwage | Effects Effects Difference
---------+-----------------------------------------
d81 | .0190448 .040462 -.0214172
d82 | -.011322 .0309212 -.0422431
d83 | -.0419955 .0202806 -.0622762
d84 | -.0384709 .0431187 -.0815896
d85 | -.0432499 .0578154 -.1010653
d86 | -.027382 .0919476 -.1193295
exper | .1321464 .1057545 .0263919
expersq | -.0051855 -.0047239 -.0004616
married | .0466804 .063986 -.0173057
union | .0800019 .1061344 -.0261326

Test: Ho: difference in coefficients not systematic

chi2( 10) = (b-B)'[S^(-1)](b-B), S = (S_fe - S_re)


= 28.12
Prob>chi2 = 0.0017

. xtreg lwage d81 d82 d83 d84 d85 d86 d87 expersq married union, fe;

Fixed-effects (within) regression Number of obs = 4360


Group variable (i) : nr Number of groups = 545

R-sq: within = 0.1806 Obs per group: min = 8


between = 0.0286 avg = 8.0
overall = 0.0888 max = 8

F(10,3805) = 83.85
corr(u_i, Xb) = -0.1222 Prob > F = 0.0000

------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d81 | .1511912 .0219489 6.888 0.000 .1081584 .194224
d82 | .2529709 .0244185 10.360 0.000 .2050963 .3008454
d83 | .3544437 .0292419 12.121 0.000 .2971125 .4117749
d84 | .4901148 .0362266 13.529 0.000 .4190893 .5611402
d85 | .6174822 .0452435 13.648 0.000 .5287784 .7061861
d86 | .7654966 .0561277 13.638 0.000 .6554532 .8755399
d87 | .9250249 .0687731 13.450 0.000 .7901893 1.059861
expersq | -.0051855 .0007044 -7.361 0.000 -.0065666 -.0038044
married | .0466804 .0183104 2.549 0.011 .0107812 .0825796
union | .0800019 .0193103 4.143 0.000 .0421423 .1178614
_cons | 1.426019 .0183415 77.748 0.000 1.390058 1.461979
------------------------------------------------------------------------------
sigma_u | .39176195
sigma_e | .35099001
51 Appendix B Computer Output

rho | .55472816 (fraction of variance due to u_i)


------------------------------------------------------------------------------
F test that all u_i=0: F(544,3805) = 9.16 Prob > F = 0.0000

. xtreg lwage d81 d82 d83 d84 d85 d86 d87 expersq married union occ2 occ3 occ4
> occ5 occ6 occ7 occ8 occ9, fe;

Fixed-effects (within) regression Number of obs = 4360


Group variable (i) : nr Number of groups = 545

R-sq: within = 0.1827 Obs per group: min = 8


between = 0.0345 avg = 8.0
overall = 0.0949 max = 8

F(18,3797) = 47.14
corr(u_i, Xb) = -0.1094 Prob > F = 0.0000

------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d81 | .1512177 .0219912 6.876 0.000 .1081019 .1943335
d82 | .2513905 .0245807 10.227 0.000 .2031979 .2995832
d83 | .3522456 .0294953 11.942 0.000 .2944174 .4100737
d84 | .485203 .0366514 13.238 0.000 .4133448 .5570612
d85 | .6105365 .0457412 13.348 0.000 .5208567 .7002163
d86 | .7548472 .0567538 13.300 0.000 .6435763 .866118
d87 | .914187 .069528 13.148 0.000 .7778712 1.050503
expersq | -.0050996 .000709 -7.192 0.000 -.0064898 -.0037095
married | .0459227 .0183429 2.504 0.012 .0099598 .0818855
union | .080381 .0194006 4.143 0.000 .0423445 .1184175
occ2 | -.0136055 .0323164 -0.421 0.674 -.0769646 .0497536
occ3 | -.0621039 .0377516 -1.645 0.100 -.1361192 .0119114
occ4 | -.0792051 .0307204 -2.578 0.010 -.1394351 -.0189751
occ5 | -.0307398 .030348 -1.013 0.311 -.0902397 .0287602
occ6 | -.0280367 .0306803 -0.914 0.361 -.0881881 .0321146
occ7 | -.0386447 .0338524 -1.142 0.254 -.1050153 .027726
occ8 | -.0611993 .066051 -0.927 0.354 -.1906982 .0682996
occ9 | -.0438229 .0342572 -1.279 0.201 -.1109872 .0233414
_cons | 1.461778 .0300986 48.566 0.000 1.402767 1.520789
------------------------------------------------------------------------------
sigma_u | .38929496
sigma_e | .35091327
rho | .55171351 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(544,3797) = 8.39 Prob > F = 0.0000

. gen t=year-1979;

. gen uniont=t*union;

. xtreg lwage d81 d82 d83 d84 d85 d86 d87 expersq married union uniont, fe;

Fixed-effects (within) regression Number of obs = 4360


Group variable (i) : nr Number of groups = 545

R-sq: within = 0.1822 Obs per group: min = 8


between = 0.0289 avg = 8.0
overall = 0.0904 max = 8

F(11,3804) = 77.04
corr(u_i, Xb) = -0.1156 Prob > F = 0.0000
52 Appendix B Computer Output

------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d81 | .154615 .021966 7.039 0.000 .1115488 .1976813
d82 | .2593777 .0245099 10.583 0.000 .2113238 .3074315
d83 | .3639895 .0294248 12.370 0.000 .3062996 .4216793
d84 | .502434 .0364751 13.775 0.000 .4309214 .5739465
d85 | .6317003 .0455031 13.883 0.000 .5424875 .720913
d86 | .7811854 .0563727 13.858 0.000 .6706617 .891709
d87 | .945296 .0691133 13.677 0.000 .8097933 1.080799
expersq | -.0050967 .0007046 -7.234 0.000 -.0064781 -.0037153
married | .0462279 .0182956 2.527 0.012 .0103577 .082098
union | .1477664 .031406 4.705 0.000 .0861922 .2093407
uniont | -.0156518 .0057237 -2.735 0.006 -.0268735 -.00443
_cons | 1.411953 .019034 74.180 0.000 1.374635 1.449271
------------------------------------------------------------------------------
sigma_u | .39114985
sigma_e | .35069162
rho | .55437583 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(544,3804) = 9.16 Prob > F = 0.0000

. xtreg lwage d81 d82 d83 d84 d85 d86 d87 educ black hisp exper expersq married
> union uniont, re;

Random-effects GLS regression Number of obs = 4360


Group variable (i) : nr Number of groups = 545

R-sq: within = 0.1815 Obs per group: min = 8


between = 0.1862 avg = 8.0
overall = 0.1838 max = 8

Random effects u_i ~ Gaussian Wald chi2(15) = 966.65


corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

------------------------------------------------------------------------------
lwage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------+--------------------------------------------------------------------
d81 | .0453447 .0247431 1.833 0.067 -.0031508 .0938402
d82 | .0402619 .0325098 1.238 0.216 -.0234562 .10398
d83 | .0342497 .041887 0.818 0.414 -.0478474 .1163468
d84 | .0613632 .0517445 1.186 0.236 -.0400542 .1627806
d85 | .0794969 .0617434 1.288 0.198 -.0415179 .2005117
d86 | .1166454 .0718029 1.625 0.104 -.0240856 .2573764
d87 | .1657099 .0820958 2.018 0.044 .004805 .3266148
educ | .0918469 .0106611 8.615 0.000 .0709516 .1127423
black | -.1380557 .0477312 -2.892 0.004 -.2316073 -.0445042
hisp | .0219865 .042612 0.516 0.606 -.0615316 .1055046
exper | .1042873 .0153715 6.784 0.000 .0741598 .1344148
expersq | -.0046411 .0006896 -6.730 0.000 -.0059927 -.0032895
married | .0637482 .0167626 3.803 0.000 .0308941 .0966023
union | .1739122 .0305814 5.687 0.000 .1139737 .2338507
uniont | -.0155394 .0056908 -2.731 0.006 -.0266932 -.0043856
_cons | .0140954 .1507246 0.094 0.925 -.2813192 .3095101
---------+--------------------------------------------------------------------
sigma_u | .32470082
sigma_e | .35069162
rho | .46157439 (fraction of variance due to u_i)
------------------------------------------------------------------------------
53 Appendix B Computer Output

. xthaus;

Hausman specification test

---- Coefficients ----


| Fixed Random
lwage | Effects Effects Difference
---------+-----------------------------------------
d81 | .0195727 .0453447 -.025772
d82 | -.0107069 .0402619 -.0509688
d83 | -.0411374 .0342497 -.075387
d84 | -.0377352 .0613632 -.0990984
d85 | -.0435112 .0794969 -.1230081
d86 | -.0290683 .1166454 -.1457137
exper | .1350423 .1042873 .0307549
expersq | -.0050967 -.0046411 -.0004556
married | .0462279 .0637482 -.0175203
union | .1477664 .1739122 -.0261458
uniont | -.0156518 -.0155394 -.0001124

Test: Ho: difference in coefficients not systematic

chi2( 11) = (b-B)'[S^(-1)](b-B), S = (S_fe - S_re)


= 29.09
Prob>chi2 = 0.0022
Exercise 1

Consider the output below for 2 models.


Model 1 has total household food expenditure (FEXP) depending upon total
household income (totalinc) and household size (HHSIZE).
Model 2 has per-person food expenditure (ppfexp) depending upon per-person
household income (pptinc) and household size.

Model 1

. regress FEXP totalinc HHSIZE


Source | SS df MS Number of obs = 975
---------+------------------------------ F( 2, 972) = 169.06
Model | 465597.497 2 232798.748 Prob > F = 0.0000
Residual | 1338446.48 972 1377.00255 R-squared = 0.2581
---------+------------------------------ Adj R-squared = 0.2566
Total | 1804043.98 974 1852.20121 Root MSE = 37.108

------------------------------------------------------------------------------
FEXP | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
totalinc | .0649059 .0108822 5.964 0.000 .0435505 .0862613
HHSIZE | 9.614927 .7820028 12.295 0.000 8.080319 11.14954
_cons | 17.70705 3.026901 5.850 0.000 11.76703 23.64706
------------------------------------------------------------------------------

Model 2

. regress ppfexp pptinc HHSIZE

Source | SS df MS Number of obs = 975


---------+------------------------------ F( 2, 972) = 63.23
Model | 11856.5856 2 5928.29278 Prob > F = 0.0000
Residual | 91126.9918 972 93.7520492 R-squared = 0.1151
---------+------------------------------ Adj R-squared = 0.1133
Total | 102983.577 974 105.732626 Root MSE = 9.6826

------------------------------------------------------------------------------
ppfexp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
pptinc | .0500437 .010325 4.847 0.000 .0297818 .0703057
HHSIZE | -1.471733 .1913777 -7.690 0.000 -1.847294 -1.096172
_cons | 21.96442 1.206679 18.202 0.000 19.59643 24.33242
------------------------------------------------------------------------------

1
Exercise 1 (continued)

Answer these questions

• Interpret the coefficient on totalinc in Model 1


• Is it significant?
• Interpret the coefficient on pptinc in Model 2
• Is it significant?
• Interpret the coefficient on HHSIZE in Model 2
• Is it significant?
• Does it correspond to your prior beliefs?
• What explains the large discrepancy between the coefficients on HHSIZE
in the two models

2
Exercise 2

In the model below, we have estimated the effect of years of educ (educ) on the
natural log of the wage (lwage). Wage is measured as average hourly earnings.

. regress lwage educ;

Source | SS df MS Number of obs = 526


---------+------------------------------ F( 1, 524) = 119.58
Model | 27.5606296 1 27.5606296 Prob > F = 0.0000
Residual | 120.769132 524 .230475443 R-squared = 0.1858
---------+------------------------------ Adj R-squared = 0.1843
Total | 148.329762 525 .28253288 Root MSE = .48008

------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
educ | .0827444 .0075667 10.935 0.000 .0678796 .0976092
_cons | .5837726 .0973358 5.998 0.000 .3925562 .774989
------------------------------------------------------------------------------

Answer these questions

• Interpret the coefficient on educ.


• Does education have a significant effect on earnings?
• Name two other variables that you might like to include in this model for
which data might reasonably be expected to be available
• Name one variable that you might like to include in this model for which
data would probably not be available

3
Exercise 3

Question 1: Look at the output on page 25 of the notebook using the


fertil1.raw data. Consider the following claim: Holding education, age, region,
and rurality constant, a black woman is expected to have one more child than
a non-black woman. Would you agree with this claim?

Question 2: Consider these two models:


ln(price) = 11.49 − .547nearinc + .394 y81 ∗ nearinc
(.26) (.058) (.08)
n = 321 R2 = .22


ln(price) = 11.18 + .563y81 − .403 y81 ∗ nearinc
(.27) (.044) (.067)
2
n = 321 R = .337

Why are the coefficients on y81 ∗ nearinc so different from one another and
different from the results on page 74 of the lecture notes?

You might also like