Fixed Effects in Stata

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024

Комментарии • 158

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

  • @dserankers9092
    @dserankers9092 3 месяца назад +1

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

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

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

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

  • @svenjao.7309
    @svenjao.7309 День назад

    thank you, finally understood how it works exactly

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

  • @HxCPokemonMaster
    @HxCPokemonMaster 5 лет назад +3

    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.

  • @nitinbean1
    @nitinbean1 6 лет назад

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

  • @jackieq1897
    @jackieq1897 5 лет назад

    Thanks for the video. Your explanations are really clear.

  • @miguelangelcastro1547
    @miguelangelcastro1547 4 года назад

    Awesome! So clear and practical. Thanks!

  • @TheDancingPhysicist
    @TheDancingPhysicist 4 года назад

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

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

  • @simplensober
    @simplensober 3 года назад

    Excellent video, very useful indeed

  • @AN-yr7nm
    @AN-yr7nm 4 года назад

    Man this is gold!

  • @lucasmelotti5466
    @lucasmelotti5466 2 года назад

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

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

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

  • @stanislavmartsenyuk
    @stanislavmartsenyuk 7 лет назад

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

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

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

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

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

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

  • @albertpetros5373
    @albertpetros5373 2 года назад

    Clear

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

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

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

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

  • @ibrar2kt
    @ibrar2kt 7 месяцев назад

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

    • @sebastianwaiecon
      @sebastianwaiecon  6 месяцев назад

      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.

  • @FELIX-qr6vd
    @FELIX-qr6vd 5 месяцев назад

    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?

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

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

  • @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: ruclips.net/video/QN7u-ZBHqic/видео.html

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

  • @ernestfrimpongasamoah665
    @ernestfrimpongasamoah665 6 лет назад

    Thank you

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

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

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

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

  • @dulcenairaandredulce6908
    @dulcenairaandredulce6908 22 дня назад

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

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

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

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

  • @pratikshyasilwal2081
    @pratikshyasilwal2081 2 года назад

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

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

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

  • @christianfink398
    @christianfink398 3 года назад

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

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

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

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

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

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

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

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

    • @sebastianwaiecon
      @sebastianwaiecon  4 года назад

      @@thomasbauer3742 ruclips.net/video/K0drFLzrI3I/видео.html

  • @tantruongkhanh1312
    @tantruongkhanh1312 Год назад

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

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

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

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

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

  • @ianosuka6193
    @ianosuka6193 Год назад

    Where can I find this dataset to follow through

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

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

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

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

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

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

  • @damir2go
    @damir2go 2 года назад

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

    • @sebastianwaiecon
      @sebastianwaiecon  2 года назад +1

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

    • @damir2go
      @damir2go 2 года назад

      @@sebastianwaiecon thank you a lot.

  • @manuellourenco4479
    @manuellourenco4479 Год назад +1

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

  • @HajarSudin
    @HajarSudin Месяц назад

    i need help

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

  • @xiaoguangli4744
    @xiaoguangli4744 6 лет назад

    it is too complicate for beginner.

  • @Cepheus5959
    @Cepheus5959 Год назад

    poor quality