transforming variable into log makes some values missing where the variable is showing zero for a county in a specific year. I'm running synthetic difference in difference regression. And, if the dependent variable is missing observation , in that case SDID doesn't run. I'm giving the data sample and code below. Here, I'm transforming the work variable to ln_work variable. This ln_work is my dependent variable.
Can anyone tell me how I can transform the log value so that the missing observation doesn't show up and I can successfully run SDID.
Can anyone tell me how I can transform the log value so that the missing observation doesn't show up and I can successfully run SDID.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float county int(year work) float(ln_work met) 12003 2017 0 . 0 12013 2008 0 . 0 12013 2009 0 . 0 12013 2010 0 . 0 12013 2011 0 . 0 12013 2012 0 . 0 12013 2013 0 . 0 12029 2019 0 . 0 12037 2018 0 . 0 12041 2001 0 . 0 12041 2003 0 . 0 12041 2007 0 . 1 12041 2009 0 . 1 12041 2010 0 . 1 10001 2000 53 3.970292 0 10001 2001 55 4.0073333 0 10001 2002 59 4.0775375 0 10001 2003 51 3.9318256 0 10001 2004 53 3.970292 0 10001 2005 40 3.6888795 0 10001 2006 68 4.2195077 1 10001 2007 58 4.060443 1 10001 2008 45 3.8066626 1 12003 2014 7 1.94591 0 12003 2015 7 1.94591 0 12003 2016 12 2.484907 0 end
Code:
ssc install sdid sdid ln_work county year met , vce(bootstrap) seed(100)
Comment