Announcement

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

  • Issue with csdid

    Im having a problem with csdid and estat event.

    My data looks like this

    id year y gvar
    110001 1996 0 0
    110001 1997 0 0
    110001 1998 0 0
    110001 1999 0 0
    110001 2000 0 0
    110001 2001 0 0
    110001 2002 0 0
    110001 2003 .11 0
    110001 2004 0 0
    110001 2005 0 0
    110001 2006 0 0
    110001 2007 .09993 0
    110001 2008 0 0
    110001 2009 0 0
    110001 2010 0 0
    110001 2011 0 0
    110001 2012 0 0
    110001 2013 0 0
    110001 2014 2014
    110001 2015 0 0
    110003 1996 0 0
    110003 1997 0 0
    110003 1998 0 0
    110003 1999 0 0
    110003 2000 0 0
    110003 2001 .41 0
    110003 2002 0 0
    110003 2003 0 0
    110003 2004 0 0
    110003 2005 0 0
    110003 2006 0 0
    110003 2007 0 0
    110003 2008 0 0
    110003 2009 0 0
    110003 2010 0 0
    110003 2011 0 0
    110003 2012 0 0
    110003 2013 0 0
    110003 2014 0 0
    110003 2015 0 0

    And my code is:
    csdid y, ivar(id) time(year) gvar(gvar)
    estat event

    My output is giving me the following :

    Difference-in-difference with Multiple Time Periods

    Number of obs = 0
    Outcome model : regression adjustment
    Treatment model: none

    Coefficient Std. err. z P>z [95% conf. interval]

    g2006
    t_1996_1997 0 (omitted)
    t_1997_1998 0 (omitted)
    t_1998_1999 0 (omitted)
    t_1999_2000 0 (omitted)
    t_2000_2001 0 (omitted)
    t_2001_2002 0 (omitted)
    t_2002_2003 0 (omitted)
    t_2003_2004 0 (omitted)
    t_2004_2005 0 (omitted)
    t_2005_2006 0 (omitted)
    t_2005_2007 0 (omitted)
    t_2005_2008 0 (omitted)
    t_2005_2009 0 (omitted)
    t_2005_2010 0 (omitted)
    t_2005_2011 0 (omitted)
    t_2005_2012 0 (omitted)
    t_2005_2013 0 (omitted)
    t_2005_2014 0 (omitted)
    t_2005_2015 0 (omitted)

    g2007
    t_1996_1997 0 (omitted)
    t_1997_1998 0 (omitted)
    t_1998_1999 0 (omitted)
    t_1999_2000 0 (omitted)
    t_2000_2001 0 (omitted)
    t_2001_2002 0 (omitted)
    t_2002_2003 0 (omitted)
    t_2003_2004 0 (omitted)
    t_2004_2005 0 (omitted)
    t_2005_2006 0 (omitted)
    t_2006_2007 0 (omitted)
    t_2006_2008 0 (omitted)
    t_2006_2009 0 (omitted)
    t_2006_2010 0 (omitted)
    t_2006_2011 0 (omitted)
    t_2006_2012 0 (omitted)
    t_2006_2013 0 (omitted)
    t_2006_2014 0 (omitted)
    t_2006_2015 0 (omitted)

    g2008
    t_1996_1997 0 (omitted)
    t_1997_1998 0 (omitted)
    t_1998_1999 0 (omitted)
    t_1999_2000 0 (omitted)
    t_2000_2001 0 (omitted)
    t_2001_2002 0 (omitted)
    t_2002_2003 0 (omitted)
    t_2003_2004 0 (omitted)
    t_2004_2005 0 (omitted)
    t_2005_2006 0 (omitted)
    t_2006_2007 0 (omitted)
    t_2007_2008 0 (omitted)
    t_2007_2009 0 (omitted)
    t_2007_2010 0 (omitted)
    t_2007_2011 0 (omitted)
    t_2007_2012 0 (omitted)
    t_2007_2013 0 (omitted)
    t_2007_2014 0 (omitted)
    t_2007_2015 0 (omitted)

    g2009
    t_1996_1997 0 (omitted)
    t_1997_1998 0 (omitted)
    t_1998_1999 0 (omitted)
    t_1999_2000 0 (omitted)
    t_2000_2001 0 (omitted)
    t_2001_2002 0 (omitted)
    t_2002_2003 0 (omitted)
    t_2003_2004 0 (omitted)
    t_2004_2005 0 (omitted)
    t_2005_2006 0 (omitted)
    t_2006_2007 0 (omitted)
    t_2007_2008 0 (omitted)
    t_2008_2009 0 (omitted)
    t_2008_2010 0 (omitted)
    t_2008_2011 0 (omitted)
    t_2008_2012 0 (omitted)
    t_2008_2013 0 (omitted)
    t_2008_2014 0 (omitted)
    t_2008_2015 0 (omitted)

    g2010
    t_1996_1997 0 (omitted)
    t_1997_1998 0 (omitted)
    t_1998_1999 0 (omitted)
    t_1999_2000 0 (omitted)
    t_2000_2001 0 (omitted)
    t_2001_2002 0 (omitted)
    t_2002_2003 0 (omitted)
    t_2003_2004 0 (omitted)
    t_2004_2005 0 (omitted)
    t_2005_2006 0 (omitted)
    t_2006_2007 0 (omitted)
    t_2007_2008 0 (omitted)
    t_2008_2009 0 (omitted)
    t_2009_2010 0 (omitted)
    t_2009_2011 0 (omitted)
    t_2009_2012 0 (omitted)
    t_2009_2013 0 (omitted)
    t_2009_2014 0 (omitted)
    t_2009_2015 0 (omitted)

    g2011
    t_1996_1997 0 (omitted)
    t_1997_1998 0 (omitted)
    t_1998_1999 0 (omitted)
    t_1999_2000 0 (omitted)
    t_2000_2001 0 (omitted)
    t_2001_2002 0 (omitted)
    t_2002_2003 0 (omitted)
    t_2003_2004 0 (omitted)
    t_2004_2005 0 (omitted)
    t_2005_2006 0 (omitted)
    t_2006_2007 0 (omitted)
    t_2007_2008 0 (omitted)
    t_2008_2009 0 (omitted)
    t_2009_2010 0 (omitted)
    t_2010_2011 0 (omitted)
    t_2010_2012 0 (omitted)
    t_2010_2013 0 (omitted)
    t_2010_2014 0 (omitted)
    t_2010_2015 0 (omitted)

    g2012
    t_1996_1997 0 (omitted)
    t_1997_1998 0 (omitted)
    t_1998_1999 0 (omitted)
    t_1999_2000 0 (omitted)
    t_2000_2001 0 (omitted)
    t_2001_2002 0 (omitted)
    t_2002_2003 0 (omitted)
    t_2003_2004 0 (omitted)
    t_2004_2005 0 (omitted)
    t_2005_2006 0 (omitted)
    t_2006_2007 0 (omitted)
    t_2007_2008 0 (omitted)
    t_2008_2009 0 (omitted)
    t_2009_2010 0 (omitted)
    t_2010_2011 0 (omitted)
    t_2011_2012 0 (omitted)
    t_2011_2013 0 (omitted)
    t_2011_2014 0 (omitted)
    t_2011_2015 0 (omitted)

    Control: Never Treated

    See Callaway and Sant'Anna (2021) for details
    ATT by Periods Before and After treatment
    Event Study:Dynamic effects
    csdid_event(): 3301 subscript invalid
    <istmt>: - function returned error
    r(3301);


    Anyone could help me with this? Thanks in advance.


  • #2
    Hi Alex
    the problem is that your Gvar is not correctly identified
    For your example
    if id = 110001, then gvar = 2014 ALWAYS, not only that year
    check how it looks in the example dataset

    Comment

    Working...
    X