1 00:00:00,420 --> 00:00:05,100 [Instructor] Hello, and welcome to the SPS exercise 2 00:00:05,100 --> 00:00:10,100 for panel data two for CDAE 359 Applied Econometrics. 3 00:00:11,580 --> 00:00:16,115 So I did a bunch of the data transformation already. 4 00:00:16,115 --> 00:00:18,423 What I'm going to show you, 5 00:00:19,570 --> 00:00:21,773 and I made this claim in class 6 00:00:21,773 --> 00:00:24,940 is that when you only have two time periods 7 00:00:26,294 --> 00:00:30,270 that the fixed effects time demeaning 8 00:00:30,270 --> 00:00:35,270 and the first differencing data transformations 9 00:00:38,400 --> 00:00:40,770 give us the same betas. 10 00:00:40,770 --> 00:00:45,770 So you can see that this is data from 64 cities on rent, 11 00:00:47,550 --> 00:00:52,470 and it looks at rent, which is our y 12 00:00:52,470 --> 00:00:57,470 as a function of population of the average income, 13 00:00:59,520 --> 00:01:01,050 the log of average income 14 00:01:01,050 --> 00:01:05,149 and the percentage of student population. 15 00:01:05,149 --> 00:01:09,150 And there are 64 cities. 16 00:01:09,150 --> 00:01:11,580 And it looks at, 17 00:01:11,580 --> 00:01:15,410 well, what is the effect of these three regressors on rent? 18 00:01:15,410 --> 00:01:20,410 And it has data from 1980 and 1990. 19 00:01:21,420 --> 00:01:26,420 And so the first thing I did was to transform the data. 20 00:01:27,480 --> 00:01:32,480 And I actually did this in Excel and then copy pasted. 21 00:01:32,580 --> 00:01:36,930 So it shows it here as one and zeros 22 00:01:36,930 --> 00:01:41,280 because it's such a small number, 23 00:01:41,280 --> 00:01:44,400 but basically for each city. 24 00:01:44,400 --> 00:01:49,080 So you can see that it's arranged here, 25 00:01:49,080 --> 00:01:53,640 cities one all the way down year, year, year, year. 26 00:01:53,640 --> 00:01:56,370 And for each of these, I just subtracted. 27 00:01:56,370 --> 00:02:00,723 So this is the change in the log of population, 28 00:02:05,847 --> 00:02:10,110 subtracting zero from 1990, 29 00:02:10,110 --> 00:02:11,670 from 1980 same way. 30 00:02:11,670 --> 00:02:15,813 But this is our dependent and et cetera. 31 00:02:16,830 --> 00:02:18,730 And in a minute, I will show you 32 00:02:20,970 --> 00:02:24,120 how I transformed the data for fixed effects. 33 00:02:24,120 --> 00:02:26,400 But this was the data transformation. 34 00:02:26,400 --> 00:02:30,660 And this C in front of it here means that it's the change. 35 00:02:30,660 --> 00:02:34,710 So it's the 1990 value minus the 1980 value 36 00:02:34,710 --> 00:02:37,740 for each of these cities. 37 00:02:37,740 --> 00:02:42,497 So let's run a regression, and it's a little linear. 38 00:02:43,590 --> 00:02:48,590 And our dependent is the change in the log of rent. 39 00:02:51,300 --> 00:02:53,260 Just wanna make, go back to the sheet 40 00:02:54,644 --> 00:02:55,477 and make sure that I'm doing this. 41 00:02:55,477 --> 00:03:00,380 Clpop, Cl average income and C percentage student. 42 00:03:02,790 --> 00:03:07,233 So clpop, boom, cl average income 43 00:03:10,112 --> 00:03:12,720 and change in percentage student 44 00:03:12,720 --> 00:03:17,187 Nope, we do not put our dummy variable for 1990 here. 45 00:03:18,720 --> 00:03:20,920 That kind of wouldn't make sense to 46 00:03:26,760 --> 00:03:30,660 because it's only gonna, it would be, 47 00:03:30,660 --> 00:03:35,400 since we subtract out, it would be a, 48 00:03:35,400 --> 00:03:39,510 it would be one or zero for every row. 49 00:03:39,510 --> 00:03:42,240 And that would be a, 50 00:03:42,240 --> 00:03:44,820 you can't have a constant as a regressor 51 00:03:44,820 --> 00:03:49,020 because it is perfectly colinear with the intercept. 52 00:03:49,020 --> 00:03:53,250 So let's just run this now. 53 00:03:53,250 --> 00:03:57,120 Boom, and here are the results. 54 00:03:57,120 --> 00:03:59,610 And I want you to look at the beta. 55 00:03:59,610 --> 00:04:03,813 So there's two things significant here. 56 00:04:06,092 --> 00:04:09,183 Or three, actually, sorry. 57 00:04:10,350 --> 00:04:14,850 The only one that's not is the change in population, 58 00:04:14,850 --> 00:04:18,210 but both the average income 59 00:04:18,210 --> 00:04:23,210 and the percentage of students has a positive sign, 60 00:04:24,600 --> 00:04:25,953 and is significant. 61 00:04:26,787 --> 00:04:28,087 So what what that means is 62 00:04:29,148 --> 00:04:34,148 as the average income changes in a given city, 63 00:04:34,620 --> 00:04:38,760 and as that the percentage of students changes 64 00:04:38,760 --> 00:04:42,733 in a given city that results in on average 65 00:04:45,540 --> 00:04:49,533 a change in the average rent in that same city. 66 00:04:50,370 --> 00:04:55,370 So let's look at the other way to look at it. 67 00:04:57,810 --> 00:05:00,600 Now, I'll make this small. 68 00:05:00,600 --> 00:05:03,840 And the other thing I did was did a fixed effects. 69 00:05:03,840 --> 00:05:06,840 So here I'm putting, 70 00:05:06,840 --> 00:05:11,520 I took the mean here, and I just subtracted it. 71 00:05:11,520 --> 00:05:14,730 So fixed effects, L rent, 72 00:05:14,730 --> 00:05:19,730 fixed effects Log of population, 73 00:05:21,330 --> 00:05:22,770 fixed effects average income 74 00:05:22,770 --> 00:05:25,290 and fixed effects percentage mean. 75 00:05:25,290 --> 00:05:27,540 Note this pattern here, 76 00:05:27,540 --> 00:05:31,390 and this would make sense that in a given city 77 00:05:32,932 --> 00:05:37,932 that these will just be the same number in opposite sign. 78 00:05:39,300 --> 00:05:43,950 So it's the mean would be halfway in between these two. 79 00:05:43,950 --> 00:05:48,950 So since there's only two, this is minus 2.8 under the mean. 80 00:05:51,690 --> 00:05:54,780 And then in year, the second year, 81 00:05:54,780 --> 00:05:58,080 it's that same amount over. 82 00:05:58,080 --> 00:06:00,780 You can see this pattern 83 00:06:00,780 --> 00:06:05,040 for all of the fixed effects data transformation. 84 00:06:05,040 --> 00:06:05,873 And that makes sense. 85 00:06:05,873 --> 00:06:08,440 I hope it makes sense that it would be that way 86 00:06:09,547 --> 00:06:13,263 for this T plus two. 87 00:06:14,640 --> 00:06:18,603 So let's do a regression again. 88 00:06:19,740 --> 00:06:24,740 And we do, again a simple linear regression. 89 00:06:25,290 --> 00:06:26,703 We can reset it. 90 00:06:28,190 --> 00:06:33,190 And now it is, our dependent is this fixed effects, 91 00:06:36,428 --> 00:06:40,773 L rent as a function of fixed effects. 92 00:06:41,640 --> 00:06:44,790 L pop, fixed effects. 93 00:06:44,790 --> 00:06:48,330 Log average income, fixed effects, 94 00:06:48,330 --> 00:06:49,800 percentage student, 95 00:06:49,800 --> 00:06:53,220 and to control for the year 96 00:06:53,220 --> 00:06:56,580 because there's one observation per year, 97 00:06:56,580 --> 00:06:59,460 and it makes sense to include it, 98 00:06:59,460 --> 00:07:03,540 we include the dummy variable for year 90, 99 00:07:03,540 --> 00:07:07,050 which is one, if it's a 1990 observation. 100 00:07:07,050 --> 00:07:11,880 Zero, if it's a 1980, and then we hit okay, 101 00:07:12,840 --> 00:07:17,840 and we look at the betas and note that they're the same. 102 00:07:21,068 --> 00:07:26,068 Let's go up and see and note that these betas 103 00:07:30,150 --> 00:07:35,150 for pop average income and percentage students are the same. 104 00:07:37,200 --> 00:07:41,477 And note that now the year in the 90 is now 105 00:07:46,929 --> 00:07:50,490 the constant. 106 00:07:50,490 --> 00:07:52,080 That's the same figure. 107 00:07:52,080 --> 00:07:56,130 But the key here is that these three betas are the same. 108 00:07:56,130 --> 00:08:01,130 And the point of this is to show again, when T equals two, 109 00:08:01,230 --> 00:08:04,470 it doesn't matter if you first difference 110 00:08:04,470 --> 00:08:09,300 or time demean fixed effects. 111 00:08:09,300 --> 00:08:13,590 It doesn't matter which data transformation that you use. 112 00:08:13,590 --> 00:08:17,433 The betas are the same. 113 00:08:18,900 --> 00:08:21,030 So thank you for watching. 114 00:08:21,030 --> 00:08:21,863 Bye.