Announcement

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

  • a kinder inquiry on how to create a treatment group for staggered DID estimation

    Dear members

    I am trying to assess a country policy mandate on certain firm's outcomes in an international sample. I will be using staggered DID as countries have introduced the policed in different years while others did not.. My question here is that I would like to create a treatment gourp if the country mandates the policey =1 and zero otherize. I would like the dummy variable (1) to remain as one for the future years. my sample period is 2005-2020.

    Thanks in advance for your kind help.

    Here is an exmaple of my dataset:
    nput str28 Country int(Policy1Year Year)
    "ITALY" 2007 2005
    "SWEDEN" 2005 2005
    "BRAZIL" . 2005
    "SWEDEN" 2005 2005
    "FRANCE" 2005 2005
    "UNITED STATES" . 2005
    "JAPAN" 2005 2005
    "JAPAN" 2005 2005
    "SOUTH KOREA" 2012 2005
    "GERMANY" 2005 2005
    "UNITED STATES" . 2005
    "FRANCE" 2005 2005
    "UNITED STATES" . 2005
    "INDIA" 2005 2005
    "NETHERLANDS" 2006 2005
    "FRANCE" 2005 2005
    "UNITED STATES" . 2005
    "JAPAN" 2005 2005
    "UNITED KINGDOM" 2008 2005
    "AUSTRALIA" 2005 2005
    "CANADA" 2005 2005
    "UNITED STATES" . 2005
    "CANADA" 2005 2005
    "AUSTRALIA" 2005 2005
    "IRELAND" . 2005
    "UNITED STATES" . 2005
    "INDIA" 2005 2005
    "INDIA" 2005 2005
    "FRANCE" 2005 2005
    "UNITED STATES" . 2005
    "ITALY" 2007 2005
    "SOUTH AFRICA" 2010 2005
    "UNITED KINGDOM" 2008 2005
    "FRANCE" 2005 2005
    "AUSTRALIA" 2005 2005
    "NETHERLANDS" 2006 2005
    "PAPUA NEW GUINEA" . 2005
    "SPAIN" 2005 2005
    "JAPAN" 2005 2005
    "FRANCE" 2005 2005
    "AUSTRALIA" 2005 2005
    "UNITED STATES" . 2005
    "SWITZERLAND" . 2005
    "SPAIN" 2005 2005
    "CHINA" 2008 2005
    "AUSTRALIA" 2005 2005
    "PAKISTAN" . 2005
    "JAPAN" 2005 2005
    "JAPAN" 2005 2005
    "UNITED STATES" . 2005
    "SWEDEN" 2005 2005
    "CHILE" 2015 2005
    "JAPAN" 2005 2005
    "SWITZERLAND" . 2005
    "SPAIN" 2005 2005
    "UNITED KINGDOM" 2008 2005
    "UNITED STATES" . 2005
    "SWEDEN" 2005 2005
    "AUSTRALIA" 2005 2005
    "JAPAN" 2005 2005
    "SPAIN" 2005 2005
    "UNITED KINGDOM" 2008 2005
    "FRANCE" 2005 2005
    "SWEDEN" 2005 2005
    "UNITED STATES" . 2005
    "UNITED STATES" . 2005
    "UNITED STATES" . 2005
    "GERMANY" 2005 2005
    "UNITED STATES" . 2005
    "SWITZERLAND" . 2005
    "FINLAND" 2006 2005
    "UNITED STATES" . 2005
    "SPAIN" 2005 2005
    "CHILE" 2015 2005
    "UNITED STATES" . 2005
    "AUSTRALIA" 2005 2005
    "UNITED STATES" . 2005
    "UNITED STATES" . 2005
    "UNITED STATES" . 2005
    "UNITED STATES" . 2005
    "JAPAN" 2005 2005
    "FRANCE" 2005 2005
    "SWEDEN" 2005 2005
    "CANADA" 2005 2005
    "SWEDEN" 2005 2005
    "JAPAN" 2005 2005
    "UNITED STATES" . 2005
    "JAPAN" 2005 2005
    "GERMANY" 2005 2005
    "UNITED KINGDOM" 2008 2005
    "JAPAN" 2005 2005
    "CANADA" 2005 2005
    "UNITED STATES" . 2005
    "UNITED STATES" . 2005
    "UNITED KINGDOM" 2008 2005
    "UNITED KINGDOM" 2008 2005
    "NETHERLANDS" 2006 2005
    "UNITED STATES" . 2005
    "ITALY" 2007 2005
    "GERMANY" 2005 2005
    end

  • #2
    Code:
    by country, sort: gen treatment_group = !missing(Policy1Year)
    Note, however, that for a staggered DID, the variable treatment_group is not used in the analysis.

    Comment

    Working...
    X