Ba Rimsr
Ba Rimsr
Ba Rimsr
• Introduction
• Discussion of Syllabus
• Review of linear regressions
My expectation is that
you've seen most of this Despite trying to do much
before; but it is helpful to of it without math; today's
review the key ideas that lecture likely to be long
are useful in practice and tedious. . . (sorry)
(without all the math)
I Linear Regression - Outline
• The CEF and causality (very brief)
• Linear 0 LS niodel
• Multivariate estiniation
• Hypothesis testing
• Miscellaneous issues
• Wooldridge
o Sections4.1 &4.2
• Greene
o Chapter 3 and Sections 4.14.4) 5. 7-5.9) 6.1-6.2
• Linear 0 LS nlodel
• Multivariate estinlation
• Hypothesis testing
• Miscellaneous issues
I A bit about random variables
• It is useful know that any randoni variable y
can be written as
y=E(y x)+c
where (y) ~ E) are random variables and E(EI x}=O
Our goal is
to learn about
E(ylx) = c
theCEF
• Linear 0 LS nlodel
• Multivariate estinlation
• Hypothesis testing
• Miscellaneous issues
I Linear regression and the CEF
• If done correctly, a linear regression can
help us uncover what the CEF is
• Consider linear regression model, y = Px + u
oy = dependent variable
o x = independent variable
o u = error term (or disturbance)
o ~ = slope parameter
Some additional terminology
• Other term.s fory... • Other term.s for x ...
o Outcome variable o Covariate
o Response variable o Control variable
o Explained variable o Explanatory variable
o Predicted variable o Predictor variable
o Regressand o Regressor
I Details about y = f3x + u
• (y, x, u) are randotn variables
• (y, x) are observable
• (u, /1) are unobservable
o u captures everything that determines y after
accounting for x [This might be a lot of stuff!]
o We want to estimate ~
I Ordinary Least Squares (OLS)
• Sim.ply put, OLS finds the f3 that
m.inim.izes the m.ean-squared error
/3 = argmin = E[(y-bx) 2 ]
b
• Linear 0 LS nlodel
• Multivariate estinlation
• Hypothesis testing
• Miscellaneous issues
I What about causality?
• Need to be careful here ...
o How x explains y, which this regression
helps us understand, is not the same as
learning the causal effect of x ony
o For that, we need more assumptions ...
I The basic assumptions [Part 1)
• Assumption #1: E(u) =0
o With intercept, this is totally innocuous
o Just change regression toy = rL + px + u,
where rL is the intercept term
o Now suppose, E(u)=kf:O
• We could rewrite u = k + w, where E(w)=O
• =
Then, model becomes y (et + k) + {Jx + w
• Intercept is now just et + k, and error, w, is mean zero
• I.e., Any non-zero mean is absorbed by intercept
I The basic assumptions [Part 2)
Intuition?
• Assumption #2: E(u Ix) = E(u)
o In words, average of u (i.e., unexplained portion
ofy) does not depend on value of x
o This is ''conditional mean independence'' (CMI)
• True if x and u are independent of each other
• Implies u and x are uncorrelated
~-
o Basic interpretation
0 Rescaling & shifting of variables
o Incorporating non-linearities
• Multivariate estinlation
• Hypothesis testing
• Miscellaneous issues
I Interpreting the estimates
• Suppose I estitnate the following tnodel of
CEO cotnpensation
salaryi = a+ fiROEi + ui
o Salary for CEO i is in $000s; ROE is a 0/o
• Multivariate estilllation
• Hypothesis testing
• Miscellaneous issues
I Scaling the dependent variable
• What if I change tneasuretnent of salary frotn
$000s to $s by tnultiplying it by 1,000?
y=a+Px+u
cy = (ca)+ ( cP) x +cu
I
New intercept New slope
I Scalingy continued ...
• Notice, the scaling has no effect on the
relationship between ROE and salary
y=a+ /3 kx+u
k
New slope
I Scaling both x and y
• If we scale y by an atnount c and x by
atnount k , then we get ...
o Intercept scaled by c
o Slope scaled by c/ k
y=a+px+u
cy = (ca)+ cf kx +cu
y=a+fix+u
y + c = a + c +fix+ u
y+c = a+c+ P(x+k)-Pk+u
y+c =(a+c-fik)+ P(x+k)+u
/
New intercept ""
Slope the same
I Practical application of shifting
• To itnprove interpretation, sotnetitnes helpful
to detnean x by its satnple tnean
o Let µx be the sample mean of x, regress y on x - µx
o Intercept now reflects expected value ofy for x =µx
• Multivariate estinlation
• Hypothesis testing
• Miscellaneous issues
I Incorporating nonlinearities [Part 1J
• Assunllng that the causal CEF is linear
m.ay not always be that realistic
ln(y) = a + /J ln( x) + u
y = a + /J ln( x) + u
Level-Level y x dy = f3dx
Level-Log y ln(x) dy = (/3/100) 0/odx
Log-Level ln(y) x 0
/ody = (100f3)dx
Log-Log ln(y) ln(x) 0
/ody = /3 °/odx
y =a+ Plog(x)+u
y+ Plog(c) =a+ Plog(x)+ Plog(c)+u
y = (a - Plog(c)) + Plog(cx) + u
I Rescaling logs doesn't matter [Part 3)
• Basic message - If you rescale a logged variable,
it will not affect the slope coefficient because you
are only looking at proportionate changes
I Log approximation problems
• I once discussed a paper where author
argued that allowing capital inflows into
country caused -120°/o change in stock
prices during crisis periods ...
;>--.
(!)
250.00%
OJ)
ij
...c: 200.00%
u
~ 150.00%
- -- ---
.,.. .
,;-.
100.00o/o
__ .... ---- _... -- -- _.,.. .,..
50.00%
-·-
.... . --- -
,,..
,,,.. fl"'
0.00%
0 0.5. 1 1.5 2 2.5 3 3.5 4 4.5 5
Delta x
I Log approximation problems [Part 3)
• Probleni also occurs for negative changes
• Hypothesis testing
• Miscellaneous issues
I Motivation
• Rather uncom.m.on that we have
just one independent variable
o So, now we will look at multivariate
OLS models and their properties ...
I Basic multivariable model
• Exam.ple with constant and k regressors
~-
o Partial regression interpretation-
o R2 , bias, and consistency
• Hypothesis testing
• Miscellaneous issues
IQuestion to motivate the topic...
• What is wrong with the following? And w-hy?
o Researcher wants to know effect of x ony
after controlling for z
o So, researcher removes the variation iny that is
z z
driven by by regressingy on & saves residuals
o Then, researcher regresses these residuals on x and
claims to have identified effect of x ony controlling
for zusing this regression
• Hypothesis testing
• Miscellaneous issues
I Goodness-of-Fit (R2)
• A lot is tnade of R-squared; so, let's
quickly review exactly what it is
• Start by defining the following:
D Sum of squares total (SS1)
D Sum of squares explained (SSE)
D Sum of squares residual (SSR)
I Definition of SST, SSE, SST
If N is the num.ber of observations and the
regression has a constant, then
N 2
SST = L (Yi - y)
i=l
SST is total variation iny
R 2 = SSE/SST = 1- SSR/SST
I More about R2
• As seen on last slide, R2 m.ust be
between 0 and 1
• It can also be shown that R2 is equal
to the square of the correlation
between y and predicted y
• If you add an independent variable,
R2 will never go down
I Adjusted R2
• Because R2 always goes up, we often use
what is called Adjusted R2