I have data on garden participation in a program from years 2004-2018. Gardens can have entered the program any year, and stayed in the program for any number of years..
Variables: Garden_Active_Year, where Year equals 2004-2018. Dummy variable for garden being active in that year (1=yes, 0=no)
Year_Started: first year garden was in the program
I wasn't able to dataex the variables for all years, but I have included the data for years 2004-2007 below.
Please let me know if you need any clarification for this.
Many thanks.
Variables: Garden_Active_Year, where Year equals 2004-2018. Dummy variable for garden being active in that year (1=yes, 0=no)
Year_Started: first year garden was in the program
I would like to make an indicator variable for gardens that entered the program, left the program at some point, and then came back.
For example, Garden_Active_2004=1, Garden_Active_2005=0, Garden_Active_2006=1, Garden_Active_2007=1.
For example, Garden_Active_2004=1, Garden_Active_2005=0, Garden_Active_2006=1, Garden_Active_2007=1.
I wasn't able to dataex the variables for all years, but I have included the data for years 2004-2007 below.
Please let me know if you need any clarification for this.
Many thanks.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float Garden_Active_2004 byte(Garden_Active_2005 Garden_Active_2006 Garden_Active_2007) float Year_Started 1 1 1 1 2004 1 0 0 0 2004 1 1 1 1 2004 1 1 1 1 2004 1 1 1 1 2004 1 0 1 1 2004 1 0 0 0 2004 1 1 0 0 2004 1 0 0 0 2004 1 0 1 1 2004 1 0 0 0 2004 1 0 0 0 2004 1 0 1 1 2004 1 1 1 1 2004 1 1 1 1 2004 1 1 0 0 2004 1 1 1 1 2004 1 0 0 1 2004 0 1 1 1 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 0 1 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 0 0 2005 0 1 0 0 2005 0 1 0 0 2005 0 1 0 0 2005 0 1 1 1 2005 0 1 1 0 2005 0 1 1 0 2005 0 1 1 0 2005 0 1 1 0 2005 0 1 0 0 2005 0 1 0 0 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 0 0 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 0 0 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 0 0 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 0 0 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 0 0 2005 0 1 1 0 2005 0 1 0 0 2005 0 1 0 0 2005 0 1 1 1 2005 1 1 1 1 2004 0 1 1 1 2005 0 1 1 1 2005 0 1 0 0 2005 0 1 1 0 2005 0 1 0 0 2005 0 1 1 0 2005 0 1 1 1 2005 0 1 0 0 2005 0 1 1 0 2005 0 1 0 1 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 0 0 2005 0 1 0 0 2005 0 1 0 0 2005 0 1 0 0 2005 0 1 0 0 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 0 0 2005 0 1 1 1 2005 0 1 0 0 2005 0 1 0 0 2005 0 1 1 1 2005 0 1 0 0 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 1 1 2005 0 1 0 1 2005 0 1 1 1 2005 0 1 1 0 2005 0 1 1 1 2005 0 0 1 0 2006 0 0 1 0 2006 0 0 1 1 2006 0 0 1 0 2006 0 0 1 0 2006 0 0 1 1 2006 0 0 1 1 2006 end
Comment