Fixed Effects in Stata

Поділитися
Вставка
  • Опубліковано 20 лип 2024
  • Introduction to implementing fixed effects models in Stata. Includes how to manually implement fixed effects using dummy variable estimation, within estimation, and FD estimation, as well as the xtreg command.

КОМЕНТАРІ • 156

  • @Maxwolf58
    @Maxwolf58 4 роки тому +26

    Thank you Sebastian, very smart, short and clear lecture. In a few minutes you make me understand what i didn’t in years. 😂

  • @mrbinhesam
    @mrbinhesam 4 роки тому +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.

  • @michaelvendredi8274
    @michaelvendredi8274 4 роки тому +10

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

  • @HxCPokemonMaster
    @HxCPokemonMaster 5 років тому +3

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

  • @NGHVEVO
    @NGHVEVO 6 років тому +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.

  • @nitinbean1
    @nitinbean1 6 років тому

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

  • @Thejohnster1012
    @Thejohnster1012 3 роки тому

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

  • @jackieq1897
    @jackieq1897 5 років тому

    Thanks for the video. Your explanations are really clear.

  • @sabrinagasmi8874
    @sabrinagasmi8874 3 роки тому +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

  • @miguelangelcastro1547
    @miguelangelcastro1547 4 роки тому

    Awesome! So clear and practical. Thanks!

  • @tosinolofinsao5404
    @tosinolofinsao5404 3 роки тому

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

  • @arthurbarbosa1437
    @arthurbarbosa1437 4 роки тому

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

  • @subhalakshmipaul4816
    @subhalakshmipaul4816 6 років тому

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

  • @dserankers9092
    @dserankers9092 2 місяці тому +1

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

  • @AN-yr7nm
    @AN-yr7nm 4 роки тому

    Man this is gold!

  • @simplensober
    @simplensober 3 роки тому

    Excellent video, very useful indeed

  • @stanislavmartsenyuk
    @stanislavmartsenyuk 7 років тому

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

  • @Chris-di8nq
    @Chris-di8nq 3 роки тому +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  3 роки тому +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.

  • @TheDancingPhysicist
    @TheDancingPhysicist 4 роки тому

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

  • @masaru444
    @masaru444 4 роки тому +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  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.

  • @lucasmelotti5466
    @lucasmelotti5466 2 роки тому

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

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

  • @jenli0426
    @jenli0426 4 роки тому +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  4 роки тому

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

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

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

  • @ernestfrimpongasamoah665
    @ernestfrimpongasamoah665 6 років тому

    Thank you

  • @ludovicadefranchis8285
    @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  Рік тому

      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.

  • @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 років тому +1

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

    • @yiankan6484
      @yiankan6484 5 років тому +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  5 років тому +1

      Just "robust" will get it done.

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

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

  • @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 роки тому +1

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

  • @user-ov1to6cs7i
    @user-ov1to6cs7i Рік тому

    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.

  • @christianfink398
    @christianfink398 3 роки тому

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

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

  • @savannahxie9972
    @savannahxie9972 4 роки тому

    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  4 роки тому

      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 4 роки тому

      @@sebastianwaiecon thank you!

    • @HavenAWilliams
      @HavenAWilliams 3 роки тому

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

  • @erdberrchen
    @erdberrchen 6 років тому

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

    • @sebastianwaiecon
      @sebastianwaiecon  6 років тому +1

      I will be doing a video on that soon.

    • @thomasbauer3742
      @thomasbauer3742 4 роки тому

      @@sebastianwaiecon is the video already available? I did not find it on UA-cam

    • @sebastianwaiecon
      @sebastianwaiecon  4 роки тому

      @@thomasbauer3742 ua-cam.com/video/K0drFLzrI3I/v-deo.html

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

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

  • @JorgeAF
    @JorgeAF 3 роки тому +1

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

    • @sebastianwaiecon
      @sebastianwaiecon  3 роки тому +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.

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

  • @ashishstat
    @ashishstat 3 роки тому

    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

  • @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: ua-cam.com/video/QN7u-ZBHqic/v-deo.html

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

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

  • @pratikshyasilwal2081
    @pratikshyasilwal2081 2 роки тому

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

  • @Blakeblade-zd7tt
    @Blakeblade-zd7tt 2 роки тому

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

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

  • @albertpetros5373
    @albertpetros5373 2 роки тому

    Clear

  • @tantruongkhanh1312
    @tantruongkhanh1312 Рік тому

    tHANK YOU, how can i use to data in lecture Sir ? 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?

  • @Ejango2024
    @Ejango2024 5 років тому

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

    • @sebastianwaiecon
      @sebastianwaiecon  5 років тому +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 5 років тому

      SebastianWaiEcon thanks I got it.

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

  • @ibrar2kt
    @ibrar2kt 6 місяців тому

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

    • @sebastianwaiecon
      @sebastianwaiecon  5 місяців тому

      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.

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

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

  • @FELIX-qr6vd
    @FELIX-qr6vd 4 місяці тому

    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?

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

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

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

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

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

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

  • @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 роки тому +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 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?

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

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

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

  • @99evan76
    @99evan76 3 роки тому

    5:07 within group estimator

  • @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 роки тому +2

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

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

  • @mohammedhassen2558
    @mohammedhassen2558 Рік тому

    Could you attach the data to exercise please

    • @sebastianwaiecon
      @sebastianwaiecon  Рік тому

      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 18 днів тому

    i need help

  • @damir2go
    @damir2go Рік тому

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

    • @sebastianwaiecon
      @sebastianwaiecon  Рік тому +1

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

    • @damir2go
      @damir2go Рік тому

      @@sebastianwaiecon thank you 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

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

  • @manuellourenco4479
    @manuellourenco4479 Рік тому +1

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

  • @xiaoguangli4744
    @xiaoguangli4744 6 років тому

    it is too complicate for beginner.

  • @Cepheus5959
    @Cepheus5959 Рік тому

    poor quality