Professional Documents
Culture Documents
Unit 1: Introduction To Econometric Analysis OUTLINE: A. Economic Questions and Data: The Role of Econometrics
Unit 1: Introduction To Econometric Analysis OUTLINE: A. Economic Questions and Data: The Role of Econometrics
c Maite Cabeza-Gutés
Unit 1: Introduction to Econometric analysis · OUTLINE
1.1. Presentation
A. Economic questions and data: the role of econometrics
≡ Some examples of economic questions
SLIDE #1(1)
1
https://www.r-project.org/
Introduction to Econometric Analysis 2
≡ Econometrics: Objectives
(1) Measuring association
→ Examples:
- How connected are stock markets?
- How closely does the return of a given stock follow the movements of the
stock market ?
SLIDE #1(2)
→ What is confounding?
In measuring the degree of association between variable A and variable B, con-
founding appears whenever there is a variable C that affects at the same time
variable A and B. Some times, this variable C is referred to as a confounder.
time, variable C causes, has an effect on, variable B. No direct link is present
between A and B. They association comes only from the path though C.
A
C
B
C A B
→ Guessing the value of a variable. It can imply guessing the value of a variable
into the future, but not exclusively. The idea is to make an informed guess, a
best/optimal guess.
→ Examples:
- What is the prediction for next quarter growth rate ?
- How much does a company expect to sell next month?
→ In this course we shall learn how to make conditional predictions. That is,
predictions on one variable using information available from other variables.
It is important to understand that detecting associations between variables,
even if they are spurious or biased measures, can be useful for prediction.
Introduction to Econometric Analysis 4
W1 − W0 > 0 .
E(W/C = 1) − E(W/C = 0)
Not necessarily.
Causal diagrams help in understanding why association and causation are dif-
ferent things. Causal diagrams, as explained, translate our prior expertise on
the variables we are analyzing. In this case, we consider that going to col-
lege has an effect on pay, hence an arrow from C to W . We also believe that
family income, F determines the chances of people going to college and at the
same time, it influences their pay (may be through networking, good family
connections,..). The causal diagram reflecting these assumptions is included
below.
link of interest
C W
Notice, that under our causal diagram, we would be facing confounding. This
would imply that W 1 − W 0 would be a biased measure of our link of interest.
In this case it would overestimate the effect of C on W . It does not matter
how large our sample is, the bias will be there.
How to deal with confounding? To actually move towards measuring our link
of interest, we should take the role of F into account in our calculations, some-
thing not done when calculating W 1 and W 0 .
?
F Y
Notice: We can use Yi1 and Yi0 to clearly define the effect of fertilizer on plot i
Yi1 − Yi0 = effect of fertilizer for plot i.
Notice that Yi1 and Yi0 are counterfactual. That is, they cannot be observed
at the same time. Now, we can define the (average) effect of the fertilizer on
crop yields using parameter AT E (Average Treatment Effect):
AT E ≡ E(Yi1 − Yi0 )
?
F Y
+ +
Hence, we would not know if Y 1 − Y 0 > 0 is due to the effect of the fertil-
izer, to the differences in sunlight, or to both. That is Y 1 − Y 0 would be
a biased measure of AT E. This would be again a case of confounding.
?
F Y
Notice that the population counterpart of the conditional sample means above
would be:
E(Y /F = 1, S = 1) − E(Y /F = 0, S = 1)
E(Y /F = 1, S = 0) − E(Y /F = 0, S = 0)
Comments
(i) To control for a variable, this variable should be part of our data set. In
our example, if no data is available on sunlight levels, then, controlling for
sunlight would not be possible and confounding would affect our causal
inference. We would face what it is called an identification problem. No
matter how large the sample is, if we do not control for S, identification
problem remains.
Y 1 S=1 − Y 0 S=1 and Y 1 S=0 − Y 0 S=0
can be interpreted in causal terms. Of course, the larger the sample, the
better our measurement of this causal effect would be. That is, we would
not face an identification problem, as increasing the sample size would al-
low to get more precise estimates of our causal parameter of interest.
→ In this course we will learn to use regression analysis as a way to try to con-
trol for confounding. Regression analysis is a very useful tool for calculating
conditional means. If all variables causing confounding have been identified,
and data for these variables is available, regressions could be used for causal
inference.
→ Summing up:
In the context of a controlled experiment, causal inference requires all other
factors that influence the outcome vary at random (randomization) or can be
controlled for. That is, even if the direction of causality between treatment
and outcome is clear, prior knowledge (theory) of the variables affecting the
outcome is required and will determine the quality of the inference.
Introduction to Econometric Analysis 9
The nature of economic data is central for the understanding of econometrics and
its methodology.
A large proportion of the data available for analysis is obtained by observing actual
behavior outside an experiment. That is, we have observational data, (also referred
to as passive data or nonexperimental data ). The nature of the data is what
makes causal inference very tricky.
Exceptions/Alternatives: Natural experiments (many available) and Social experi-
ments (increasingly available)
Time series
Data on same economic unit, different time periods. A series always implies some
ordering of the data. In the case of a time series, observations are temporarily
ordered. An observation of a variable in a time series data set is typically identified
as:
yt
where subindex t could refer to a day (in the case of daily data set), a month
(monthly data set ), a year (yearly data set),...
yit
Continuous: A variable is continuous when it can take any value within an interval.
E.g: income/earnings/profits or growth measurement
2
Usually it is also included in the definition that plus it includes a ’true’ 0 point (i.e., it has an absolute
zero). When a level of measurement includes an absolute 0 what it means is that it is indicating a lack
of presence of the quality being measured. Example an income of 0 means the person has no income
whereas a temperature of 0 does not indicate a lack of temperature. Hence, income is ratio scale but not
temperature.
Introduction to Econometric Analysis 11
Goal: study relationship between parents height and their children’s height as
adults. We will use part of his work in this article to introduce regression anal-
ysis.
Galton’s data: Collected data of 928 people, born from 205 couples.
SLIDE #1(3)
SLIDE #1(4)
Descriptive statistics4 :
SLIDE #1(5) (statistics)
3
See appendix: GaltonCode1.
4
See appendix GaltonCode2
Introduction to Econometric Analysis 12
Important:
Density histograms5 :
SLIDE #1(5) (Plots)
0.3
0.2
0.2
Density
Density
0.1
0.1
0.0 0.0
Comments:
→ In this plot we see the density histogram of each variable of parents height and
of child’s height as adults. In red, the sample mean of each variable is also
identified.
→ If Child’s distribution is assumed to be normal, then we would expect that
95% of all the observations to be within.....
5
See appendix GaltonCode3
Introduction to Econometric Analysis 13
SLIDE #1(6)
72.5
67.5
65.0
63 66 69 72
Parent Height
Comments:
→ Plot above provides information of both, relationship between the two variables
(scatter) and information of each variable in the sample, regardless the value
of the other (marginal density histograms). The dotted blue lines identify each
of the (marginal) sample means.
→ From now on we are interested in relationships, not marginal behavior, so we
will focus on the scatter part of the plot.
SLIDE #1(7)
72.5
Child’s Height (as adults)
70.0
67.5
65.0
63 64 65 66 67 68 69 70 71 72 73
Parent’s Height
How could we extract info from the sample on this conditional expectation?
We select from the sample all children that have parents with height 63.75in (there
are 8 of them) and calculate the average of the 8 heights.
child|parent=63.75cm = 65.53in
Now, we can repeat the calculations for all conditional means (40 of them).
SLIDE #1(8)
72.5
70.0
70.0
Mean Child Height
Child Height
67.5
67.5
65.0 65.0
63 64 65 66 67 68 69 70 71 72 73 63 64 65 66 67 68 69 70 71 72 73
Parent Height Parent Height
Introduction to Econometric Analysis 15
Comments
→ We can see that the conditional means (red squares) change as a function of
value of parent. That it, we can see that we can talk about CEF :
E(child/parent) = f (parent).
70.0
70.0
67.5
67.5
65.0 65.0
63 64 65 66 67 68 69 70 71 72 73 63 64 65 66 67 68 69 70 71 72 73
Parent Height Parent Height
The black line can be used as an approximation of tis CEF. In this case a good
approximation.
→ The black line is positively sloped, with a value of approximately 2/3: regres-
sion to the mean (hence the title of Galton’s article.)
→ Notice that the CEF function could be used to:
(1) Describe the association between the two variables (proving more informa-
tion than just using the covariance or correlation coefficient.
(2) As (optimal) conditional prediction of child, given the information of
parent.
(3) Could we used in this case as a measure of the effect (in this case through
genetic inheritance) of parents height on to children? Probably.
B. Regression analysis
≡ Regression analysis is a tool we use to extract information from the data set. Re-
gressions focus on characterizing the behavior of a single variable y with respect to
a set of variables x1 , x2 , . . . , xk .
Variable y is usually referred to as the dependent variable and variables x1 , x2 , . . . , xk
as regressors.
Most popular regression models focus on the conditional expectation of y given the
values of the regressors, x1 , x2 , . . . , xk .8
E(y/x1 , x2 , . . . , xk )
8
Not the only option, we could also focus on conditional medians, as Galton did.
Introduction to Econometric Analysis 16
E(y/x1 , x2 , . . . , xk ) = f (x1 , x2 , . . . , xk ).
Now, associated to this CEF we can define the associated regression model as:
y = E(y/x1 , x2 , . . . , xk ) + u.
y = E(y/x) + u.
Galton’s work: Please notice the equivalences to Galton’s example just presented in
section 1.2.A.
Example:
→ Variables: annual income (W ages), whether person has a college degree or not,
using indicator variable C.
→ To define the regression model, we need to choose which variable acts as y and
which one as x. Our prior causal model might help in that.
y : Wage (W )
x : College degree indicator (C)
9
Notice the label ’regression function’ is more general. It could also be applied to regression analysis
that focuses on conditional medians, for example.
Introduction to Econometric Analysis 17
E(W/C)
Notice that treating CEF as a function implies allowing the possibility that
E(W/C) might change depending on the value of C:
E(W/C = 1) (expected wage for a person with a college degree)
E(W/C) =
E(W/C = 0) (expected wage for a person without a college degree)
That is:
E(W/C) = f (C)
Notice, this CEF is a function that can only take two values.
→ In this case, the regression model would be:
W = E(W/C) + u
Term u would capture the part of W not captured by C. What could this
include?
E(y/x1 , x2 , ..., xK ) = β0 + β1 x1 + . . . βK xK
Since the CEF is assumed to be linear, it is known as the Linear Regression function
or Regression line.
y = β 0 · 1 + β 1 x1 + β 2 x2 + . . . + β K xK + u Regression Model
E(y/x) = β0 + β1 x
Introduction to Econometric Analysis 18
y = β0 + β1 x +u .
| {z }
E(y/x)
Galton’s work: Back to Galton’s Slide1(8): would this assumption, of linear CEF
seem reasonable?
→ Variables: annual income (W ages), whether person has a college degree or not,
using indicator variable C.
W : acting as dependent variable
C: acting as regressor
→ Regression line: E(W/C) = β0 + β1 C
Simple regression model: W = β0 + β1 C + u.
→ Parameter meaning?
E(W/C = 1) = β0 + β1
E(W/C = 0) = β0
β1 = E(W/C = 1) − E(W/C = 0)
Hence: β1 is the expected difference in pay between person with college degree
and a person without.
Notice now our parameters can be used to formalize our goals:
(1) β1 : characterize the association between W and C. Still we should be
careful as we are interested in meaningful associations (not spurious) and
in measuring these associations without bias.
Example:
link of interest!
C W
E(u/C = 1) = E(u/C = 0)
Or, equivalently:
E(u/C) 6= f (C),
or,
E(u/C) = constant (usually chosen to be 0).
link of interest!
C W
u
Introduction to Econometric Analysis 20
In this case:
E(u/C = 1) 6= E(u/C = 0)
Or, equivalently:
E(u/C) = f (C).
→ Under these conditions, regressor C is labelled as endogenous.
If β1 is a parameter that we want to define as the one measuring the
effect of C on W , then, using data solely on C and W to measure
this effect, will produce a biased estimate, since it will be affected by
confounding.
As explain, our goal will be use the information contained in our sample to approx-
imate the CEF or regression function. Given that we are using linear regression
analysis, this will imply estimate these parameters using our sample.
After estimation, hypothesis testing and confidence intervals will be used to evaluate
what conclusions can we draw regarding the population from the analysis of our
sample.
Readings
Stock, James and Watson, Mark, Introduction to Econometrics. Updates third edi-
tion (or earlier). Chapter1,2,3.
Appendix: Rcodes
• GaltonCode1: Import data and look at data
1 Galton _ data <- read _ csv ( " Galton . csv " )
2 head ( Galton _ data )
3 tail ( Galton _ data )