Announcement

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

  • fixed effects diff in diff without standard controll group (effects of a tax)

    Hello community,
    I am currently writing my thesis and am not very familiar with Stata or statistics. I have the following problem:

    I am doing a difference-in-difference regression with fixed effects. I have data from an annual survey, but with different people each time. In year x, a nationwide tax was introduced, and I am analyzing the effects of this tax on different variables. This means that the tax affects all individuals surveyed in my survey. In order to determine the extent to which the tax had an effect, I have introduced a binary tax indicator ("SteuerJ") that increases to 1 from the time the tax was introduced. This means that the individuals in the years before the introduction of the tax are my control group and those in the year after are my treatment group, according to my professor.

    In Stata, I first entered the command:
    . xtset seriali year

    Panel variable: seriali (weakly balanced)
    Time variable: year, 2014 to 2019
    Delta: 1 unit


    Then this:

    . xtreg SOFTDRINKSNOTLOWCALORIE SteuerJ i.year, fe


    Stata then removes all variables because they are too highly correlated.

    . xtreg SOFTDRINKSNOTLOWCALORIE SteuerJ i.year, fe
    note: SteuerJ omitted because of collinearity.
    note: 2015.year omitted because of collinearity.
    note: 2016.year omitted because of collinearity.
    note: 2017.year omitted because of collinearity.
    note: 2018.year omitted because of collinearity.
    note: 2019.year omitted because of collinearity.

    Fixed-effects (within) regression Number of obs = 3,376
    Group variable: seriali Number of groups = 3,376


    However, the test shows this.

    . corr SOFTDRINKSNOTLOWCALORIE SteuerJ year
    (obs=3,376)

    | S~NOTL~E SteuerJ year
    -------------+---------------------------
    S~NOTL~E | 1.0000
    SteuerJ | -0.0759 1.0000
    year | -0.0731 0.6555 1.0000


    Are the commands even the right approach? What else do I need to consider to make it work? Many thanks in advance. If you need more information, please let me know.

  • #2
    Anni:
    welcome to this forum.
    Some comments about your post:
    1) you do not have a panel dataset, but a repeated cross-sectional one (different data waves include different participants). I would consider -regress- or Stata commands that are conceived for DID (-didregress-);
    2) exception made for 2014, -i.year- and -SteuerJ- are omitted due to perfect collinearity ;
    3) you have a too limited number of predictors to obtain informative results;
    4) with such a large sample, default standard errors are probably not the way to go (see -robust- and -vce(cluster clusterid)- options available from -regress-);
    5) -correlate- is useful do investigate whether the residual of your regression show any evidence of autocorrelation. Conversely, testing the variabes correlation is not that informative after -regress- (see -estat vce, corr- instead, that focuses on coefficients, though);
    6) I would recommend you to discuss all your research strategy and methods with your supervisor, especially if, as you state, you have a limited smattering of statistics.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Thank you very much for your quick reply Carlo!

      1. I have now tried it with the didregress command. The problem here is that I don't have a control group with and without the influence of the tax. Since the time points before the tax are my control group and those after the introduction are my treatment group. How can I deal with this?

      . didregress (SOFTDRINKSNOTLOWCALORIE) (SteuerJ), group(SteuerJ) time(year)
      note: SteuerJ omitted because of collinearity.
      model is not identified
      The treatment variable SteuerJ was omitted because of collinearity.
      r(198);


      3. Does this mean variables such as age or BMI that should still be added?

      4. Can you explain this further?

      5. Unfortunately, he has only answered my questions very briefly with a lot of technical terms, which have unfortunately caused confusion so far.

      Comment


      • #4
        Is it possible to consider yearly fixed-effects and monthly fixed-effects?

        Comment


        • #5
          Anni:
          1) this something I suspected from your previous post. For DID to be valid, you should have a before/after categorical variable (-SteuerJ- in your case) and two groups (affected and not affected by the event). Conversely, I'm under the ompression that your study design includes one group only (see https://www.stata-press.com/data/r18/hospdd as an example of DID). I would consider -svy: regress- then (see -svy- prefix);
          3) Yes. As far as age is concerned, I would consider both linear and square terms (c.age##c.age) to serch for possible turning point (see -fvvarlist- notation);
          4) the residual of your regression are in all likelihood correlated. Use -vce(cluster clusterid)- standard errors instead of their default counterparts;
          5) That is bad indeed. You are facing an advanced topic in regression that needs a good command of regression analysis. See the references under -didregress- entry in Stata .pdf manual and/or search for the help of colleagues who are more familiar with this kind of stuff.
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment

          Working...
          X