Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    In this case, what might be a code for adding month-of-sample and month-by-household fixed effects to my model? The point is that I do not quite understand these "-of-"s and "-by-"s. Thank you!

    Comment


    • #62
      @Katherine Adams,

      Did you manage to find an answer to your question? I also have been having a hard time understanding the difference between, for example, ‘month’ fixed effects and ‘month of sample’ fixed effects. This question might be too theoretical for this thread, but I just failed to find an answer using other sources of info.

      Thanks.

      Comment


      • #63
        Katherine:
        sorry, but I've never come across those terms before.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #64
          Hello,

          I conduct a diff-in-diff study. In particular, I need to regress the production level of a firm on a treatment indicator (treatm) and a post-treatment indicator (treat_post); in addition, I am asked to add the month and firm fixed effects and the calendar month time trend, as well as month-by-year fixed effects.

          However, every time I try to do such a regression
          reghdfe production treatm treat_post c.month_calend, absorb(firm month month_by_year) vce(cluster firm)

          Stata says that month_calend is omitted because of collinearity. Can you please tell me why I get this message and how I could change my model to deal with this collinearity issue?

          Thanks a lot.

          Comment


          • #65

            Hi everyone, I also have a question about the DID regression. My data looks like this with information from the seven origin hub airports from Delta. ORIGIN DEST CARRIER DEPARTURES_PERFORMED YEAR QUARTER str3(origin dest) str41 unique_carrier_name int departures_performed long passengers int year byte quarter "ATL" "BNA" "Regions Air, Inc." 47 218 2005 1 "ATL" "BNA" "Regions Air, Inc." 47 292 2005 1 "ATL" "MIA" "American Airlines Inc." 165 13314 2005 1 "ATL" "ORD" "American Airlines Inc." 102 9202 2005 1 "ATL" "DFW" "American Airlines Inc." 319 29358 2005 1 end I want to estimate if the Delta merger with Northwest has an effect on the number of departures from the seven hub airports used by Delta pre (2005-2007) and post merger (2010-2012).
            I use a DID regression where I compared the Delta airlines with the other airlines flying from the origin hub airport.


            Code:
            #generate treated variable: dummy for Delta from hub airports
            gen dummyDelta =0 
            replace dummyDelta =1 if unique_carrier_name == "Delta Air Lines Inc." | unique_carrier_name == "Northwest Airlines Inc." | unique_carrier_name == "Mesaba Airlines"  | unique_carrier_name == "Compass Airlines"  | unique_carrier_name == "GoJet Airlines LLC d/b/a United Express"  | unique_carrier_name == "Endeavor Air Inc."  | unique_carrier_name == "Republic Airline"  | unique_carrier_name == "SkyWest Airlines Inc."
            tab dummyDelta
            
            #generate time variable 
            
            gen t =0 
            replace t=. if year >2007 & year <2010
            replace t=1 if year >=2010
            
            #DID estimation
            
            diff log_departures_performed, t(dummyDelta) p(t) cov(HHI dist incpop pop)
            diff log_departures_performed if origin=="ATL", t(dummyDelta) p(t) cov(HHI dist incpop pop)
            This works, but I think comparing Delta with the other airlines is not the best method to do so. Another option is to include more origins from other lecagy carriers and to compare those with the delta hubs.
            I think it is also better to include hub airport fixed effects and year quarter fixed effects. I hope someone can help me that is familiar with this type of data.
            Many thanks

            Comment


            • #66
              Clyde and Carlo,

              I have read both of your comments on many threads now--thank you for your help thus far but I have a set of very particular questions about DiD with fixed effects and the correct specification to use here.

              Here is the scenario, I have a scenario with US firms over time and I have instances (in different time periods) where an exogenous event happens to one of 5 executive's of the firm and this qualifies as the treatment; I want to use coarsened exact matching. On the left hand side, I want to look at firm outcomes as dependent variables in the various models (ROA, other firm outcomes, and excess market return, separately); on the right-hand side, I want to measure the effect of the shock for the given firm outcome through the coefficient on treatment*post, obviously but I also want to see how the exogenous shock differs depending which executive experienced the event (using a set of categorial dummies for each executive role with CEO as baseline with 1 for the one that got the shock) and then I want to see how the shock differs based on other firm and executive individual characteristics like industry/size and gender, respectively, so I will include industry dummies instead of industry fixed effects but I could include state fixed effects I assume for where the company is based--I do not know which types of fixed effects I want/should (executive specific, firm, time, industry, state, etc.), which I can have (I did not really understand what you mean about including both makes it a ghost of a DiD), How this changes what (if any) economic variables, individual variables, and firm variables I can put in and how the FEs used changes the model (for example, as Clyde was describing at the beginning of the thread with his #1 and #2 response in regard to the model without and with double FE, respectively. For example, I cannot include macro variables if I include time fixed effects or I can but they cannot be interpreted or what? which do I want? Same question with firm controls and firm fixed effects--which do i want or both and what does that mean for the interpretation and model? And do I then not include the post dummy as its own coefficient (just the interaction) if I use a time fe? do I not include the treatment dummy if i include firm FE? I am a bit confused and want to be certain I have it correct. Thanks!

              Comment


              • #67
                Click image for larger version

Name:	Screen Shot 2020-03-22 at 5.11.56 PM.png
Views:	1
Size:	265.9 KB
ID:	1542323
                my model is as follows but imagine there is a Beta 5 there and then on the end I currently have a firm fixed effect and a time fixed effects and an error term; X are a vector of firm characterstics, y a vector of economic conditions and Z are a vector of individual exec characteristics--I do not care to measure Y variables so I can use year fixed effects but then I need to remove the economic condition controls (y vector) and I cannot use firm or individual exec fixed effects because i want to include firm and exec characteristics as controls, is that correct? But does that mean one of my regressors beta 1 or beta 2 disappears from using time fixed effects?

                Comment


                • #68
                  So, the issue is collinearity. And while there are other ways that variables can be colinear, the commonest source of collinearity in this kind of model is including both firm fixed effects and variables that are constant within firms over time (unchanging firm attributes, e.g. industry), or including both time fixed effects and variables that are constant across firms within years (e.g. measures of national or global economic conditions that are the same for all firms in any given year).

                  You also don't have to spend a lot of time worrying about this. If you are unsure, just include things: Stata will remove something. So when you run your -xtreg, fe-, make sure you pay attention to all the details of the output (including the warning messages that often precede the actual results): Stata always tells you when it removes a variable due to collinearity. If you see that it has removed a year indicator (other than the usual base year) then you have both time effects and variables that are constant within time periods. If you see that some variable that describes unchanging firm attributes has been eliminated--it's because it's collinear with the firm fixed effects. If you include both firm indicator ("dummy") variables and run an -fe- model, then all of those firm indicators will be dropped.

                  Remember that none of this matters if you are not interested in estimating the effects of these additional variables. The key results, for TR#Post, are not affected by this, nor are any model outcome predictions. So don't waste a lot of energy fretting over this. If you are interested in measuring these other effects, then you cannot use a -fe- model (or if they are collinear with the time variables, you cannot include time variables and these other variables.) In that case, you have to decide what your priorities are and consider different models..

                  Comment


                  • #69
                    Hello Everyone,

                    I have a question about DID.

                    if a major policy happened in late 2016 in the US, and I am comparing the US to other countries as a control group (meeting the parallel trend assumptions).

                    I am running two DID models to see if this policy actually caused the improvement in (Model 1) small businesses and (Model 2) the overall economy.

                    But, a presidential election also happened at the same time in 2016.

                    How can I prove that it is actually the policy, and not the overall change in power in 2016 which happened at the same time, was the actual cause of that change?

                    Comment


                    • #70
                      You can't. At least not with this kind of simple modeling. If you have some well-established theoretical model that predicts, say, a different time course of improvement in the overall economy (whatever that means) depending on which of the two causes is operating (or, better based on the relative contributions of the two causes) then you could fit that kind of model and perhaps draw some conclusions. I'm not aware of any established model like that, but economics is not my domain.

                      Anyway, all that you can ever conclude from a DID model is that something that happened at the time of the intervention was followed by a different response among those who were affected by that intervention and those that were not. But if more than one thing happened at that time, there is no way to tease out which was responsible (or if both contributed partially) from a DID model.

                      Comment


                      • #71
                        @Clyde Schechter

                        Thank you for your response Clyde. It was very helpful as this is precisely what I was trying to understand.

                        Comment


                        • #72
                          Hello
                          I m facing some issues in Difference-in-Difference estimation on consumption expenditure. I am using four rounds of cross-sectional Household Survey ( with five years gap and where the same individuals are not repeated/independent cross-sectional). I am using the first round as a pre-intervention period and the rest three as post-intervention assuming time-varying effects of the policy (policy is continues with different intensities). there are two regions surveyed in a State. Region 1 (Treatment group) having 5 districts, and Region 2 (Control group) with 4 districts. so Treatment here is geographical. Following is the model specification
                          Yijt=a0 + a1*TREAT + a2*POST + a3TREAT_POST + covariates + e
                          i=individual, j= district and t=time
                          TREAT=1 if individuals belong to 4 districts of treatment Region 1 and 0 otherwise.
                          POST =0, 1, 2, 3 for four years respectively.
                          should I run the regression with district fixed effects using fe i(district) after regression. TREAT here will be dropped by Stata.
                          my questions are
                          1. is this the correct specification with fixed effects, and have years to be given 0,1,2,3 values?
                          2. for multi-period (with only region 1 remaining affected by policy intervention through time), is code similar to your code in #2 applicable? like this command
                          Code:
                          xtreg Y i.TREAT##i.POST i.time covariates, fe i(district)
                          3. do i have to exclude clustering for standard errors as only 7 districts are available?
                          Last edited by Saeed Owais Mushtaq; 26 Nov 2020, 07:06.

                          Comment


                          • #73
                            Clyde Schechter sir, can u suggest something here?

                            Comment

                            Working...
                            X