Linear regression for economists: The linear model. — Transcript
Full transcript
- 0:01welcome back in this video we'll talk
- 0:04about the linear regression
- 0:07mod previously we have developed a model
- 0:09for test score
- 0:15production the test score is a classroom
- 0:17outcome variable that we interested in
- 0:20the test score Y is equal to the
- 0:23potential
- 0:24outcome why evaluated at the treatment D
- 0:29that this classroom receives and our
- 0:31treatment was classroom size and the
- 0:34value of a confounder x and we consider
- 0:38the PD index as an example for a
- 0:40confounder where the PD index measures
- 0:42the percentage of disadvantaged students
- 0:45at the school we have imposed some
- 0:48structure on this potential outcome
- 0:50function namely we have assumed that we
- 0:53can write it as M where m is an unknown
- 0:57function but that is the same for all
- 0:59class rooms evaluated add treatment and
- 1:06confounder plus an error term
- 1:10U every classroom can have their own
- 1:13value of test score classroom size
- 1:17confounder and err term
- 1:20U the M function is shared between
- 1:24classrooms what do we assume about
- 1:26observability we assume that y D and X
- 1:31can be
- 1:33observed the error term is
- 1:40unobserved the function m is
- 1:45unknown we assume that U is balanced in
- 1:49the following sense if we
- 1:53average u in any subpopulation
- 1:56characterized by a classroom size equal
- 2:00to lowercase D and a PD index equal to
- 2:05lowercase
- 2:07x that average will be equal to
- 2:11zero when this balancing assumption is
- 2:13satisfied then we say that the error
- 2:16term is
- 2:23exogenous under this assumption the M
- 2:26function has a very particular
- 2:28interpretation to see this let's take
- 2:31the average of Y over this
- 2:40subpopulation this will be equal
- 2:46to and now I would just plug in for
- 2:52y instead of Y I will put the right hand
- 2:56side and these are equal by these dise
- 3:05equalities now note that in this
- 3:07subpopulation every class has this class
- 3:10size and this PD
- 3:13index so I can replace the general class
- 3:16size NPD index by these two specific
- 3:22values this is just the M function
- 3:25evaluated at values lowercase D and
- 3:28lowercase x this will just be a number
- 3:31and since it's a fixed number it's just
- 3:34shifting the average by this amount this
- 3:38means I can take this out of the
- 3:46average now this here will be equal to
- 3:51zero by The Balancing
- 3:54assumption and therefore we just be left
- 3:58with this
- 4:02we've now shown that M gives us the
- 4:05population average or the mean of Y for
- 4:09given DN
- 4:11x a good name for m is therefore to call
- 4:15it the conditional mean
- 4:20function we can abbreviate this by
- 4:23writing
- 4:26cmf for reasons that will become
- 4:28appearance soon we sometimes also call m
- 4:31the regression
- 4:34curve what we've learned here may help
- 4:37us interpret our identification result
- 4:39for the treatment effect here we've
- 4:41written the treatment effect as the
- 4:43difference of two M
- 4:45functions now we know that this is the
- 4:48difference between the means of two
- 4:51subpopulations therefore it's not
- 4:52surprising that we estimated the
- 4:54treatment effect by subtracting averages
- 4:56over two
- 4:58subsamples but there was an issue with
- 5:00this strategy do you
- 5:03remember yes that's right the subsamples
- 5:05that we picked were really small they
- 5:07consisted only of three and four
- 5:10observations that's way too small to be
- 5:13informative about the
- 5:14population ideally we want to use our
- 5:17whole sample and not just these small
- 5:19subsamples to learn about treatment
- 5:22effects we can do this by making a
- 5:24parametric assumption and that's what we
- 5:26do next this additional assumption will
- 5:29yield the linear regression
- 5:36model so far we have assumed that Y is
- 5:41equal to M evaluated at treatment D and
- 5:47confounder
- 5:48X plus an error term before introducing
- 5:52the linear regression model I want to
- 5:54get back to something that I talked
- 5:56about
- 5:57earlier I said that sometimes you want
- 5:59to control for an additional confounder
- 6:01other than x then we can do that by
- 6:04changing the definition of the M
- 6:05function slightly let's do this right
- 6:08now we just add the additional
- 6:10confounder to our M
- 6:14function there we
- 6:17go now the labeling of the confounders
- 6:21is a little asymmetric I'd rather label
- 6:23them X1 and
- 6:25X2 for reasons that will become apparent
- 6:28later it's even SM to label them X2 X3
- 6:33so we're skipping the subscript one for
- 6:35now and start labeling with a
- 6:38two all these orange colored variables
- 6:41are observable what do they correspond
- 6:44to in our
- 6:46example our outcome Y is given by the
- 6:49test
- 6:50score treatment D is given by the class
- 6:54size the PD index is our first
- 6:58confounder as let's call it
- 7:00X2 and cord size can be another
- 7:03confounder let's call it
- 7:06X3 at this point we have to be a little
- 7:08bit more precise we're not sure that the
- 7:12PD index is indeed a
- 7:14confounder at this point we should
- 7:16consider it a potential
- 7:22confounder we adding it to our model to
- 7:24control for it therefore we also call it
- 7:27a control variable
- 7:30or sometimes we just call it a
- 7:33control now we can finally discuss the
- 7:36linear regression model for the linear
- 7:38regression model we make one additional
- 7:41assumption we assume that we have
- 7:43partial knowledge about
- 7:45M while we don't pin down M completely
- 7:48we assume that we roughly know its shape
- 7:52such an assumption is called a
- 7:53functional form assumption or a
- 7:55parametric
- 7:58assumption
- 8:00in particular we assume that we can
- 8:02write M as follows M at arbitrary
- 8:06lowercase
- 8:07D
- 8:09X2 and X3 can be specified as
- 8:23follows here the blue Greek letters
- 8:27Alpha Gamma and beta
- 8:30are called
- 8:33coefficients and they stand for fixed
- 8:35but unknown
- 8:37numbers if we knew these values then we
- 8:40would know exactly what M looks like the
- 8:44first number here that doesn't multiply
- 8:45anything and that just shifts the
- 8:47regression curve is called The
- 8:52Intercept a number that multiplies a
- 8:56variable is called a slope coefficient
- 9:05in the context of linear regression
- 9:07model the observable variables on the
- 9:09right hand side that is dx2 and X3 are
- 9:13called the
- 9:14regressors slope coefficients multiply
- 9:17regressors to give an
- 9:20example maybe our M function looks like
- 9:28this
- 9:35here I've have retained the plus
- 9:38signs so that the pattern is
- 9:41apparent in practice obviously once we
- 9:44have negative coefficients we often
- 9:46don't explicitly write out the plus sign
- 9:51the negative sign here means that
- 9:53subpopulations with larger classes have
- 9:56on average lower test scores keeping
- 9:59everything else equal similarly
- 10:02subpopulations with a larger PD score
- 10:05that is a higher percentage of
- 10:06disadvantage students have on
- 10:09average a lower test score keeping all
- 10:12other variables
- 10:15equal of course if we knew the numerical
- 10:18values of the
- 10:19coefficients we would know exactly what
- 10:21the M function is and then it would be
- 10:24easy to figure out treatment
- 10:26effects we could figure out the
- 10:28treatment effects by plugging into this
- 10:30formula which is no big deal if we know
- 10:32what m
- 10:33is in practice the numerical value of
- 10:36these coefficients are unknown and we
- 10:38have to use data to figure them out it's
- 10:42very easy to compute the setus parabus
- 10:44causal effect for the linear
- 10:48model adapting our earlier formula the
- 10:52setus parabus treatment
- 10:56effect is given by the M function
- 10:59evaluated at Baseline treatment + one
- 11:04and confounders at Baseline
- 11:09level minus M function at Baseline
- 11:13treatment and Baseline confounder
- 11:19levels now let's plug in the linear
- 11:22parametric form that we assumed for
- 11:27m
- 11:31so this here is just the first part now
- 11:36for the second
- 11:44part let's
- 11:46subtract it's easy to see that the alpha
- 11:50cancels that the gamma time D
- 11:54cancels this will also cancel this will
- 11:57also cancel the only thing that we'll be
- 11:59left with is gamma *
- 12:041 gamma is obviously the slope
- 12:08coefficient of
- 12:12treatment and this shows us that slope
- 12:15coefficients immediately translate to
- 12:17treatment
- 12:19effects gamma is also called the
- 12:21marginal
- 12:24effect because it gives the additional
- 12:27effect of one more unit
- 12:32the notion of a marginal change is
- 12:34obviously related to differential
- 12:36calculus and indeed if we take the M
- 12:43function and we partially differentiate
- 12:46it with respect to
- 12:48D we will get exactly
- 12:52gamma our functional form assumption
- 12:56restricts the treatment effect in two
- 12:58important important ways our treatment
- 13:02effect is
- 13:06independent of the level of X2 and
- 13:15X3 and it's also independent of the
- 13:18Baseline treatment
- 13:22intensity we discuss this more in the
- 13:24future and we also discuss how we can
- 13:26relax these restrictions Within a linear
- 13:29regression
- 13:30model while the linear regression model
- 13:33is restrictive in some sense at this
- 13:35point it's not really clear what it
- 13:37biases remember we adapted the
- 13:39parametric assumption to help us use all
- 13:42of the sample instead of just a small
- 13:46subset of it how does the linear
- 13:49aggression model help with our
- 13:51identification
- 13:55problem consider the conditional mean
- 13:57function M as add Baseline confounder
- 14:02values but arbitrary treatment intensity
- 14:05lower case D we can depict how M changes
- 14:09as D varies in a two-way
- 14:14plot we put D on the
- 14:17x-axis and the conditional mean function
- 14:20on the y-
- 14:21AIS for every step that we take in D
- 14:26direction that is for every addition
- 14:28unit of treatment intensity or for every
- 14:31additional student in our class we
- 14:34change the conditional mean function by
- 14:38gamma let's use this example where gamma
- 14:41is
- 14:42negative this means that the condition
- 14:44mean function is downward
- 14:47sloping now consider our Baseline
- 14:50treatment of a class size of
- 14:5635 we can read of the value of the M
- 14:59function at 35 from this graph it's
- 15:01right
- 15:02here if we increase classroom size by
- 15:08one we decrease the M function by
- 15:12gamma gamma is the treatment effect that
- 15:14we want to
- 15:15learn from this picture it's clear that
- 15:18we can learn gamma by comparing
- 15:20classrooms of size 35 to classrooms of
- 15:24size
- 15:2636 this is what we did previously and
- 15:28previously this was also the only thing
- 15:30that we could
- 15:31do but now consider a classroom size of
- 15:34let's say
- 15:3625 increase classroom size by
- 15:40one this will decrease the M function by
- 15:43that's right
- 15:46gamma this means we can also learn gamma
- 15:50by comparing classrooms of size 25 and
- 15:5426 if you think carefully about it you
- 15:57realize that there are many other
- 15:58comparisons that we can make and that
- 16:00will allow us to learn
- 16:02gamma in fact all variation in treatment
- 16:05intensity is now useful for learning
- 16:09gamma all of this was of course with the
- 16:13axes fixed at the Baseline values we're
- 16:16still not using the whole
- 16:18sample the next step is realizing that
- 16:21if we fix these axes at any other values
- 16:24then we will draw a picture that looks
- 16:26very similar at least we will draw a
- 16:28curve with the same slope it may be
- 16:31shifted upwards or downwards but it will
- 16:35have the same
- 16:36slope and therefore we can use the same
- 16:39argument to again learn gamma even if we
- 16:43have different
- 16:44AES this will allow us to use the whole
- 16:47sample to learn
- 16:53gamma you may be wondering how do we do
- 16:56this exactly but that's a topic we look
- 16:58into into
- 17:01later so far we've looked at the linear
- 17:03regression model in the context of this
- 17:07specific treatment effect
- 17:09model but beyond that the linear
- 17:11regression model plays a very important
- 17:12role in econometrics and
- 17:15statistics for example the linear
- 17:17regression model is not only used for
- 17:19causal inference but also for making
- 17:21predictions and for forecasting economic
- 17:24variables let's briefly look at the
- 17:27general generic linear regression
- 17:34model in our example we were looking at
- 17:37M of dx2 and
- 17:42X3 and M was equal to the conditional
- 17:45expectation of Y where we average over a
- 17:49subpopulation and to determine the
- 17:51subpopulation we're looking at
- 17:53everyone's D X2 and X3 so in our example
- 18:00this was classroom size PD index and
- 18:03cohort
- 18:05size and you belong to the subpopulation
- 18:08that we are averaging over if your D is
- 18:11equal to this value and your X2 is equal
- 18:15to this
- 18:16value and so
- 18:19forth in our treatment application this
- 18:22link between the M function and the
- 18:25conditional expectation arose from the
- 18:27balance
- 18:28assumption here's the
- 18:31derivation in other regression contexts
- 18:34we may just Define the mm function to be
- 18:37equal to this conditional
- 18:40expectation under our parametric
- 18:42assumption this conditional expectation
- 18:45is
- 18:52linear in our treatment application it
- 18:55was very natural to split up our
- 18:56regressors into two groups groups a
- 18:59treatment
- 19:01variable and control variables in other
- 19:04regression contexts such a split is not
- 19:07natural and it makes more sense to just
- 19:08have one group of regressors in this
- 19:11case we wouldn't call this D but rather
- 19:15X1 to have perfect symmetry between all
- 19:17the
- 19:21regressors now the coefficients are
- 19:23still named asymmetrically let's fix
- 19:26this we just call the gamma beta
- 19:301 now the alpha is really sticking out
- 19:34let's rename the alpha to Beta
- 19:37KN this is the generic form of linear
- 19:40regression and we'll use it when we talk
- 19:42about properties that hold for all
- 19:45linear
- 19:46regressions as we've just seen you're
- 19:48free to change this notation and to
- 19:50adapt it to suit the needs of your
- 19:53specific application for example you can
- 19:56rename the coefficient as we've just
- 19:59done you can also rename the
- 20:02regresses here we've used simple symbols
- 20:05for the regressors which is great
- 20:08because it makes for a very compact
- 20:10notation but it also makes it very easy
- 20:12to forget what these regressors
- 20:15represent
- 20:17economically often we will use more
- 20:19descriptive variable
- 20:20names let me demonstrate this in the
- 20:23context of our example at the same time
- 20:25I'll also demonstrate how to write down
- 20:28a specific linear regression model that
- 20:30you are considering for your analysis on
- 20:33the left hand side we put the outcome
- 20:35variable y except maybe we don't want to
- 20:38call it why we want to explain what it
- 20:40is let's call it test
- 20:43score now we put the M function here but
- 20:48instead of writing M we plug in the
- 20:51linear form here beta KN plus beta 1 and
- 20:56now we put our X1 very variable in our
- 20:59case that was D but to make it easier to
- 21:02understand what d stands for let's write
- 21:04class
- 21:06size plus beta
- 21:082 and instead of X2 let's write PD
- 21:15index finally X3 is the cohort
- 21:19size lastly we put the error term let me
- 21:23make some room
- 21:26first now we can add the error
- 21:29term now we have Rewritten our model for
- 21:32test score
- 21:35production in standard notation for
- 21:37linear regression you're very likely to
- 21:40see a linear model like this one in a
- 21:42research paper by an empirical
- 21:44Economist here we have retained the
- 21:47standard naming convention for the
- 21:48coefficients we don't have to do that
- 21:51for example here maybe we want to call
- 21:53the slope coefficient on class size
- 21:55gamma just to make it more obvious that
- 21:57this the treatment effect that we want
- 21:59to
- 22:00estimate our linear regression model
- 22:02here describes how test scores are
- 22:04produced in the population that we are
- 22:07studying the beta coefficients are
- 22:10unknown values the next step in our
- 22:13journey will be to try to estimate these
- 22:15values from
- 22:18data but this is the topic for another
- 22:20video thanks for watching
About this transcript
This page contains the full transcript of Linear regression for economists: The linear model. by MetricsProf, generated from the public captions YouTube serves with the video. The transcript has 2,538 words across 437 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.