I am fairly bad at Stata and it's been some time since I attended any econometrics class. I am trying to work out how to complete a DID analysis using the BRFSS data with geolocation data on farmers' markets around the USA by county-level. The BRFSS only provides county info till 2012 so I am using data from the years 2009-2012. Therefore I would like to test the effect of the farmers market on BMI by county-level.
I have created a dummy variable
Code:
egen fmktarea = max(anyfarmersmkt),by(countyid)
Code:
gen fmktreated = 0 replace fmktreated =1 if (numfarmersmkt>=1)
. dataex year bmi fmktarea fmktreated
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int year float(bmi fmktarea fmktreated) 2009 24.58 1 1 2009 28.09 1 1 2009 27.32 1 1 2009 29.11 1 1 2009 23.78 1 1 2009 23.54 1 1 2009 34.4 1 1 2009 22.36 1 1 2009 19.88 1 1 2009 30.45 1 1 2009 29.35 1 1 2009 27.51 1 1 2009 25.6 1 1 2009 20.59 1 1 2009 33.73 1 1 2009 23.96 1 1 2009 25.9 1 1 2009 44.72 1 1 2009 20.16 1 1 2009 20.41 1 1 2009 33.07 1 1 2009 22.91 1 1 2009 26.56 1 1 2009 42.77 1 1 2009 27.86 1 1 2009 29.1 1 1 2009 23.35 1 1 2009 26.64 1 1 2009 31.54 1 1 2009 35.85 1 1 2009 31.63 1 1 2009 23.85 1 1 2009 32.35 1 1 2009 25.9 1 1 2009 37.84 1 1 2009 33.36 1 1 2009 25.07 1 1 2009 26.31 1 1 2009 25.14 1 1 2009 45.01 1 1 2009 27.31 1 1 2009 25.9 1 1 2009 23.08 1 1 2009 24.38 1 1 2009 26.3 1 1 2009 33.37 1 1 2009 35.02 1 1 2009 21.68 1 1 2010 25.85 1 1 2010 28.27 1 1 2010 29.33 1 1 2010 25.29 1 1 2010 19.18 1 1 2010 31.39 1 1 2010 36.92 1 1 2010 25.82 1 1 2010 37.33 1 1 2010 26.22 1 1 2010 25.16 1 1 2010 39.66 1 1 2010 37.2 1 1 2010 21.59 1 1 2010 29.6 1 1 2010 26.68 1 1 2010 23.62 1 1 2010 24.38 1 1 2010 32.68 1 1 2010 25.88 1 1 2010 24.01 1 1 2010 25.07 1 1 2010 30.61 1 1 2010 25.88 1 1 2010 26.56 1 1 2010 23.35 1 1 2010 30.11 1 1 2010 31.06 1 1 2010 23.08 1 1 2010 27.5 1 1 2010 24.94 1 1 2010 36.7 1 1 2010 34.4 1 1 2010 28.65 1 1 2010 23.44 1 1 2010 23.46 1 1 2010 25.14 1 1 2010 20.27 1 1 2010 33.35 1 1 2010 41.63 1 1 2010 22.35 1 1 2010 28.38 1 1 2010 34.24 1 1 2010 21.57 1 1 2010 24.94 1 1 2010 22.64 1 1 2011 27.12 1 1 2011 27.34 1 1 2011 30.52 1 1 2011 31.47 1 1 2011 33.45 1 1 2011 24.33 1 1 end
Listed 100 out of 1327642 observations
Use the count() option to list more
.I am a bit lost on how to proceed with this analysis. Any help would be greatly appreciated.
0 Response to Difference-in-Difference with a series of cross section data*
Post a Comment