Announcement

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

  • Difference-in-Difference with multiple periods and groups

    I have a data set in which the basic units are Factories (which is denoted by Factory ID). The factories with less than 10 million investment stock in plant and machineries are considered as small and others large. My aim of this research is to understand the impact of small scale de-reservation on product innovation. The small scale de-reservation statrted in 2000. The policy was not being carried out all at once, rather some firms were de-reserved in 2000 and they continue to be de-reserved through out the years. Likewise some more firms got de-reserved in 2001 and they continue to be de-reserved once it is de-reserved. The process of de-reservation happens till 2015. So here the treatment happens in multiple periods for different groups.

    In this research my airm is to evaluate the impact of small-scale de-reservation policy on firms' product innovation. My intution is that small-scale dereservation have made small firms in direct competion with large firms with greater capabilities and therefore they may not be able to innovate further due to cut throat competition. In some other cases, they might innovate if there intial capabilities are comparable with large firms.

    Si in this case if I do a Difference in difference with multiple time periods, can large firms which were not subject to the policy be control group? if not, what would be my control group and how to identify them?

    Since there is no fixed year for policy, we identify the year of first treatment and then mark ''treated'' after that year. In this case how to creat the variables of treatment and group expossed to the treatment.

    My data-set is from the year 2000 so thay i dont have an year in which all the firms remain un treated. Further in the data if year_dereservation is missing, that mean the firm is a large one and is not subject to the policy change

    I have attached a sample dataset. The dataset also contains the variables which I may use as covariates in the regression.

    After a product (and therefore the corresponding factory), is removed from the reservation list or de-reserved, some factories may continue to produce them and some new factories will definitely enter into that product segment. These new factories thay have entrred into the product segment after de-resertvation are not small factories by definition.

    The variable SSI_FACTORY_DUMMY refers to the dummy variable if a factory has manufactured any small scale product either before or after the de-reservation period.



    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(fact_id year) int year_dereservation float(new_product_dummy ownershipcode log_age factory_size factory_size_squared log_working_capital log_welfare_expenses sector_dummy_new)
    58 1999    . 0 1  .6931472 2.6390574  6.964624         .         . 20
    37 1999    . 0 1 3.5263605 2.0794415  4.324077  13.22428         . 29
    91 1999    . 0 1  3.970292 1.3862944  1.921812  8.863616         . 22
     7 1999 2007 0 1 3.4011974 2.3025851  5.301898 13.370925         . 26
     8 2000    . 0 1 1.3862944  2.833213  8.027098 13.969795         . 17
    49 2000    . 0 1 3.0445225  2.944439  8.669721 12.398155  9.433484 26
     1 2000    . 0 1  1.609438  2.564949  6.578965 13.417416  8.980172 18
    13 2000    . 0 1  2.833213  2.564949  6.578965 13.261424 10.695756 22
    83 2000    . 0 1 1.0986123  2.564949  6.578965  15.04651  9.807802 17
     7 2000 2007 0 1  2.564949  2.397895  5.749902 13.876872  10.14655 26
    40 2000    . 0 1 1.3862944 2.0794415  4.324077  14.27706  9.219894 20
    39 2001    . 0 0  3.178054  2.564949  6.578965 13.266263         . 22
     3 2001 2004 0 1  2.772589  3.218876 10.361162  15.09514  11.90896 28
    49 2001    . 0 1  2.397895  2.995732  8.974412 11.006324 10.256923 26
    75 2001 2008 0 1  4.624973  3.135494  9.831324         .         . 21
     7 2001 2007 0 1  2.833213  2.564949  6.578965         .  9.540148 26
    37 2001    . 1 1  3.465736  1.609438 2.5902905 13.340822   8.56121 29
     7 2002 2007 0 1  3.496508 2.1972246  4.827796         . 10.473478 26
    93 2002    . 0 1  2.397895  1.609438 2.5902905 13.981338         . 17
    56 2002 2007 0 1 1.7917595  2.397895  5.749902 10.208395         . 27
    69 2002    . 0 1 2.3025851  2.397895  5.749902 13.631922  9.083756 28
     1 2002    . 1 1   1.94591 1.3862944  1.921812  12.54669         . 17
    75 2002 2008 0 1  2.772589  2.397895  5.749902         .         . 21
    56 2003 2007 1 1   1.94591  2.484907  6.174761  10.26399         . 27
    14 2003    . 0 1 3.0910425  2.833213  8.027098         . 10.630094 26
    37 2003    . 1 1 3.5263605  1.609438 2.5902905 11.346848  8.258681 29
    18 2003 2015 0 1  2.890372  2.890372  8.354249 14.785128         . 28
     8 2003    . 1 1   1.94591  2.564949  6.578965  13.96584         . 17
    62 2003    . 0 1 2.6390574  3.637586 13.232033 15.523062 11.533395 24
    47 2003    . 0 1 3.4011974 2.1972246  4.827796 12.983995         . 26
    65 2003    . 0 1 3.0910425  3.465736 12.011326 15.311068 11.264618 26
    74 2004 2007 0 1 4.2904596  4.905275  24.06172 17.726906 10.988018 26
    40 2004    . 0 1   1.94591  2.944439  8.669721 14.657135         . 20
     8 2004    . 1 1 2.1972246  2.944439  8.669721 13.977489         . 17
    54 2004    . 0 1 3.2580965  2.397895  5.749902   14.7036         . 28
    82 2004 2005 0 1  2.833213 2.3025851  5.301898  13.93892         . 24
    56 2004 2007 1 1 2.0794415  .6931472   .480453         .         . 27
    19 2004    . 0 1  2.890372  4.969813 24.699045 13.889056 11.900804 24
    65 2004    . 0 1  3.135494 3.8286414 14.658495 16.054665  11.13765 26
    66 2004 2008 0 1   1.94591   1.94591  3.786566         .         . 21
    34 2004    . 0 1   1.94591  2.833213  8.027098 11.554893  7.809947 29
    43 2004    . 0 1 1.7917595 2.1972246  4.827796         .  9.932318 24
    27 2004    . 0 1   2.70805   2.70805  7.333536 16.354773  7.242083 24
    18 2005 2015 0 1  2.995732   2.70805  7.333536 15.180366         . 28
    98 2005    . 0 1  1.609438  3.178054 10.100026 13.679546  10.12755 17
    27 2005    . 1 1  2.772589  2.772589  7.687248 16.365507  7.903965 24
    68 2005    . 0 1 3.0445225 2.1972246  4.827796 14.514722  8.670601 28
     7 2005 2007 1 1  3.583519  2.833213  8.027098 12.402966 10.217605 26
    34 2005    . 1 1  2.397895 2.0794415  4.324077         .  8.410943 29
    13 2005    . 1 1   1.94591  2.944439  8.669721 15.013954 11.860026 21
    83 2005    . 1 1 2.0794415  2.944439  8.669721 14.736695 10.036181 17
    74 2005 2007 0 1  4.304065  4.934474 24.349033 17.163048 11.568067 26
    23 2005 2007 0 1  3.367296  2.484907  6.174761 14.416636  7.677864 26
    96 2005 2006 0 1 3.5263605  2.772589  7.687248 13.824446  9.265207 24
    82 2006 2005 0 1  2.890372  2.397895  5.749902  14.39739  5.451038 24
    47 2006    . 0 1  3.496508 2.3025851  5.301898  14.10745   7.20786 26
    33 2006    . 0 1  3.465736  4.477337 20.046545 14.201146         . 16
    86 2006 2006 0 1   3.78419  3.496508 12.225566  13.52973  10.81215 28
    51 2006    . 0 1   2.70805  2.564949  6.578965 14.529168         . 20
    77 2006    . 0 1 3.0445225 4.3820267  19.20216 14.186303         . 16
    17 2006    . 0 1  3.433987 4.4886365  20.14786  14.20142         . 16
    10 2006    . 0 1 2.1972246   2.70805  7.333536  12.24688         . 16
    30 2006 2007 0 1 3.2580965  1.609438 2.5902905         .  7.635304 26
    85 2006    . 0 1  .6931472 4.3307333  18.75525  15.28628         . 26
    95 2006    . 0 1  .6931472  4.394449 19.311184 15.752844         . 26
    66 2006 2008 1 1 2.1972246  2.397895  5.749902 14.420888         . 21
    74 2006 2007 0 1  4.317488  5.908083 34.905445         . 11.330684 26
    85 2007    . 1 1 3.0445225 3.9318256 15.459253 16.554813  10.71286 26
    95 2007    . 0 1 1.0986123   3.89182 15.146264 15.685586 10.704143 26
    74 2007 2007 0 1 4.3307333 4.7095304 22.179676         .  12.41545 26
    62 2007    . 1 1  2.890372  3.988984 15.911994  16.61673 10.446596 24
    75 2007 2008 1 1  2.397895 2.3025851  5.301898 14.657434         . 21
    37 2007    . 0 1  3.637586 1.7917595  3.210402 14.103975         . 29
    17 2007    . 0 1  3.465736  5.556828  30.87834  15.25402         . 16
    54 2007    . 1 1  3.367296   2.70805  7.333536 14.884635         . 28
    26 2007    . 0 1  3.367296 1.7917595  3.210402  8.977525         . 16
    32 2007    . 0 1   1.94591  2.564949  6.578965         .  9.177507 25
    77 2007    . 0 1 3.0910425 4.5217886  20.44657 14.474142         . 16
    94 2007 2004 0 1 1.3862944 2.3025851  5.301898 12.896386   7.95015 26
    25 2007    . 0 1   1.94591  2.564949  6.578965 14.786767 10.094769 24
    67 2007 2005 0 1 1.0986123   5.26269  27.69591 18.168055 15.138324 29
    99 2007 2008 0 1 1.3862944 3.0910425  9.554543 15.776823 10.985157 19
    77 2008    . 0 1  3.135494  4.574711  20.92798 14.485622         . 16
    99 2008 2008 0 1 2.6390574 3.0910425  9.554543 15.991436 10.904064 19
    95 2008    . 0 1 1.3862944 3.8066626  14.49068  16.21671         . 26
    16 2008    . 1 1 1.7917595  5.117994  26.19386  15.16214  8.003029 24
    17 2008    . 0 1  3.496508  5.497168 30.218857 14.856136  10.91509 16
    65 2008    . 1 1  2.833213  4.787492  22.92008  14.36624 11.808397 26
    59 2008    . 1 1  2.397895  1.609438 2.5902905 14.266218         . 24
    94 2008 2004 1 1  1.609438  2.484907  6.174761 12.631243  7.951207 26
    25 2008    . 0 1 2.0794415 2.6390574  6.964624  15.05743 10.176754 24
    49 2008    . 1 1  2.890372   2.70805  7.333536         .  11.14829 26
    85 2008    . 0 1 3.3322046    3.7612 14.146626  16.48742         . 26
    67 2008 2005 1 1 1.3862944  5.429346 29.477795 18.285807  14.72949 29
    32 2008    . 1 1 2.0794415  2.944439  8.669721         .  7.790696 25
    74 2008 2007 1 1 4.3438053   4.65396 21.659346         . 12.794356 26
    88 2009    . 0 1  2.484907  3.295837  10.86254  13.61992  11.82113 25
    79 2009    . 0 0  3.135494 2.3025851  5.301898 13.745592  12.91417 28
    74 2009 2007 1 1  4.356709  4.317488 18.640705         .   11.6725 23
    16 2009    . 1 1   1.94591   4.85203   23.5422 15.197473 10.829867 32
    end







  • #2
    Let me ask you a few questions. First, how many factories are ever treated? And how many were never treated?


    I would advise synthetic controls, but your time series is super short. Thus, you may be interested in Athey's matrix completion estimator, did_multiplegt, flexpaneldid, eventstudyinteract, did with gmm, and other interesting estimators such as csdid by FernandoRios.

    My word of caution would be whichever estimator you decide to use, please make sure you understand the basics of what the estimator is doing. Some estimators (like mine, not listed here) will remove already-treated units, some compare treated units only to never treated units. And you'll need to understand the implications of this for your analysis and if it the method you go with makes sense. You'll also need to know the basic theoretical econometrics of why these methods might be preferable to normal DD or TWFE estimators, so you can make a convincing case for its validity.

    Comment


    • #3
      you can use large firms as controls if you believe they are a good counterfactual, or you can use not-yet-treated firms. not-yet-treated firms may be a better comparison group but it will shrink over time, which can make it difficult to estimate long-run effects.

      Comment

      Working...
      X