Dear all,

I am using the Behavioral Risk Factor and Surveillance System Data (BRFSS) from 2011 to 2017.

I would like to employ a difference-in-differences estimation approach. For a graphical analysis I would like to compute averages over time across the treatment group and control group. In particular, I would like to create a graph to examine whether there are parallel trends during the pre-treatment period and to examine what happens after the treatment in both groups.

Without survey data, the appropriate commands would be

collapse (mean) y, by(treatment year)

twoway connected y year, by(treatment)

y: dependent variable

treatment: treatment group dummy variable

year: year variable

However, the BRFSS is a compley survey that uses stratification, clustering and weights for sampling.

This is why I use the following svyset command in Stata.

svyset [pweight=_llcpwt], strata(_ststr) psu(_psu)

My question is now. How can I produce collapsed data to graphically show the development in the unconditional mean of y over time and groups? It would also be great to produce confidence intervals for these graphs.

I would be very glad if you could help me. I could not find a response to my answer. I have seen papers that use the BRFSS data and produce these graphs but I do not know how they did that.

Thank you very much!

Catherine

I am using the Behavioral Risk Factor and Surveillance System Data (BRFSS) from 2011 to 2017.

I would like to employ a difference-in-differences estimation approach. For a graphical analysis I would like to compute averages over time across the treatment group and control group. In particular, I would like to create a graph to examine whether there are parallel trends during the pre-treatment period and to examine what happens after the treatment in both groups.

Without survey data, the appropriate commands would be

collapse (mean) y, by(treatment year)

twoway connected y year, by(treatment)

y: dependent variable

treatment: treatment group dummy variable

year: year variable

However, the BRFSS is a compley survey that uses stratification, clustering and weights for sampling.

This is why I use the following svyset command in Stata.

svyset [pweight=_llcpwt], strata(_ststr) psu(_psu)

My question is now. How can I produce collapsed data to graphically show the development in the unconditional mean of y over time and groups? It would also be great to produce confidence intervals for these graphs.

I would be very glad if you could help me. I could not find a response to my answer. I have seen papers that use the BRFSS data and produce these graphs but I do not know how they did that.

Thank you very much!

Catherine

## Comment