Fixed Effects in Stata

Sdílet
Vložit
  • čas přidán 4. 09. 2024

Komentáře • 158

  • @Maxwolf58
    @Maxwolf58 Před 4 lety +26

    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 Před 4 lety +10

    This video was so nice! Taught me all I struggled to learn in class during 2 hours in 13.40 minutes

  • @mrbinhesam
    @mrbinhesam Před 4 lety +2

    Your video was the best ever. you have made a summary of 2 chapters in 13 minutes. so useful and I do appreciate it.

  • @dserankers9092
    @dserankers9092 Před 4 měsíci +1

    thanks man i was struggling from many hour this video was a life saver for Me.

  • @sabrinagasmi8874
    @sabrinagasmi8874 Před 3 lety +2

    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 Před 15 dny

    thank you, finally understood how it works exactly

  • @NGHVEVO
    @NGHVEVO Před 6 lety +2

    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 Před 5 lety +3

    Thank you so much for these videos! They have been invaluable in helping me study for my econometrics exam.

  • @JorgeAF
    @JorgeAF Před 3 lety +1

    Why do we use reg command with FD instead of xtreg (as it is done with FE)? Thank you

    • @sebastianwaiecon
      @sebastianwaiecon  Před 3 lety +1

      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.

  • @dulcenairaandredulce6908
    @dulcenairaandredulce6908 Před měsícem

    Hello, i would like to know if its necessary to use vce(robust) when using within estimator, i mean xtreg...fe, vce(robust)

  • @Thejohnster1012
    @Thejohnster1012 Před 3 lety

    best video I have ever seen on the topic, and I have seen quite a few. thank you!

  • @FELIX-qr6vd
    @FELIX-qr6vd Před 5 měsíci

    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?

  • @tosinolofinsao5404
    @tosinolofinsao5404 Před 3 lety

    Wow! So insightful. You saved my project, thanks.

  • @MOTU2308
    @MOTU2308 Před 2 lety

    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  Před 2 lety

      You can't do fixed effects with cross sectional data. This is for panel data.

  • @nitinbean1
    @nitinbean1 Před 6 lety

    Thanks!! It is a really great and clear explanation of fixed effects.

  • @jackieq1897
    @jackieq1897 Před 5 lety

    Thanks for the video. Your explanations are really clear.

  • @miguelangelcastro1547
    @miguelangelcastro1547 Před 4 lety

    Awesome! So clear and practical. Thanks!

  • @sebasgiraldomusica
    @sebasgiraldomusica Před 2 lety

    Hey! I've got a question regarding the program. I know xtset is similar to tsset. Do you any difference between them both?

  • @TheDancingPhysicist
    @TheDancingPhysicist Před 4 lety

    Could you please come teach STATA to us public health kids?? This is so great, thank you!!!!!

  • @Chris-di8nq
    @Chris-di8nq Před 3 lety +1

    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  Před 3 lety +1

      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.

  • @lucasmelotti5466
    @lucasmelotti5466 Před 2 lety

    Tmj irmão, salvou aqui em micro4 familia!!!

  • @ludovicadefranchis8285

    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  Před 2 lety

      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.

  • @jenli0426
    @jenli0426 Před 4 lety +1

    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  Před 4 lety

      See this article: www.stata.com/features/overview/factor-variables/

  • @simplensober
    @simplensober Před 3 lety

    Excellent video, very useful indeed

  • @love4thegame877
    @love4thegame877 Před 5 lety

    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  Před 5 lety

      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 Před 5 lety

      @@sebastianwaiecon thanks a lot for the help :)

  • @junbeombahk3668
    @junbeombahk3668 Před 2 lety

    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  Před 2 lety

      Both. The time fixed effect is included using the d87 dummy variable.

    • @junbeombahk3668
      @junbeombahk3668 Před 2 lety

      @@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  Před 2 lety

      That is correct.

  • @masaru444
    @masaru444 Před 4 lety +1

    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  Před 4 lety

      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.

  • @hw2810
    @hw2810 Před 4 lety

    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  Před 4 lety

      It sounds like you may have used tsset instead of xtset after you loaded your data.

  • @bethuelange3513
    @bethuelange3513 Před 2 lety

    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

  • @arthurbarbosa1437
    @arthurbarbosa1437 Před 4 lety

    Thank you for this video. It's really help me.

  • @subhalakshmipaul4816
    @subhalakshmipaul4816 Před 6 lety

    It's really helpful.. thank you for your information...

  • @stanislavmartsenyuk
    @stanislavmartsenyuk Před 7 lety

    Great job. Actually, same data can be analyzed in with xtmixed, where id's can be considered as random effects.

  • @edysaleh5006
    @edysaleh5006 Před 5 lety

    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  Před 5 lety

      Yes. See my video on categorical variables for how to use them: czcams.com/video/QN7u-ZBHqic/video.html

  • @user-ov1to6cs7i
    @user-ov1to6cs7i Před rokem

    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  Před rokem

      Yes, you would do that. In most cases, though, I recommend just using the xtreg command to get it done.

  • @AN-yr7nm
    @AN-yr7nm Před 4 lety

    Man this is gold!

  • @ianosuka6193
    @ianosuka6193 Před rokem

    Where can I find this dataset to follow through

  • @minimoni5179
    @minimoni5179 Před 3 lety

    hey, thank you for the video. Would you please explain me briefly industry fixed effect ? what should I do exactly ? Thank you.

  • @ibrar2kt
    @ibrar2kt Před 8 měsíci

    Thanks. Please can you show. What should be the minimum observation required FOR DID

    • @sebastianwaiecon
      @sebastianwaiecon  Před 6 měsíci

      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.

  • @akmalsultanov8217
    @akmalsultanov8217 Před 4 lety

    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  Před 4 lety

      I would recommend taking a look at my diff-in-diff video.

  • @teddykim430
    @teddykim430 Před 5 lety

    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  Před 5 lety

      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.

  • @nadiatsehaie5901
    @nadiatsehaie5901 Před 5 lety

    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  Před 5 lety

      Use i.survey_year to include temporary time dummies in your regression.

  • @andreab2114
    @andreab2114 Před 5 lety

    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  Před 5 lety

      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.

  • @tantruongkhanh1312
    @tantruongkhanh1312 Před rokem

    tHANK YOU, how can i use to data in lecture Sir ? Thank you

  • @elpibededios
    @elpibededios Před 3 lety

    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  Před 3 lety +1

      Select a base year and include dummy variables for all the other years. You can use the i. structure to get that done.

  • @joepdekort5696
    @joepdekort5696 Před rokem

    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  Před rokem

      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).

  • @aiboudaziz8318
    @aiboudaziz8318 Před 3 lety

    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.

  • @zdavirandimuhammad1515

    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  Před 2 lety

      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 Před 2 lety

      @@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

  • @christianfink398
    @christianfink398 Před 3 lety

    Hello, everytime I get the error repeated time values within panel. How can I fix this?

  • @hrishigiridhar964
    @hrishigiridhar964 Před 4 lety

    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  Před 4 lety

      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 Před 4 lety

      ​@@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  Před 4 lety

      There is nothing theoretically preventing doing so.

  • @pratikshyasilwal2081
    @pratikshyasilwal2081 Před 2 lety

    How can we interpret the values for sigma_u and sigma_e and rho?

  • @Dr_Shiny
    @Dr_Shiny Před 4 lety

    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  Před 4 lety

      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 Před 4 lety

      SebastianWaiEcon OK sir. Thank you

  • @fplopperborg
    @fplopperborg Před 5 lety

    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  Před 5 lety

      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.

  • @Blakeblade-zd7tt
    @Blakeblade-zd7tt Před 3 lety

    can anyone explain me whats the importance of year fixed effect? why we need it and what we find by using it?

  • @yiankan6484
    @yiankan6484 Před 5 lety

    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  Před 5 lety +1

      If you want to see all the dummies you do need to use "reg" instead of "xtreg."

    • @yiankan6484
      @yiankan6484 Před 5 lety +1

      @@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  Před 5 lety +1

      Just "robust" will get it done.

  • @kingsleygyan810
    @kingsleygyan810 Před 4 lety

    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  Před 4 lety

      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.

  • @brucelee7782
    @brucelee7782 Před 5 lety

    Aren't you supposed to put option robust (, r) behind all your regressions?? Putting robust will affect your R squared value.

    • @sebastianwaiecon
      @sebastianwaiecon  Před 5 lety

      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.

  • @raaksharammohun6279
    @raaksharammohun6279 Před 5 lety

    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  Před 5 lety

      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 Před 5 lety

      @@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  Před 5 lety

      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.

  • @drakegustavo1158
    @drakegustavo1158 Před 3 lety

    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?

  • @Thejohnster1012
    @Thejohnster1012 Před 3 lety

    are the degrees of freedom different if it is implemented via dummy variables versus demeaned values? would really appreciate an answer.

    • @sebastianwaiecon
      @sebastianwaiecon  Před 3 lety

      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 Před 3 lety

      @@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  Před 3 lety

      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 Před 3 lety

      @@sebastianwaiecon ahah I'm still not sure I quite get it but I suppose that does make sense. Thanks a lot :)

  • @poojasrivastava1513
    @poojasrivastava1513 Před 4 lety

    How to check whether we need to add period dummies Or just period as variable

    • @sebastianwaiecon
      @sebastianwaiecon  Před 4 lety

      If you think there is a linear time trend, you could use the period as a variable. Otherwise, you would want dummies.

  • @smacbot
    @smacbot Před rokem

    How do you do this when you have datat from every year from 1960 - 2020?

    • @sebastianwaiecon
      @sebastianwaiecon  Před rokem

      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 Před rokem

      @@sebastianwaiecon Thanks, will do :)

    • @smacbot
      @smacbot Před rokem

      @@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 :)

  • @albertpetros5373
    @albertpetros5373 Před 2 lety

    Clear

  • @andrepbatista1
    @andrepbatista1 Před 5 lety

    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  Před 5 lety

      You want to use the xtset command. I show this at about 8:10.

    • @andrepbatista1
      @andrepbatista1 Před 5 lety

      @@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  Před 5 lety

      @@andrepbatista1 Sorry, I don't understand the question, then.

    • @andrepbatista1
      @andrepbatista1 Před 5 lety

      @@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  Před 5 lety

      @@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.

  • @ashishstat
    @ashishstat Před 4 lety

    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

  • @ernestfrimpongasamoah665

    Thank you

  • @erdberrchen
    @erdberrchen Před 6 lety

    Thanks. BTW how do you implement a diff-in-diff analysis with panel data in STATA?

    • @sebastianwaiecon
      @sebastianwaiecon  Před 6 lety +1

      I will be doing a video on that soon.

    • @thomasbauer3742
      @thomasbauer3742 Před 5 lety

      @@sebastianwaiecon is the video already available? I did not find it on CZcams

    • @sebastianwaiecon
      @sebastianwaiecon  Před 5 lety

      @@thomasbauer3742 czcams.com/video/K0drFLzrI3I/video.html

  • @damir2go
    @damir2go Před 2 lety

    How do we run a fixed effetcs model with 10 years?

    • @sebastianwaiecon
      @sebastianwaiecon  Před 2 lety +1

      You need dummy variables for years. Look for my video on categorical data for help.

    • @damir2go
      @damir2go Před 2 lety

      @@sebastianwaiecon thank you a lot.

  • @savannahxie9972
    @savannahxie9972 Před 4 lety

    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  Před 4 lety

      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 Před 4 lety

      @@sebastianwaiecon thank you!

    • @HavenAWilliams
      @HavenAWilliams Před 3 lety

      @@sebastianwaiecon Can you send us the download for your edited dataset?

  • @99evan76
    @99evan76 Před 3 lety

    5:07 within group estimator

  • @aliciariolino1228
    @aliciariolino1228 Před 4 lety

    Hi Sebastian, any insight on how to demean the data for year and city fixed effects?

    • @sebastianwaiecon
      @sebastianwaiecon  Před 4 lety

      This is done in the video starting at about 4:00.

    • @aliciariolino1228
      @aliciariolino1228 Před 4 lety

      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  Před 4 lety

      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.

  • @Ejango2024
    @Ejango2024 Před 5 lety

    Nice video. How to construct a t variable that goes 1,2,3,4.. for multiple years?

    • @sebastianwaiecon
      @sebastianwaiecon  Před 5 lety +2

      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 Před 5 lety

      SebastianWaiEcon thanks I got it.

  •  Před 6 lety

    Hi! great video! Could you do a video for multidimensional panel with random effects?

    • @sebastianwaiecon
      @sebastianwaiecon  Před 6 lety

      No plans to do that at the moment, but the xtreg documentation should have what you need.

  • @Jaja1499
    @Jaja1499 Před 4 lety

    Hey! Thanks for the video. What exactly are time dummies? How do I create those in stata? i.year?

    • @sebastianwaiecon
      @sebastianwaiecon  Před 4 lety

      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 Před 4 lety

      @@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  Před 4 lety +1

      @@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 Před 4 lety

      @@sebastianwaiecon Thank you

    • @hlumisaxakaza3481
      @hlumisaxakaza3481 Před 4 lety

      @@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?

  • @mohammedhassen2558
    @mohammedhassen2558 Před 2 lety

    Could you attach the data to exercise please

    • @sebastianwaiecon
      @sebastianwaiecon  Před 2 lety

      The dataset is crime2.dta from the Wooldridge textbook. It can be found many places online. See the pinned comment for more details.

  • @HajarSudin
    @HajarSudin Před 2 měsíci

    i need help

  • @GamingWithRicky97
    @GamingWithRicky97 Před 4 lety

    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  Před 4 lety +2

      You miss the first period observation for every cross-sectional unit. There are 46 cities in the data.

  • @isurusenevirathne
    @isurusenevirathne Před rokem

    where can I download the data set

    • @sebastianwaiecon
      @sebastianwaiecon  Před rokem

      Dataset is CRIME2.dta from the Wooldridge book. You can get them many places online.

    • @isurusenevirathne
      @isurusenevirathne Před rokem

      @@sebastianwaiecon can you help me to find excel data set from internet

  • @manuellourenco4479
    @manuellourenco4479 Před rokem +1

    if i could kiss you i would. haha really, thank you so much, you helped a lot!

  • @xiaoguangli4744
    @xiaoguangli4744 Před 6 lety

    it is too complicate for beginner.

  • @Cepheus5959
    @Cepheus5959 Před rokem

    poor quality