Dear Statlists
I am working on R&D investment of Panel data of more than 2900 firms and study period is 2005-2015. Problem is that most of the firms have not R&D observations. I want to keep only those firms which have at least on year observation of R&D, and all the remaining one I want to delete form sample. For example, company 2 has no observation for R&D, so it must be deleted. how can I do that?
input int(year id) RDinv
2004 2 .
2005 2 .
2006 2 .
2007 2 .
2008 2 .
2009 2 .
2010 2 .
2011 2 .
2012 2 .
2013 2 .
2014 2 .
2015 2 .
2004 3 .
2005 3 .
2006 3 .
2007 3 .
2008 3 .
2009 3 .
2010 3 5767031.08
2011 3 2952345.13
2012 3 2460888.19
2013 3 1936084.84
2014 3 2439346.8
2015 3 4265023.32
I am working on R&D investment of Panel data of more than 2900 firms and study period is 2005-2015. Problem is that most of the firms have not R&D observations. I want to keep only those firms which have at least on year observation of R&D, and all the remaining one I want to delete form sample. For example, company 2 has no observation for R&D, so it must be deleted. how can I do that?
input int(year id) RDinv
2004 2 .
2005 2 .
2006 2 .
2007 2 .
2008 2 .
2009 2 .
2010 2 .
2011 2 .
2012 2 .
2013 2 .
2014 2 .
2015 2 .
2004 3 .
2005 3 .
2006 3 .
2007 3 .
2008 3 .
2009 3 .
2010 3 5767031.08
2011 3 2952345.13
2012 3 2460888.19
2013 3 1936084.84
2014 3 2439346.8
2015 3 4265023.32
Comment