Announcement

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

  • Add control variables for states instead of state fixed effects

    I have retail daily price data for products in 10 stores across three US states for 5 years. I want to study the impact of minimum price policies on prices between states where the policy is imposed and where it is not during holiday and non-holiday periods.I am interested in what happens between states. I have two dummies - ban for if the policy is enforced in a state or not and special event dummy for holiday periods. My main variable of interest is the interaction between these two dummies. In my fixed effects model, I cannot add states as fixed effects since they are perfectly collinear with the ban dummy. Should I include some time-varying controls for the states, such as the unemployment rate? But I'm worried if controlling for unemployment will lead to endogeneity

  • #2
    The state fixed effects will be perfectly collinear with the ban dummy if you include all the states that have the ban, not if you drop one of them. Similarly, you will also omit one of the states that don't have the ban (assuming you have a constant in the model).

    Comment


    • #3
      In my dataset, I only have 2 states with a ban and one without ban. I am interested to see what happens to retail prices between states. In this case, is it okay to exclude state FE and keep the ban dummy*event dummy?

      Comment


      • #4
        If I understand you properly, you are only interested in the interaction between ban and holiday. And the nature of your data is such that ban is time-invariant within state. There is no reason you can't do this with -xtreg, fe-. You just code it as:
        Code:
        xtset state
        xtreg retail_prices i.ban##i.holiday perhaps_other_variables, fe vce(cluster state)
        Even though ban itself is colinear with the state fixed effect, the interaction between ban and holiday is not. The "main effect" of ban will be omitted from this analysis automatically by Stata due to its colinearity with the state fixed effect. But the interaction term 1.ban#1.holiday will still be there, and this is your "pay dirt." The actual "main effect" of ban is adjusted for in this analysis because the state fixed effects incorporate that automatically (along with all other fixed attributes of the states, even unmeasured ones). The "main effect" is not estimable in this model. But as estimating this "main effect" is not part of your research goal, that's just fine!

        I really do not recommend bringing the "main effect" of ban back into the model by eliminating one of the state indicators. This will appear to work. But the coefficient of 1.ban that you will get from such an analysis is a meaningless artifact: its value will differ depending on which state indicator you choose to omit. Why go to extra trouble to add a line of meaningless numbers to your output table?

        Comment


        • #5
          Well, the interaction is identified under the assumption that there aren't other state-level factors that cause retail prices to respond differently to holidays across states. If that doesn't hold, then identifying the interaction term has the same weakness as identifying the "main effect" of the ban. Whether that assumption is reasonable, is for OP to debate and defend.

          In general, I would worry about the ability to separate any effect of the ban here from the effect of state-level factors, given the very small number of states in the data.

          Comment


          • #6
            all the stores belong to the same chain, and exploratory analysis shows a somewhat uniform movement in prices across states and not much variation during holidays/kind of sticky. Does including state control variables like population, per capita income etc help identifying the interaction?

            Comment


            • #7
              I am interested in the interaction of the ban policy (doesn't vary with time and constant within states) and holiday dummy (which varies over time). I'll also be adding controls like population, per capita income etc. And since I am interested in the interaction and not the ban dummy, I can include state FE like Clyde said.I will also include product and month FE. My confusion now is if the interaction gives within or between state variation in prices ?
              Last edited by George Tim; 11 Mar 2025, 14:02.

              Comment


              • #8
                In a fixed effects model, all effects are within the FE. Fixed effects models are mathematically incapable of estimating between-FE effects.

                Comment


                • #9
                  In addition to the great advice provided, OP might find interesting a comparison between mixed effects models and FE models: https://biol609.github.io/Readings/M...thods_2019.pdf

                  Comment


                  • #10
                    Originally posted by Hemanshu Kumar View Post
                    Well, the interaction is identified under the assumption that there aren't other state-level factors that cause retail prices to respond differently to holidays across states. If that doesn't hold, then identifying the interaction term has the same weakness as identifying the "main effect" of the ban. Whether that assumption is reasonable, is for OP to debate and defend.

                    In general, I would worry about the ability to separate any effect of the ban here from the effect of state-level factors, given the very small number of states in the data.
                    Is it okay if I use Driscoll Kraay standard errors because of small number of states? I'm not sure how to calculate the number of entities: is it # of products * # of stores?

                    Comment


                    • #11
                      Originally posted by Clyde Schechter View Post
                      If I understand you properly, you are only interested in the interaction between ban and holiday. And the nature of your data is such that ban is time-invariant within state. There is no reason you can't do this with -xtreg, fe-. You just code it as:
                      Code:
                      xtset state
                      xtreg retail_prices i.ban##i.holiday perhaps_other_variables, fe vce(cluster state)
                      Even though ban itself is colinear with the state fixed effect, the interaction between ban and holiday is not. The "main effect" of ban will be omitted from this analysis automatically by Stata due to its colinearity with the state fixed effect. But the interaction term 1.ban#1.holiday will still be there, and this is your "pay dirt." The actual "main effect" of ban is adjusted for in this analysis because the state fixed effects incorporate that automatically (along with all other fixed attributes of the states, even unmeasured ones). The "main effect" is not estimable in this model. But as estimating this "main effect" is not part of your research goal, that's just fine!

                      I really do not recommend bringing the "main effect" of ban back into the model by eliminating one of the state indicators. This will appear to work. But the coefficient of 1.ban that you will get from such an analysis is a meaningless artifact: its value will differ depending on which state indicator you choose to omit. Why go to extra trouble to add a line of meaningless numbers to your output table?
                      I have only 3 states. Will my estimation be valid then? Or could I do something like driscoll kraay standard errors?

                      Comment


                      • #12
                        For Driscoll Kraay, you need T>N, but with T growing very large. That is not really the case here...

                        Comment


                        • #13
                          Originally posted by Maxence Morlet View Post
                          For Driscoll Kraay, you need T>N, but with T growing very large. That is not really the case here...
                          Can I use robust se or wild boot se? My clusters are small, so can't do cluster se

                          Comment


                          • #14
                            with a total of 50 data points, analysis is tricky. Yes probably ssc install boottest.

                            Comment


                            • #15
                              With daily data and 10 stores, I took this to mean N = 10 and T is pretty large. The five states doesn't directly factor in. If so, the Driscoll-Kraay standard errors are entirely appropriate. I think you should include state fixed effects. You're interested in the coefficient on the treatment dummy, which happens to be an interaction. Without controls, this is the usual difference-in-differences estimator using the sample averages of the treated and control, before and after. D-K gives a convenient way of obtaining a standard error.

                              Comment

                              Working...
                              X