1
00:00:01,960 --> 00:00:03,370
- [Instructor] Good morning, everyone,
2
00:00:03,370 --> 00:00:05,770
or at least it's morning here.
3
00:00:05,770 --> 00:00:07,233
I hope you're doing well.
4
00:00:08,390 --> 00:00:11,173
Welcome to week two of Panel Data.
5
00:00:16,960 --> 00:00:18,160
As an overview,
6
00:00:18,160 --> 00:00:22,440
this whole section on panel
data last week and this week
7
00:00:22,440 --> 00:00:24,840
is how do you deal with data
8
00:00:24,840 --> 00:00:29,350
when you have multiple
subjects over multiple years?
9
00:00:29,350 --> 00:00:33,730
So both our N and our
T are greater than one.
10
00:00:33,730 --> 00:00:36,193
And last week, we did pooling,
11
00:00:37,390 --> 00:00:40,340
and we started to get into fixed effects.
12
00:00:40,340 --> 00:00:43,930
So now, we're gonna do
another kind of fixed effects
13
00:00:43,930 --> 00:00:46,603
as well as random effects.
14
00:00:49,130 --> 00:00:53,843
Again, as an overview,
we talked about pooling.
15
00:00:55,160 --> 00:00:58,800
This is where you have
different subjects each time,
16
00:00:58,800 --> 00:01:02,880
where you are drawing a
random sample each time,
17
00:01:02,880 --> 00:01:07,130
but asking the same questions.
18
00:01:07,130 --> 00:01:11,410
And we noted how we often
include dummy variables
19
00:01:11,410 --> 00:01:14,120
for things like years.
20
00:01:14,120 --> 00:01:17,360
And if they're sort of
a treatment and control,
21
00:01:17,360 --> 00:01:20,310
like the difference-in-difference models,
22
00:01:20,310 --> 00:01:24,493
we have a dummy variable for
that, and we interact them.
23
00:01:25,550 --> 00:01:30,550
And in this, we don't know
how an individual's responses
24
00:01:32,910 --> 00:01:34,400
might change over time
25
00:01:34,400 --> 00:01:36,810
because the sample changes every time
26
00:01:36,810 --> 00:01:40,550
we have a random sample.
27
00:01:40,550 --> 00:01:44,730
So someone who's in the
sample in period two
28
00:01:44,730 --> 00:01:47,673
may not be in one or three, et cetera.
29
00:01:49,000 --> 00:01:51,740
In the fixed effects model,
30
00:01:51,740 --> 00:01:53,920
we are assuming that we are tracking
31
00:01:53,920 --> 00:01:56,540
the same people over time.
32
00:01:56,540 --> 00:01:58,490
And so we assume
33
00:01:58,490 --> 00:02:03,380
that there is this ai
sort of dummy variable
34
00:02:03,380 --> 00:02:05,740
that doesn't change over time.
35
00:02:05,740 --> 00:02:09,150
Again, that we interpret
as what makes you you,
36
00:02:09,150 --> 00:02:12,550
what makes me me, what
makes Burlington Burlington.
37
00:02:12,550 --> 00:02:15,640
And that it's highly
correlated with the regressor,
38
00:02:15,640 --> 00:02:17,853
so if we don't do something about it,
39
00:02:19,130 --> 00:02:21,923
like last time, we subtracted it away,
40
00:02:23,010 --> 00:02:28,010
it will cause bias in
all of our estimators.
41
00:02:35,610 --> 00:02:39,950
Last time, we learned about pooled data,
42
00:02:39,950 --> 00:02:43,280
where since we're drawing
a new sample each time,
43
00:02:43,280 --> 00:02:44,340
we don't have to worry
44
00:02:44,340 --> 00:02:49,340
about either the AI or
auto-correlated errors.
45
00:02:49,900 --> 00:02:52,300
And we also learned about
46
00:02:52,300 --> 00:02:56,840
how you can difference one
time period from another,
47
00:02:59,270 --> 00:03:04,270
so take all of my Ys and my Xs,
48
00:03:05,720 --> 00:03:10,720
and subtract my period two
Y minus my period one Y.
49
00:03:14,430 --> 00:03:19,153
So subtract my period one X2 and my...
50
00:03:23,000 --> 00:03:24,290
Sorry.
51
00:03:24,290 --> 00:03:29,290
Subtract my X1 from time two,
52
00:03:29,850 --> 00:03:34,850
minus my X1 from time one, and et cetera.
53
00:03:35,200 --> 00:03:37,040
That's what we did last time.
54
00:03:37,040 --> 00:03:39,650
Now, we're gonna learn
about two other things
55
00:03:39,650 --> 00:03:44,650
that we can do, another
transformation for fixed effects,
56
00:03:44,720 --> 00:03:48,193
and then dealing with
so-called random effects.
57
00:03:50,630 --> 00:03:54,480
So first, let's take the fixed effects,
58
00:03:54,480 --> 00:03:58,420
where, assume we only have one regressor,
59
00:03:58,420 --> 00:04:01,640
and we have an equation
that looks like this,
60
00:04:01,640 --> 00:04:06,023
this Y equals it equals beta
one X1t plus ai plus uit.
61
00:04:07,430 --> 00:04:12,430
Here, we take the mean of
every individual's observation
62
00:04:14,600 --> 00:04:16,970
of Y and X.
63
00:04:16,970 --> 00:04:21,090
So thinking back to the
city market example,
64
00:04:21,090 --> 00:04:25,820
taking my mean local food expenditure,
65
00:04:25,820 --> 00:04:30,820
my mean income, and my
mean household size,
66
00:04:33,080 --> 00:04:37,270
and subtracting it from
each of my observations
67
00:04:37,270 --> 00:04:38,450
from each time.
68
00:04:38,450 --> 00:04:41,520
So we take the Y bar i,
69
00:04:41,520 --> 00:04:44,380
so the Y bar for each individual,
70
00:04:44,380 --> 00:04:47,030
the X bar for each individual,
71
00:04:47,030 --> 00:04:49,860
and the mean error term
for each individual,
72
00:04:49,860 --> 00:04:54,270
and subtract it from the observation.
73
00:04:54,270 --> 00:04:57,023
So if you have two observations,
74
00:04:58,380 --> 00:05:01,240
that is two times for each individual,
75
00:05:01,240 --> 00:05:05,670
you subtract the time one observation
76
00:05:05,670 --> 00:05:10,670
and subtract the mean of that person,
77
00:05:10,690 --> 00:05:12,730
and take the time two observation
78
00:05:12,730 --> 00:05:15,920
and subtract the mean of that person.
79
00:05:15,920 --> 00:05:18,163
Same with the Xs.
80
00:05:19,900 --> 00:05:24,000
With the k regressor, we
do much the same thing.
81
00:05:24,000 --> 00:05:26,350
We take each individual,
82
00:05:26,350 --> 00:05:31,350
and take the mean of their
Y, their X1, dot dot dot,
83
00:05:31,890 --> 00:05:36,890
their Xk to get the yi bar,
the x bars, and the u bars.
84
00:05:39,520 --> 00:05:44,397
And we subtract each of
these from the observation.
85
00:05:45,870 --> 00:05:50,190
We take the observation of
an individual on one time
86
00:05:50,190 --> 00:05:54,970
and subtract the mean
of all the observations
87
00:05:54,970 --> 00:05:56,563
for that individual.
88
00:06:00,130 --> 00:06:05,130
So we have these funky Y
umlaut and that weird X thing
89
00:06:05,540 --> 00:06:07,730
and the U umlaut
90
00:06:07,730 --> 00:06:11,000
because I didn't really
know how else to do it.
91
00:06:11,000 --> 00:06:14,360
So this weird Y umlaut it
92
00:06:14,360 --> 00:06:16,950
is what we actually use in the regression,
93
00:06:16,950 --> 00:06:21,640
where we have the real observation Y
94
00:06:21,640 --> 00:06:24,170
that they actually said in time t,
95
00:06:24,170 --> 00:06:28,400
and subtract their mean observation of Y
96
00:06:28,400 --> 00:06:30,680
over the observations.
97
00:06:30,680 --> 00:06:34,003
Same for each value of X.
98
00:06:34,910 --> 00:06:39,290
Take the observation of each X,
99
00:06:39,290 --> 00:06:44,290
so that's k being regressor k,
i, individual i, and time t,
100
00:06:46,690 --> 00:06:51,420
and subtract the mean
of each one of those.
101
00:06:51,420 --> 00:06:55,130
And the same for the error term.
102
00:06:55,130 --> 00:06:57,570
When we do that, the degrees of freedom
103
00:06:57,570 --> 00:07:02,100
are NT minus N minus k.
104
00:07:02,100 --> 00:07:06,770
And note that any predictor
that is constant over time
105
00:07:06,770 --> 00:07:08,080
is lost.
106
00:07:08,080 --> 00:07:11,480
So a gender dummy variable,
107
00:07:11,480 --> 00:07:14,610
if the person's gender doesn't change,
108
00:07:14,610 --> 00:07:19,080
the elevation of a city,
the area of a city,
109
00:07:19,080 --> 00:07:22,360
their race, things like
that that don't change,
110
00:07:22,360 --> 00:07:24,923
we will lose all of that information.
111
00:07:31,160 --> 00:07:35,600
Two big consideration with this
kind of fixed effects model
112
00:07:35,600 --> 00:07:40,600
is that we need homoscedasticity
and no serial correlations.
113
00:07:41,010 --> 00:07:44,700
You will need to do tests
for homoscedasticity
114
00:07:44,700 --> 00:07:47,573
and also for serial correlation,
115
00:07:49,997 --> 00:07:52,210
which we'll learn about later.
116
00:07:52,210 --> 00:07:56,990
And the degrees of freedom
is NT minus N minus k.
117
00:07:56,990 --> 00:08:00,670
So note that if this was pooled data,
118
00:08:00,670 --> 00:08:04,870
the degrees of freedom is NT minus k.
119
00:08:04,870 --> 00:08:09,870
But by time demeaning, we
lose N degrees of freedom.
120
00:08:15,920 --> 00:08:20,920
So I wanna say a little bit
more about this variable ai.
121
00:08:22,360 --> 00:08:26,730
So it can be estimated.
122
00:08:26,730 --> 00:08:29,380
And really, as I said before,
123
00:08:29,380 --> 00:08:31,220
a good way of thinking about it
124
00:08:31,220 --> 00:08:35,680
is it's a dummy variable
for every observation.
125
00:08:35,680 --> 00:08:37,990
It is that which makes you you.
126
00:08:37,990 --> 00:08:42,350
It's just I get my own dummy variable
127
00:08:42,350 --> 00:08:44,920
that controls for who I am,
128
00:08:44,920 --> 00:08:47,863
and you get one for you, et cetera.
129
00:08:49,160 --> 00:08:53,170
Note that in a single time period,
130
00:08:53,170 --> 00:08:57,160
so going back to cross
section, you couldn't do this
131
00:08:57,160 --> 00:09:01,340
because there would be N plus k variables
132
00:09:01,340 --> 00:09:03,530
and only N observations.
133
00:09:03,530 --> 00:09:08,530
So you could not solve
this with econometrics.
134
00:09:11,590 --> 00:09:15,100
There's more unknowns than equations.
135
00:09:15,100 --> 00:09:17,483
And you'd have negative
degrees of freedom.
136
00:09:18,330 --> 00:09:21,870
You can actually compute this ai.
137
00:09:21,870 --> 00:09:26,400
And the way that you would do it
138
00:09:26,400 --> 00:09:31,400
is to take the mean of every
individual's observation.
139
00:09:32,950 --> 00:09:36,693
So take the yi bar, so,
say, my observations,
140
00:09:39,380 --> 00:09:43,107
the mean of them, over
all the time periods
141
00:09:44,710 --> 00:09:48,453
for my Y, my X1, and my Xk.
142
00:09:49,500 --> 00:09:54,500
And then multiply them by
their betas and subtract.
143
00:09:55,260 --> 00:09:58,023
So you can see the formula here,
144
00:10:00,517 --> 00:10:05,373
that ai is just yi bar
minus beta one x1i bar,
145
00:10:08,470 --> 00:10:11,083
minus dot dot dot, minus beta k Xki.
146
00:10:14,120 --> 00:10:18,477
And that would yield sort of the intercept
147
00:10:21,770 --> 00:10:25,853
or the dummy variable for each individual.
148
00:10:28,470 --> 00:10:30,273
And we'll need that soon.
149
00:10:32,220 --> 00:10:33,800
So thinking about...
150
00:10:33,800 --> 00:10:38,800
We've looked at, first,
differencing versus time demeaning,
151
00:10:40,410 --> 00:10:44,620
which we'll call FD for differencings,
152
00:10:46,107 --> 00:10:49,007
and this demeaning is more
generally called fixed effects.
153
00:10:52,380 --> 00:10:56,700
So what drives which model that you use?
154
00:10:56,700 --> 00:11:01,700
So if T equals two, if
you have only two times,
155
00:11:02,060 --> 00:11:05,960
they are identical, and
what we're gonna do in SPSS
156
00:11:05,960 --> 00:11:08,003
is show that that is true.
157
00:11:08,850 --> 00:11:11,210
If you have greater than three,
158
00:11:11,210 --> 00:11:14,670
then you have a decision to make.
159
00:11:14,670 --> 00:11:18,070
Both of them are unbiased and consistent
160
00:11:18,070 --> 00:11:20,230
under the same assumptions,
161
00:11:20,230 --> 00:11:25,230
as long as all the assumptions
that we had before are true,
162
00:11:26,370 --> 00:11:31,370
the classic linear regression assumptions
163
00:11:33,720 --> 00:11:37,110
that we dealt with back
in the beginning of class.
164
00:11:37,110 --> 00:11:40,340
So as long as those are
true, it's unbiased.
165
00:11:40,340 --> 00:11:41,960
And in many ways,
166
00:11:41,960 --> 00:11:45,820
it depends on the degree
of serial correlation.
167
00:11:45,820 --> 00:11:50,820
If there's none, if there
is no serial correlation,
168
00:11:53,250 --> 00:11:55,990
this implies demeaning is more efficient,
169
00:11:55,990 --> 00:11:59,148
because you have one more observation.
170
00:11:59,148 --> 00:12:02,213
And if you remember in first differencing
171
00:12:03,080 --> 00:12:08,080
that you lose an observation
every time that you subtract.
172
00:12:10,160 --> 00:12:13,450
If you have three time periods,
173
00:12:13,450 --> 00:12:15,370
since you're doing time three minus two
174
00:12:15,370 --> 00:12:18,590
and time two minus one,
175
00:12:18,590 --> 00:12:21,670
you go from three observations to two.
176
00:12:21,670 --> 00:12:25,580
So as long as there is
no serial correlation,
177
00:12:25,580 --> 00:12:29,460
demeaning, this fixed effects
model we learned this time,
178
00:12:29,460 --> 00:12:30,800
is more efficient.
179
00:12:30,800 --> 00:12:35,113
However, serial correlation,
180
00:12:36,760 --> 00:12:40,400
much like heteroscedasticity,
181
00:12:40,400 --> 00:12:43,150
causes a loss in efficiency.
182
00:12:43,150 --> 00:12:47,140
And if it's large, if
it's a significant issue,
183
00:12:47,140 --> 00:12:51,220
then it's best to do the
first differencing model
184
00:12:51,220 --> 00:12:54,920
to eliminate this serial correlation,
185
00:12:54,920 --> 00:12:57,493
and that would be the
most efficient model.
186
00:12:58,970 --> 00:13:03,440
In general, when T is
large and N is small,
187
00:13:03,440 --> 00:13:06,940
so you have a small
number of observation N
188
00:13:06,940 --> 00:13:09,630
and a large number of T,
189
00:13:09,630 --> 00:13:13,450
it starts to look more
like a time series model,
190
00:13:13,450 --> 00:13:17,720
and so, at first, differencing is better.
191
00:13:17,720 --> 00:13:19,523
And as I say in bold here,
192
00:13:20,410 --> 00:13:24,423
and I've said this many
times in many circumstances,
193
00:13:25,500 --> 00:13:30,500
often the best approach is
to do both, look at both,
194
00:13:31,000 --> 00:13:36,000
report both, and discuss why
and how they are not the same.
195
00:13:38,270 --> 00:13:42,580
Sometimes you have unbalanced panels,
196
00:13:42,580 --> 00:13:46,740
that is, you don't have observations
197
00:13:46,740 --> 00:13:50,370
for every time period
for every individual.
198
00:13:50,370 --> 00:13:54,823
So for example, our fictitious
city market example,
199
00:13:55,680 --> 00:14:00,600
someone might have taken the
survey in 2012, but moved away.
200
00:14:00,600 --> 00:14:05,030
Someone might've moved in
that wasn't here in 2012
201
00:14:05,030 --> 00:14:09,200
and taken it in 2017.
202
00:14:09,200 --> 00:14:13,550
So when you have all
observations over all persons,
203
00:14:13,550 --> 00:14:14,690
that's a balanced.
204
00:14:14,690 --> 00:14:17,030
If you don't, it's unbalanced.
205
00:14:17,030 --> 00:14:18,240
So it's important to ask,
206
00:14:18,240 --> 00:14:23,240
why are some of the observations missing?
207
00:14:23,680 --> 00:14:24,810
For two reasons.
208
00:14:24,810 --> 00:14:29,810
One, certainly, any observation
with only one time period
209
00:14:31,210 --> 00:14:35,460
is lost under both of these
techniques that we lose.
210
00:14:35,460 --> 00:14:40,460
Under fixed effects, the mean
of a one-time observation,
211
00:14:42,980 --> 00:14:45,280
and it subtracts to zero.
212
00:14:45,280 --> 00:14:47,770
And in first differencing,
213
00:14:47,770 --> 00:14:51,343
there isn't anything to
subtract, so you lose it all.
214
00:14:52,770 --> 00:14:57,670
It's also important to think
about why they dropped out.
215
00:14:57,670 --> 00:14:59,820
And if there's a reason
216
00:14:59,820 --> 00:15:03,890
that is correlated with the regressors
217
00:15:03,890 --> 00:15:05,730
and with the error term,
218
00:15:05,730 --> 00:15:08,473
then bias may occur.
219
00:15:14,080 --> 00:15:18,000
So so far, we have
looked at fixed effects,
220
00:15:18,000 --> 00:15:21,200
where we assumed that our ai
221
00:15:21,200 --> 00:15:26,200
was going to be highly
correlated with our regressors,
222
00:15:27,230 --> 00:15:32,220
and to omit it, to not do
anything, results in bias.
223
00:15:32,220 --> 00:15:37,133
Now, we're starting with
the same model as before,
224
00:15:39,460 --> 00:15:43,670
where we have N individual and T times,
225
00:15:43,670 --> 00:15:48,583
and the Yit and everything
is much the same as before.
226
00:15:49,970 --> 00:15:54,970
But now, we're assuming
that this ai is uncorrelated
227
00:15:56,200 --> 00:16:00,900
with the error term, or rather,
that this ai is uncorrelated
228
00:16:00,900 --> 00:16:05,030
with any of the Xs at any time.
229
00:16:05,030 --> 00:16:09,820
So even if we don't account for it
230
00:16:09,820 --> 00:16:13,230
since it appears in the error term,
231
00:16:13,230 --> 00:16:17,190
if it's not correlated
with the regressors,
232
00:16:17,190 --> 00:16:18,383
it doesn't matter.
233
00:16:19,240 --> 00:16:20,830
There's no bias.
234
00:16:20,830 --> 00:16:25,830
And by using one of the two
techniques that we learned,
235
00:16:27,690 --> 00:16:30,780
differencing or demeaning,
236
00:16:30,780 --> 00:16:34,280
this fixed effects or
first differencing models,
237
00:16:34,280 --> 00:16:36,270
we lose information.
238
00:16:36,270 --> 00:16:41,270
And therefore, it results in
a less efficient estimator.
239
00:16:45,960 --> 00:16:48,170
And as we'll see in a few minutes,
240
00:16:48,170 --> 00:16:51,550
this is another time when
we're really balancing
241
00:16:51,550 --> 00:16:56,243
and doing a trade-off of
bias versus efficiency.
242
00:16:58,820 --> 00:17:03,820
So if we're using this
random effects model,
243
00:17:04,890 --> 00:17:09,840
it is essential that the ai and the Xits
244
00:17:09,840 --> 00:17:12,410
are all uncorrelated,
245
00:17:12,410 --> 00:17:15,620
that their covariance equal zero.
246
00:17:15,620 --> 00:17:20,220
Now, why is this? There's
two related reasons.
247
00:17:21,510 --> 00:17:25,310
Really, it's two ways of
saying the same thing.
248
00:17:25,310 --> 00:17:27,640
First, that we have controlled
249
00:17:27,640 --> 00:17:31,780
for quote, "everything,"
unquote, through the Xs,
250
00:17:31,780 --> 00:17:36,780
that we did such an amazing
job of choosing the Xs
251
00:17:36,870 --> 00:17:40,120
that there isn't anything left
252
00:17:40,120 --> 00:17:43,480
in the individual variability.
253
00:17:43,480 --> 00:17:47,010
And that the ai is negligibly small.
254
00:17:47,010 --> 00:17:49,070
And again, those are sort of two ways
255
00:17:49,070 --> 00:17:50,513
of saying the same thing.
256
00:17:52,580 --> 00:17:57,580
If this is true, pooled
OLS, fixed effects,
257
00:17:58,320 --> 00:18:02,630
and first differencing are all unbiased,
258
00:18:02,630 --> 00:18:04,293
but they are not efficient.
259
00:18:05,170 --> 00:18:10,040
And then, as a result,
260
00:18:10,040 --> 00:18:12,570
we can use this random effects
261
00:18:12,570 --> 00:18:17,570
to maybe add a little bit of bias
262
00:18:17,640 --> 00:18:20,893
to gain a whole lot of efficiency.
263
00:18:26,090 --> 00:18:29,000
The way we run this model,
264
00:18:29,000 --> 00:18:33,290
we get an error term that
includes both the ai,
265
00:18:33,290 --> 00:18:36,490
the sort of dummy variable
for each individual
266
00:18:36,490 --> 00:18:40,470
that's not measurable, and the uit,
267
00:18:40,470 --> 00:18:43,330
the regular kind of error term
268
00:18:43,330 --> 00:18:45,360
that we've been dealing with all along,
269
00:18:45,360 --> 00:18:49,550
the spin-the-bingo-ball error term.
270
00:18:49,550 --> 00:18:54,503
Note that these errors, the vit,
271
00:18:56,250 --> 00:19:01,250
that they will be very highly
correlated across individuals
272
00:19:03,500 --> 00:19:07,950
because they have ai in them each time.
273
00:19:07,950 --> 00:19:12,950
And much like we dealt
with heteroscedasticity
274
00:19:13,150 --> 00:19:15,130
with a form of FGLS,
275
00:19:15,130 --> 00:19:18,990
random effects is in
itself a form of FGLS,
276
00:19:18,990 --> 00:19:23,990
FGLS, F-G-L-S, feasible
generalized least squares.
277
00:19:24,400 --> 00:19:29,400
So we calculate a new
factor called lambda.
278
00:19:32,940 --> 00:19:37,940
And we define lambda, as you
can see here in the slides,
279
00:19:38,900 --> 00:19:40,160
the numerator...
280
00:19:40,160 --> 00:19:43,690
So it's one minus this big thing.
281
00:19:43,690 --> 00:19:46,713
And this big thing is
raised to the 1/2 power,
282
00:19:48,190 --> 00:19:49,890
so we take its square root.
283
00:19:49,890 --> 00:19:54,890
And the thing in the square
brackets in the numerator
284
00:19:55,500 --> 00:20:00,500
is the variance of the regular error term.
285
00:20:01,760 --> 00:20:06,760
In the denominator is
the sum of the variance
286
00:20:07,470 --> 00:20:11,880
of the regular error term u,
287
00:20:11,880 --> 00:20:16,880
plus T, the number of
time periods in the study,
288
00:20:18,090 --> 00:20:22,617
times the variance of
the a term, the ai term.
289
00:20:25,010 --> 00:20:26,630
So we take all that,
290
00:20:26,630 --> 00:20:31,630
and we make this new
variable called lambda.
291
00:20:34,280 --> 00:20:39,200
Lambda is always between zero and one.
292
00:20:39,200 --> 00:20:44,200
And then we use the lambda
to weigh the mean values
293
00:20:48,000 --> 00:20:50,470
that we used in fixed effects.
294
00:20:50,470 --> 00:20:53,480
So we weight them, these mean values.
295
00:20:53,480 --> 00:20:57,110
So now, instead of subtracting out
296
00:20:57,110 --> 00:20:59,510
the full value of the mean,
297
00:20:59,510 --> 00:21:03,193
we subtract out part of
the value of the mean.
298
00:21:04,420 --> 00:21:08,980
And we call this quasi-demeaned data.
299
00:21:08,980 --> 00:21:12,470
In the fixed effects
model, we use demeaned,
300
00:21:12,470 --> 00:21:16,520
so we subtracted the mean
from each observation.
301
00:21:16,520 --> 00:21:21,083
Now, we're subtracting part of the mean.
302
00:21:23,560 --> 00:21:26,060
So this is what it looks like.
303
00:21:26,060 --> 00:21:31,060
So we are multiplying
each of our mean values
304
00:21:33,450 --> 00:21:38,450
for each individual, each
of these y bar, x bars,
305
00:21:39,990 --> 00:21:42,433
by this factor lambda.
306
00:21:44,720 --> 00:21:49,720
And basically, instead
of in fixed effects,
307
00:21:50,120 --> 00:21:53,030
where we subtract out the whole value
308
00:21:53,030 --> 00:21:57,930
of the individual's mean, we're
just doing a portion of it.
309
00:21:57,930 --> 00:22:02,930
And it depends on the values of a, u,
310
00:22:03,440 --> 00:22:07,310
and the number of time periods, T.
311
00:22:07,310 --> 00:22:12,050
And here again is what lambda is equal to.
312
00:22:12,050 --> 00:22:17,050
And you could see that it's
a function of u, T, and a,
313
00:22:17,670 --> 00:22:22,670
the variance of u, T time periods,
314
00:22:23,270 --> 00:22:28,183
and the variance of a,
this individual dummy term.
315
00:22:33,410 --> 00:22:38,410
So you can use pooled OLS
and fixed effect models
316
00:22:38,420 --> 00:22:40,880
to calculate the as and the us,
317
00:22:43,870 --> 00:22:47,510
take their variance, which
you could do in SPSS,
318
00:22:47,510 --> 00:22:50,160
and then use that to calculate
319
00:22:53,140 --> 00:22:55,570
an estimate of sigma, sigma hat.
320
00:22:55,570 --> 00:23:00,570
So we use sigma hat to get
the estimate of this sigma...
321
00:23:02,860 --> 00:23:05,470
Or this lambda hat. I'm sorry.
322
00:23:05,470 --> 00:23:10,470
So we get this lambda hat
using pooled and fixed effects.
323
00:23:10,680 --> 00:23:15,450
And there is a full formula for
this in the Wooldridge book.
324
00:23:15,450 --> 00:23:18,540
And there's also a YouTube video here
325
00:23:19,390 --> 00:23:21,523
that lets you see how it's done.
326
00:23:24,240 --> 00:23:25,740
But I wanna dwell more
327
00:23:25,740 --> 00:23:28,950
on conceptually what this all means.
328
00:23:28,950 --> 00:23:33,190
So again, I think if you're
going to use random effects,
329
00:23:33,190 --> 00:23:35,770
this would be another case
330
00:23:35,770 --> 00:23:39,720
where you would talk to
your advisor, talk to me,
331
00:23:39,720 --> 00:23:41,433
and we'll walk you through it.
332
00:23:43,550 --> 00:23:47,050
Especially in SPSS, it takes a lot of math
333
00:23:47,050 --> 00:23:49,434
and a lot of probably
switching between Excel-
334
00:23:49,434 --> 00:23:53,351
(crackling drowns out speaker)
335
00:23:56,730 --> 00:24:00,130
I would advise you that if
you're going to do this,
336
00:24:00,130 --> 00:24:03,027
to see your advisor and me,
337
00:24:03,027 --> 00:24:05,580
and I'm not going to expect you
338
00:24:05,580 --> 00:24:10,560
to be able to do the actual calculations.
339
00:24:10,560 --> 00:24:15,560
But I do wanna think about what
it looks like conceptually.
340
00:24:16,750 --> 00:24:21,750
So here's the formula again for lambda.
341
00:24:23,180 --> 00:24:28,180
So if lambda equals one, it's
the same as fixed effects.
342
00:24:29,730 --> 00:24:34,440
We are subtracting the
full value of the mean
343
00:24:34,440 --> 00:24:38,010
from every person's observation.
344
00:24:38,010 --> 00:24:42,500
If lambda equals zero, it's
the same as pooled OLS.
345
00:24:42,500 --> 00:24:47,500
We do not subtract anything
from anybody's observation.
346
00:24:47,990 --> 00:24:49,590
And what drives this?
347
00:24:49,590 --> 00:24:54,590
So if a varies a lot, if
sigma squared a is large,
348
00:24:55,380 --> 00:24:57,790
it means that a is important,
349
00:24:57,790 --> 00:25:02,790
a lends a lot of information to the model.
350
00:25:03,370 --> 00:25:07,493
And in this case, when a is large,
351
00:25:08,550 --> 00:25:12,000
sigma squared a is large, a as important
352
00:25:12,000 --> 00:25:15,690
that lambda will approach one,
353
00:25:15,690 --> 00:25:18,360
and it becomes more like fixed effects.
354
00:25:18,360 --> 00:25:21,570
Hopefully, this makes intuitive sense,
355
00:25:21,570 --> 00:25:26,570
that if a is important,
it's going to cause bias,
356
00:25:26,650 --> 00:25:30,233
and we want to remove it
through the fixed effects model.
357
00:25:31,840 --> 00:25:36,840
As T gets large, lambda
also approaches one,
358
00:25:38,650 --> 00:25:41,863
and it is also more like fixed effects.
359
00:25:42,880 --> 00:25:46,060
But if a is not important,
360
00:25:46,060 --> 00:25:51,060
if it does not lend a lot
of information to the model,
361
00:25:51,450 --> 00:25:55,590
then leaving it in really does not cause
362
00:25:55,590 --> 00:25:57,520
a great deal of bias.
363
00:25:57,520 --> 00:26:00,310
Our lambda approaches zero,
364
00:26:00,310 --> 00:26:04,280
and it becomes more
like a pooled OLS model.
365
00:26:04,280 --> 00:26:06,750
So I would spend some time with this
366
00:26:06,750 --> 00:26:09,933
and make sure that what
I said makes sense.
367
00:26:12,921 --> 00:26:17,921
Because really, it
depends on the values of T
368
00:26:18,250 --> 00:26:20,950
and of this sigma squared a.
369
00:26:20,950 --> 00:26:24,793
And make sure that it makes
sense of what I'm saying here.
370
00:26:28,470 --> 00:26:33,470
So again, in random effects,
371
00:26:34,060 --> 00:26:39,060
we weigh a by one minus lambda.
372
00:26:43,030 --> 00:26:46,660
If lambda goes to one,
373
00:26:46,660 --> 00:26:51,660
then the bias caused by putting
the error term goes to zero,
374
00:26:54,760 --> 00:26:59,200
and there's little
error in random effects.
375
00:26:59,200 --> 00:27:02,640
And we use a fixed effects model that...
376
00:27:06,380 --> 00:27:08,680
And if lambda is zero,
377
00:27:08,680 --> 00:27:12,100
a lot of our a stays in the error term.
378
00:27:12,100 --> 00:27:16,303
It becomes more biased, and
it's more like our pooled model.
379
00:27:19,310 --> 00:27:23,570
As is always the case, or
almost always the case,
380
00:27:23,570 --> 00:27:24,650
do all three.
381
00:27:24,650 --> 00:27:29,270
When it's pooled, all of
a is in the error term.
382
00:27:29,270 --> 00:27:33,190
When it's random effects, part
of it is in the error term.
383
00:27:33,190 --> 00:27:35,710
And of course, there is a test
384
00:27:35,710 --> 00:27:40,670
which allows you to measure
which one is better,
385
00:27:40,670 --> 00:27:43,730
how much of the random
effects or fixed effects
386
00:27:43,730 --> 00:27:44,813
should we use.
387
00:27:47,240 --> 00:27:49,657
Short way of saying it,
388
00:27:49,657 --> 00:27:52,680
I'm going to call it the Hausman test.
389
00:27:52,680 --> 00:27:55,520
It's also known as the
Durbin-Wu-Hausman test.
390
00:27:55,520 --> 00:27:57,540
And I don't know how Hausman
391
00:27:57,540 --> 00:28:00,310
jumped to the top of the line here,
392
00:28:00,310 --> 00:28:05,310
but for now, we're gonna
call it the Hausman test.
393
00:28:06,060 --> 00:28:09,230
You might also encounter it in other books
394
00:28:09,230 --> 00:28:11,643
as the Durbin-Wu-Hausman test.
395
00:28:13,870 --> 00:28:18,450
So recall that if the covariance...
396
00:28:19,860 --> 00:28:23,130
Again, here is the formula
for this Hausman test,
397
00:28:23,130 --> 00:28:25,920
and this tests that W.
398
00:28:25,920 --> 00:28:29,470
So if the null is true...
399
00:28:29,470 --> 00:28:34,470
Our null is that the covariance
of our a and our regressors
400
00:28:36,390 --> 00:28:38,590
equals zero.
401
00:28:38,590 --> 00:28:43,237
If this is true, the
numerator will be very small.
402
00:28:44,190 --> 00:28:47,020
There won't be a whole lot of bias
403
00:28:47,020 --> 00:28:49,940
between the random effects, which we know
404
00:28:49,940 --> 00:28:52,960
may have a little bit of
bias or a lot of bias,
405
00:28:52,960 --> 00:28:56,260
and the fixed effects,
which we know has no bias.
406
00:28:56,260 --> 00:29:01,260
So if the null is true,
the denominator is small,
407
00:29:02,550 --> 00:29:05,190
a very small bias.
408
00:29:05,190 --> 00:29:07,083
If the null is true,
409
00:29:09,061 --> 00:29:12,810
the denominator will see a big difference,
410
00:29:14,200 --> 00:29:19,070
that the change in variance
411
00:29:19,070 --> 00:29:24,070
from going to random
effects to fixed effects
412
00:29:25,150 --> 00:29:29,350
that you're putting in
a lot more information
413
00:29:29,350 --> 00:29:31,280
in the random effects,
414
00:29:31,280 --> 00:29:34,700
it's going to make a smaller variance.
415
00:29:34,700 --> 00:29:39,700
And if this number is large,
416
00:29:41,280 --> 00:29:46,280
then the overall value of this W is small
417
00:29:47,690 --> 00:29:49,820
if the null is true.
418
00:29:49,820 --> 00:29:53,810
So just like every other test stat,
419
00:29:53,810 --> 00:29:57,170
when we have a small test stat,
420
00:29:57,170 --> 00:30:00,083
you tend to fail to reject the null.
421
00:30:03,110 --> 00:30:06,680
You accept that the null is true.
422
00:30:06,680 --> 00:30:10,650
When we have a very large test stat,
423
00:30:10,650 --> 00:30:14,390
we will reject the null, just
like every other test stat.
424
00:30:14,390 --> 00:30:16,370
We reject the null
425
00:30:16,370 --> 00:30:20,690
that the covariance of a and
the regressors equal zero,
426
00:30:20,690 --> 00:30:25,690
and we use fixed effects
to take away the bias,
427
00:30:25,870 --> 00:30:30,870
even at the cost of a loss of efficiency.
428
00:30:32,510 --> 00:30:34,500
So that's the last slide.
429
00:30:34,500 --> 00:30:38,930
I hope that this is going well for you,
430
00:30:38,930 --> 00:30:43,420
and we can discuss it
on Wednesday in class.
431
00:30:43,420 --> 00:30:44,793
Have a great day, everyone.