Fixed Effects in Stata

  Рет қаралды 212,169

SebastianWaiEcon

SebastianWaiEcon

Күн бұрын

Пікірлер: 158
@Maxwolf58
@Maxwolf58 4 жыл бұрын
Thank you Sebastian, very smart, short and clear lecture. In a few minutes you make me understand what i didn’t in years. 😂
@michaelvendredi8274
@michaelvendredi8274 5 жыл бұрын
This video was so nice! Taught me all I struggled to learn in class during 2 hours in 13.40 minutes
@mrbinhesam
@mrbinhesam 4 жыл бұрын
Your video was the best ever. you have made a summary of 2 chapters in 13 minutes. so useful and I do appreciate it.
@sabrinagasmi8874
@sabrinagasmi8874 3 жыл бұрын
your explanations are very clear although I'm a French student I needed this course cause i am working on panel data for my thesis thanks a lot Sir
@svenjao.7309
@svenjao.7309 Ай бұрын
thank you, finally understood how it works exactly
@dserankers9092
@dserankers9092 5 ай бұрын
thanks man i was struggling from many hour this video was a life saver for Me.
@HajarSudin
@HajarSudin 3 ай бұрын
hi. i need help
@NGHVEVO
@NGHVEVO 6 жыл бұрын
The video is greatly appreciated, I would just like to emphasize on the fact that the change is only in the variability of our U. We see a boost in R^2 because we're using this new regression model >> Y = B(0) + B(1)*X(i) + F(i) + u >> Naturally since now we have the new expression F(i) the variability is reduced because in our old model we had Y = B(0) + B(1)*X(i) + u without the F(i) and now the U of the original model equals = u (original) + a customized mistake margin for each group which is F(i). So naturally because now U is smaller than the U before since we added this custom mistake for each group, it will cover more of the variability of the model.
@HxCPokemonMaster
@HxCPokemonMaster 5 жыл бұрын
Thank you so much for these videos! They have been invaluable in helping me study for my econometrics exam.
@Thejohnster1012
@Thejohnster1012 3 жыл бұрын
best video I have ever seen on the topic, and I have seen quite a few. thank you!
@tosinolofinsao5404
@tosinolofinsao5404 3 жыл бұрын
Wow! So insightful. You saved my project, thanks.
@TheDancingPhysicist
@TheDancingPhysicist 4 жыл бұрын
Could you please come teach STATA to us public health kids?? This is so great, thank you!!!!!
@jackieq1897
@jackieq1897 5 жыл бұрын
Thanks for the video. Your explanations are really clear.
@nitinbean1
@nitinbean1 6 жыл бұрын
Thanks!! It is a really great and clear explanation of fixed effects.
@miguelangelcastro1547
@miguelangelcastro1547 4 жыл бұрын
Awesome! So clear and practical. Thanks!
@simplensober
@simplensober 4 жыл бұрын
Excellent video, very useful indeed
@AN-yr7nm
@AN-yr7nm 4 жыл бұрын
Man this is gold!
@lucasmelotti5466
@lucasmelotti5466 3 жыл бұрын
Tmj irmão, salvou aqui em micro4 familia!!!
@JorgeAF
@JorgeAF 3 жыл бұрын
Why do we use reg command with FD instead of xtreg (as it is done with FE)? Thank you
@sebastianwaiecon
@sebastianwaiecon 3 жыл бұрын
If you use FD, you have differenced out the fixed effects, so xtreg is unnecessary. They are two different methods to accomplish the same goal.
@arthurbarbosa1437
@arthurbarbosa1437 5 жыл бұрын
Thank you for this video. It's really help me.
@ludovicadefranchis8285
@ludovicadefranchis8285 2 жыл бұрын
Thank you so much for your clear explanation. I have a question regarding the coefficient of the year dummy variable. How do you interpret the coefficient? What does the coefficient of the year tell you regarding the impact on the dependent variable? Thank you in advance!
@sebastianwaiecon
@sebastianwaiecon 2 жыл бұрын
If it's positive, the dependent variable tends to be higher in that year, compared with the base year. If it's negative, the dependent variable tends to be lower in that year, compared with the base year. All while holding the other variables constant, as we always do.
@subhalakshmipaul4816
@subhalakshmipaul4816 6 жыл бұрын
It's really helpful.. thank you for your information...
@minimoni5179
@minimoni5179 3 жыл бұрын
hey, thank you for the video. Would you please explain me briefly industry fixed effect ? what should I do exactly ? Thank you.
@dulcenairaandredulce6908
@dulcenairaandredulce6908 2 ай бұрын
Hello, i would like to know if its necessary to use vce(robust) when using within estimator, i mean xtreg...fe, vce(robust)
@ibrar2kt
@ibrar2kt 9 ай бұрын
Thanks. Please can you show. What should be the minimum observation required FOR DID
@sebastianwaiecon
@sebastianwaiecon 7 ай бұрын
Bare minimum, 4 observations to make the math work, but otherwise no minimum. More observations will provide more statistical power. See my video on difference in differences estimation.
@Chris-di8nq
@Chris-di8nq 3 жыл бұрын
Great video, many thanks! Two questions: 1) The manually implemented within estimator has a different t-statistic than the others. It may be worth mentioning that these reported t-statistics are wrong. In his panel-data-book (2010, p. 306), Wooldridge explains that one has to correct this by multiplying with the factor ((NT-K)/(N(T-1)-K))^1/2. I tried it, and the corrected t-stat I get in "reg" is very similar but not exactly the one that "xtreg" shows. Is this factor affected by survey-design (weights, clusters, strata) or by having an unbalanced panel, and if so, do you know or have a reference on how to adjust for that to get the correct t-stats? 2) It seems one can do the easy manual implementation of the within estimation with any estimation method, e.g. sureg, reg3, gmm,... (this most probably excludes probit, tobit and other non-linear models, for which FE is often not applicable anyways). This just by using demeaned versions of the variable and correcting the reported t-statistics with the abovementioned factor. Is that so?
@sebastianwaiecon
@sebastianwaiecon 3 жыл бұрын
I mainly show the "manual" implementation for pedagogical purposes. I think it's important to see what's going on behind the scenes when using the commands. The method I used assumes you have a balanced panel. Of course, it's possible to redesign the method to fit an unbalanced panel, but it gets more complex. I haven't done it with other estimation methods, so can't really comment on that.
@stanislavmartsenyuk
@stanislavmartsenyuk 7 жыл бұрын
Great job. Actually, same data can be analyzed in with xtmixed, where id's can be considered as random effects.
@masaru444
@masaru444 4 жыл бұрын
Hey Sebastian, awesome video! Thank you so much. Now I understand the method itself but can you please please explain the coefficients? I don't know how to interpret "unemp" which is 2,218 after the fixed effects method. So what does only one number mean for so many cities? What is the interpretation here? Also from before (which was 0,4265).
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
This means that if unemployment goes up by 1 percentage point, we expect 2.218 more crimes per 1000 people in the city. This is an effect "on average." Not saying it would be 2.218 in every case, but that would be the expectation.
@tantruongkhanh1312
@tantruongkhanh1312 Жыл бұрын
tHANK YOU, how can i use to data in lecture Sir ? Thank you
@FELIX-qr6vd
@FELIX-qr6vd 6 ай бұрын
Hi, when I try to perform panel regression using fixed effect on STATA with dummy variables, STATA "Omit" my variable in the result. It shows "omitted". How can I avoid that?
@Blakeblade-zd7tt
@Blakeblade-zd7tt 3 жыл бұрын
can anyone explain me whats the importance of year fixed effect? why we need it and what we find by using it?
@pratikshyasilwal2081
@pratikshyasilwal2081 2 жыл бұрын
How can we interpret the values for sigma_u and sigma_e and rho?
@TÔMTIÊNYÊN
@TÔMTIÊNYÊN Жыл бұрын
thank you for you great video, if we have more than one independent variables, do we also gen all independent variable star by subtract the original value and the mean value and calculate the regression ?
@sebastianwaiecon
@sebastianwaiecon Жыл бұрын
Yes, you would do that. In most cases, though, I recommend just using the xtreg command to get it done.
@jenli0426
@jenli0426 4 жыл бұрын
Hi, thank you for the video! May I know how do I create year-month * country fixed effect? My year-month variable is in '2010Jan' form, and i try to create by adding i.country*yearmonth, and no observation is produced. Thank you for your time!
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
See this article: www.stata.com/features/overview/factor-variables/
@nadiatsehaie5901
@nadiatsehaie5901 5 жыл бұрын
in the command xtset you use d87 as the time-variable. This is a dummy since the measurements in this dataset are taken at two time-points. But what is you have several time-points in which the data is collected (e.g. if a variable "survey_year" includes 2008 till 2015)?
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
Use i.survey_year to include temporary time dummies in your regression.
@bethuelange3513
@bethuelange3513 2 жыл бұрын
So I have more than two time periods. How exactly did you construct this t variable? I’m sorry but you did not clarify this at all
@MOTU2308
@MOTU2308 2 жыл бұрын
One doubt. If we have a cross sectional data and there are around 6000 dummies for each village fixed effects. I ran it on STATA and the computation has been taking hours with many observations bring dropped with a note of prediction of failure correctly. What needs to be done in that case?
@sebastianwaiecon
@sebastianwaiecon 2 жыл бұрын
You can't do fixed effects with cross sectional data. This is for panel data.
@akmalsultanov8217
@akmalsultanov8217 4 жыл бұрын
Thank you for the video. Quick question: If I'm using DID model do I run FE for all the regression models or just the base model?
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
I would recommend taking a look at my diff-in-diff video.
@Dr_Shiny
@Dr_Shiny 4 жыл бұрын
For a student its very complex dataset, you could have used a proper panel data with a proper number of i and proper time period. You didn't use XT to make data panel. Could we use Fixed effect model in regress??
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
I show how to use xtset at 8:12. The purpose of the video is to show what the within estimator actually does before simply showing the xtreg command. By manipulating the data properly, you can do all of it just with the basic regress command.
@Dr_Shiny
@Dr_Shiny 4 жыл бұрын
SebastianWaiEcon OK sir. Thank you
@aiboudaziz8318
@aiboudaziz8318 3 жыл бұрын
first of all, thanks for this interesting tutorial. I want your help please, what is the command in stata used to estimate the fixed effect model with SUR option to control for cross-section dependance.
@sebastianwaiecon
@sebastianwaiecon 3 жыл бұрын
Consider looking into the sureg command.
@andreab2114
@andreab2114 5 жыл бұрын
Very helpful! What if my indep variables are a lot more than 2, let's say 15? Do i have to use the within estimator method with all the independent variables? I ask because you did it only with the dependent and the main independent variable.
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
You need to de-mean all variables, not just the main one of interest (other than the time dummies, as explained in the video). If you have a lot of variables, I would recommend using xtreg so you don't have to do it all yourself.
@brucelee7782
@brucelee7782 5 жыл бұрын
Aren't you supposed to put option robust (, r) behind all your regressions?? Putting robust will affect your R squared value.
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
Heteroscedasticity-robust standard errors do not affect the R squared. While they are not the focus of this video, I do have a video on how they are calculated. While I usually do recommend using them, it's important to understand why you are doing what you are doing.
@christianfink398
@christianfink398 3 жыл бұрын
Hello, everytime I get the error repeated time values within panel. How can I fix this?
@joepdekort5696
@joepdekort5696 Жыл бұрын
Hey, this is super helpfull. I understand that you can use fixed effects for cities. But say I have a datasets with yearly data on travel between cities, how can I add fixed effects for these city pairs?, say like you want to fix for distance between 2 cities, or if there is an airport in both cities, how can I do this. Greatly appreciate if someone could help!
@sebastianwaiecon
@sebastianwaiecon Жыл бұрын
Basically the same idea as this example. You need to create a unique identifier for each city pair. For example, you could make a new variable where you concatenate the two city names together. Then use encode on that identifier (see my video on categorical data).
@ianosuka6193
@ianosuka6193 Жыл бұрын
Where can I find this dataset to follow through
@poojasrivastava1513
@poojasrivastava1513 4 жыл бұрын
How to check whether we need to add period dummies Or just period as variable
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
If you think there is a linear time trend, you could use the period as a variable. Otherwise, you would want dummies.
@zdavirandimuhammad1515
@zdavirandimuhammad1515 2 жыл бұрын
hi sebastian. thank you again for your very brief and excels explanation. i already download the data. however, the original dataset that available did not contain id variable to identify the city like you said. in this case or perhaps i face another same problem in the future, with what command to generate id variable based on the city? thank you. much bless to you
@sebastianwaiecon
@sebastianwaiecon 2 жыл бұрын
I created the ID variable based on the "area" variable, since that is unique to each city but doesn't change over time.
@zdavirandimuhammad1515
@zdavirandimuhammad1515 2 жыл бұрын
@@sebastianwaiecon hi thank you again. with what command exactly? i mean sometimes people using it just by "gen NewVarName=_n", but it wouldnt work due in this case the data appeared twice. can you write with what command? thank you
@elpibededios
@elpibededios 3 жыл бұрын
Hi! thanks for the video. I do have a doubt cause in this case it was a two-year variable. I am working now with a several year variable. How can I run the within transformation model with multiple years? would that change? Thankyou so much!
@sebastianwaiecon
@sebastianwaiecon 3 жыл бұрын
Select a base year and include dummy variables for all the other years. You can use the i. structure to get that done.
@sebasgiraldomusica
@sebasgiraldomusica 2 жыл бұрын
Hey! I've got a question regarding the program. I know xtset is similar to tsset. Do you any difference between them both?
@sebasgiraldomusica
@sebasgiraldomusica 2 жыл бұрын
Thanks in advance and thanks for the video!
@fplopperborg
@fplopperborg 5 жыл бұрын
I am trying to run the regression, whenever I include time dummy it ommits it due to collinearity. I am using a repeated cross section which I have got the mean of a survey response for regions in two time periods and regressing this against a continuous dependent variable
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
A common mistake is having a dummy for both time periods. You should only have one for the second period. If that's not the case, then you may have made a mistake creating your time dummy.
@edysaleh5006
@edysaleh5006 5 жыл бұрын
hi..i wanna ask, can we use fixed effect model for categorical data?..for example,one of my explanatory variable, educational level (0=no attending school, 1=up to elemantary school,..4=up to higher) . In 2000, the educational level of one people is "1", and in 2010, the educational level of the same people is "4"
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
Yes. See my video on categorical variables for how to use them: kzbin.info/www/bejne/h3-apmCQd62kn8U
@kingsleygyan810
@kingsleygyan810 4 жыл бұрын
Please can I apply same to my RE model, if my Hausman test results allows me to pick RE model... I wanna eliminate heteroskedasticity
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
I don't typically use RE models, so I can't comment on that specifically. However, you can use heteroscedasticity robust standard errors with FE. See my video on robust standard errors for details.
@ashishstat
@ashishstat 4 жыл бұрын
Hi can you make video on binary logistic and multinomial regression on fixed effect using panel data with some categorical independent variables with one IV has 2 levels (e.g gender having levels male and female) and other IV has more than 2 levels (e.g smoking status: past smoker, current smoker and no smoker where current and past smokers are mutually exclusive). Thanks for nice videos
@yiankan6484
@yiankan6484 5 жыл бұрын
Thanks so much! A quick Q: Instead of doing reg for dummy variables, is there a STATA command for xtreg that also illustrates the dummies in the regression table?
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
If you want to see all the dummies you do need to use "reg" instead of "xtreg."
@yiankan6484
@yiankan6484 5 жыл бұрын
@@sebastianwaiecon Okay thanks. With "xtreg", I was planning to use robust model, meaning including .vce. Now with normal "reg" and dummies, how should I get robust SE ? With "newey" ?
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
Just "robust" will get it done.
@ernestfrimpongasamoah665
@ernestfrimpongasamoah665 6 жыл бұрын
Thank you
@drakegustavo1158
@drakegustavo1158 3 жыл бұрын
Can someone help me on stata i need write my thesis? Pls it is very urgent. I get statistically insignificant results after fixed regression analysis. What do i need to do?
@hw2810
@hw2810 4 жыл бұрын
Hi, how are you able to use d87 as the time variable without getting the error message "repeated time values within panel"? Thanks!
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
It sounds like you may have used tsset instead of xtset after you loaded your data.
@teddykim430
@teddykim430 5 жыл бұрын
Hello, If I am trying to use the fixed effect model to estimate the relationship between Per Capita Income of U.S. (Dependent Variable) and # of higher education degrees earned / total university patent granted as my independent variables; would this model work? I am only interested in United States alone.
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
What is your unit of observation? Each observation in panel data needs a cross-sectional unit (state or city perhaps?) and time (year, probably?). If you only have U.S. aggregated data, then you have a time series, not a panel. I have a video on that, as well.
@Ejango2024
@Ejango2024 5 жыл бұрын
Nice video. How to construct a t variable that goes 1,2,3,4.. for multiple years?
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
My time series video has a way to do this, but with panel it's a bit more involved. I assume you already have a year variable that goes something like 2001, 2002, 2003, etc. If doing time dummies, you don't need a t variable. You can just do i.year to create temporary dummies.
@Ejango2024
@Ejango2024 5 жыл бұрын
SebastianWaiEcon thanks I got it.
@smacbot
@smacbot Жыл бұрын
How do you do this when you have datat from every year from 1960 - 2020?
@sebastianwaiecon
@sebastianwaiecon Жыл бұрын
Take a look at my video on categorical data. You need to include a dummy variable for each year (other than the base year).
@smacbot
@smacbot Жыл бұрын
@@sebastianwaiecon Thanks, will do :)
@smacbot
@smacbot Жыл бұрын
@@sebastianwaiecon Hi again. Does this sound right to you? I changed my 'years' variable from int to str, then turned it into a category. I then input 'reg oldage_pmp Welfare_regime_type i.YEAR'. If this is right, year will now be controlled for while the variance caused by the other IV is measured, and then the impact of each separate year on the DV will be measured as well? Thank you for your response :)
@hrishigiridhar964
@hrishigiridhar964 4 жыл бұрын
Thank you so much for your videos. I was wondering if this method is correct if I have cross-sectional data and not panel data? i.e I want to control for unobserved heterogeneity across cities. Can I use the dummy variable (by including a dummy for each city) / within estimator method?
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
If you have multiple observations per city, you can use dummy variables for each city. If you only have one observation per city, you can't.
@hrishigiridhar964
@hrishigiridhar964 4 жыл бұрын
​@@sebastianwaiecon Thank you very much! Yes I have multiple observations per city (as in, each city is divided into a number of different geographical tracts). Therefore, I end up having say 5 observations for each city (at 5 different tracts within the city). Is this still possible/does it make sense to now add city dummies?
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
There is nothing theoretically preventing doing so.
@Thejohnster1012
@Thejohnster1012 3 жыл бұрын
are the degrees of freedom different if it is implemented via dummy variables versus demeaned values? would really appreciate an answer.
@sebastianwaiecon
@sebastianwaiecon 3 жыл бұрын
No, degrees of freedom should be the same. You can see at 9:40 when I use xtreg, the F stat shows 44 degrees of freedom, which is the same as the dummy variable version. If you do the within estimator manually, you have to be careful and still subtract for what would have been the dummies.
@Thejohnster1012
@Thejohnster1012 3 жыл бұрын
@@sebastianwaiecon Thank you so much for the response, it is very helpful. Just one thing I do not understand is where the degrees of freedom are lost when doing the demeaned model, as the means of the variables already exist we are just calculating them? Whereas of course with the dummy variable model we are introducing new variables. Of course the time demeaned versions of variables are new variables themselves but since they could be written as (xbar_i minus x_it) I do not see why this has an impact. Thanks again, love the videos they've been a huge help. :)
@sebastianwaiecon
@sebastianwaiecon 3 жыл бұрын
Even though you don't have the actual dummies in there, you are still accounting for the same number of fixed effects. Since the regression results are mathematically identical, the degrees of freedom must also be the same.
@Thejohnster1012
@Thejohnster1012 3 жыл бұрын
@@sebastianwaiecon ahah I'm still not sure I quite get it but I suppose that does make sense. Thanks a lot :)
@aliciariolino1228
@aliciariolino1228 4 жыл бұрын
Hi Sebastian, any insight on how to demean the data for year and city fixed effects?
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
This is done in the video starting at about 4:00.
@aliciariolino1228
@aliciariolino1228 4 жыл бұрын
I have a dataset with 5 years. As far as I can tell you're demeaning for the city FE, but controlling for year with the time dummy. What if I want to remove the year FE for more than one time period as well as the FE for the city?
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
I've never heard of that being done. I messed around with it a bit, and I don't think you can eliminate dummies for both.
@erdberrchen
@erdberrchen 6 жыл бұрын
Thanks. BTW how do you implement a diff-in-diff analysis with panel data in STATA?
@sebastianwaiecon
@sebastianwaiecon 6 жыл бұрын
I will be doing a video on that soon.
@thomasbauer3742
@thomasbauer3742 5 жыл бұрын
@@sebastianwaiecon is the video already available? I did not find it on KZbin
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
@@thomasbauer3742 kzbin.info/www/bejne/gWHHo3mCr9d8aas
@damir2go
@damir2go 2 жыл бұрын
How do we run a fixed effetcs model with 10 years?
@sebastianwaiecon
@sebastianwaiecon 2 жыл бұрын
You need dummy variables for years. Look for my video on categorical data for help.
@damir2go
@damir2go 2 жыл бұрын
@@sebastianwaiecon thank you a lot.
@junbeombahk3668
@junbeombahk3668 2 жыл бұрын
when you use xtset id d87 and run the model with. ,fe. at the very end, is that using time and id fixed effects? or is it just the id?..
@sebastianwaiecon
@sebastianwaiecon 2 жыл бұрын
Both. The time fixed effect is included using the d87 dummy variable.
@junbeombahk3668
@junbeombahk3668 2 жыл бұрын
@@sebastianwaiecon Thanks for your reply! So what you mean is that when we use xtset, that will only detect the cross section differences as the fixed effect right? If we want to use an additional fixed effect with time, then we have to include a dummy.
@sebastianwaiecon
@sebastianwaiecon 2 жыл бұрын
That is correct.
6 жыл бұрын
Hi! great video! Could you do a video for multidimensional panel with random effects?
@sebastianwaiecon
@sebastianwaiecon 6 жыл бұрын
No plans to do that at the moment, but the xtreg documentation should have what you need.
@mohammedhassen2558
@mohammedhassen2558 2 жыл бұрын
Could you attach the data to exercise please
@sebastianwaiecon
@sebastianwaiecon 2 жыл бұрын
The dataset is crime2.dta from the Wooldridge textbook. It can be found many places online. See the pinned comment for more details.
@love4thegame877
@love4thegame877 5 жыл бұрын
Yo man I am testing synchronicity as a dep Var and have dummy as a ind var. The problem is that it gets ommited, even though thats the main variable I want to examine? Do you know what I should do know? Thanks alot
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
Could be that what is happening is that your dummy variable doesn't change over time, so it's getting differenced out by the fixed effects. It could also be you made a mistake creating the variable. Hard to give any more specific advice than that.
@love4thegame877
@love4thegame877 5 жыл бұрын
@@sebastianwaiecon thanks a lot for the help :)
@raaksharammohun6279
@raaksharammohun6279 5 жыл бұрын
i'm doing a fixed effect in Stata with time series data but I'm not able to do it. Do you know what's the problem?
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
You can't do fixed effects with time series data, since there is only one cross-sectional unit. You may want to look at my video on time series data.
@raaksharammohun6279
@raaksharammohun6279 5 жыл бұрын
@@sebastianwaiecon Thank you. I'll surely watch. Can you suggest me some models that I can use for my regression analysis? I collected data for a single country for over a period of 10 years.
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
The basic options are discussed in the video. FDL, first differencing, and detrending are good places to start. That being said, a lot of people find pure time series somewhat unconvincing compared to panel. You might consider looking at multiple countries, if that's possible.
@albertpetros5373
@albertpetros5373 2 жыл бұрын
Clear
@savannahxie9972
@savannahxie9972 5 жыл бұрын
Thank you so much! could someone please tell me where I can find and download the data that you used for example if I want to practice it?
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
The dataset is the CRIME2 dataset that comes with Introductory Econometrics by Wooldridge. You can find these datasets fairly easily with a Google search. I added the city ID variable myself.
@savannahxie9972
@savannahxie9972 5 жыл бұрын
@@sebastianwaiecon thank you!
@HavenAWilliams
@HavenAWilliams 3 жыл бұрын
@@sebastianwaiecon Can you send us the download for your edited dataset?
@Jaja1499
@Jaja1499 4 жыл бұрын
Hey! Thanks for the video. What exactly are time dummies? How do I create those in stata? i.year?
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
Time dummies are variables with values 0 or 1, indicating observations occurred in a given time period. See my video on categorical data for how dummies generally work. The i.year structure is the typical way to do it.
@Jaja1499
@Jaja1499 4 жыл бұрын
@@sebastianwaiecon Perfect, thanks a lot! If might ask one more question: I have panel data for which I want to analyse the correlation between firm performance and CEO turnover (60 firms and 6 years). So far, I've used xtreg with fe and it worked out fine. Now, the data set also includes a categorical variable indicating which region each firm is located in and there is also a variable for company size (both time-invariant). I would like to find out how the region and firmsize moderate the performance turnover relationship. Is there a model where I can include those 2 variables or should I rather conduct different regressions for different sub samples (e.g. one for small firms and one for big firms)? Thank you in advance, much appreciated!
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
@@Jaja1499 FE will always wipe out any time-invariant variables, but it wouldn't do that for interaction terms with other variables. There might be some specialized models one could also use, but I haven't done that before.
@Jaja1499
@Jaja1499 4 жыл бұрын
@@sebastianwaiecon Thank you
@hlumisaxakaza3481
@hlumisaxakaza3481 4 жыл бұрын
@@sebastianwaiecon in a case where you have more than two years, say you have 5 years time period. is creating a dummy still applicable, seeing that you only assign either a 0 or a 1?.... how would you have generated you d87 if time periods were more than two years?
@andrepbatista1
@andrepbatista1 5 жыл бұрын
Hi! I have a question about STATA. In panel data modeling with fixed effects, I would like to know how to change what STATA controls (time or object). Thank you very much in advance.
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
You want to use the xtset command. I show this at about 8:10.
@andrepbatista1
@andrepbatista1 5 жыл бұрын
@@sebastianwaiecon Thanks for answering. But I need to know how to choose between isolating time or isolating the object. That's what I still do not understand...
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
@@andrepbatista1 Sorry, I don't understand the question, then.
@andrepbatista1
@andrepbatista1 5 жыл бұрын
@@sebastianwaiecon So what is the default that Stata uses to run fixed effects: isolating time or isolating object? Is it possible to choose this in any configuration?
@sebastianwaiecon
@sebastianwaiecon 5 жыл бұрын
@@andrepbatista1 If I'm understanding you, you're asking about which fixed effects are used with the fe option? It's always cross-sectional units fixed effects. To get time effects, you need to add dummy variables for each time period. I'm not aware of a way to change that.
@GamingWithRicky97
@GamingWithRicky97 4 жыл бұрын
12:!6 u said u were missing the first variable yes i get it but why u miss the all the rest 45?
@sebastianwaiecon
@sebastianwaiecon 4 жыл бұрын
You miss the first period observation for every cross-sectional unit. There are 46 cities in the data.
@manuellourenco4479
@manuellourenco4479 Жыл бұрын
if i could kiss you i would. haha really, thank you so much, you helped a lot!
@isurusenevirathne
@isurusenevirathne Жыл бұрын
where can I download the data set
@sebastianwaiecon
@sebastianwaiecon Жыл бұрын
Dataset is CRIME2.dta from the Wooldridge book. You can get them many places online.
@isurusenevirathne
@isurusenevirathne Жыл бұрын
@@sebastianwaiecon can you help me to find excel data set from internet
@99evan76
@99evan76 3 жыл бұрын
5:07 within group estimator
@HajarSudin
@HajarSudin 3 ай бұрын
i need help
@xiaoguangli4744
@xiaoguangli4744 6 жыл бұрын
it is too complicate for beginner.
@Cepheus5959
@Cepheus5959 2 жыл бұрын
poor quality
Binary Choice Models in Stata (LPM, Logit, and Probit)
12:50
SebastianWaiEcon
Рет қаралды 43 М.
Офицер, я всё объясню
01:00
История одного вокалиста
Рет қаралды 6 МЛН
哈哈大家为了进去也是想尽办法!#火影忍者 #佐助 #家庭
00:33
Fixed effects in panel data
14:44
Nathan Wozny
Рет қаралды 129 М.
Treatment effects in Stata: Difference in differences (DID)
10:11
StataCorp LLC
Рет қаралды 1,9 М.
Panel Data and Fixed Effects in R
13:05
SebastianWaiEcon
Рет қаралды 70 М.
Panel Data. Fixed and Random Effect. Model One. STATA
31:06
Sayed Hossain
Рет қаралды 165 М.
Categorical Variables in Stata
7:56
SebastianWaiEcon
Рет қаралды 137 М.
Econometrics - Within Variation and Fixed Effects
20:06
Econometrics, Causality, and Coding with Dr. HK
Рет қаралды 15 М.
Fixed and random effects with Tom Reader
8:09
University of Nottingham
Рет қаралды 192 М.
Tables in Stata with estout
11:40
SebastianWaiEcon
Рет қаралды 128 М.
Офицер, я всё объясню
01:00
История одного вокалиста
Рет қаралды 6 МЛН