Hello,

I have a dataset that includes data from a baseline survey, post-intervention survey, and one-year post-intervention survey, with one observation per participant and the survey variables all named according to the time period (i.e. pre_* for baseline, post_* for post-intervention, follow_* for one-year post-intervention). Missing values are coded "."

I'm trying to create a variable that indicates whether any answers were submitted for a given survey (e.g., survey1 = 1 if any pre_* questions answered, 0 otherwise; survey2 = 1 if any post_* questions answered, 0 otherwise; survey3 = 1 if any follow_* questions answered, 0 otherwise). Does anyone have any advice on how I could do so?

Thanks!