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!
Related Posts with Generating a 1-0 variable if any of a varlist has a value
gmm estimate parametersI have drawn a random bivariate normal distribution. matrix m1 = (1,0) matrix c1 = (41, -22 \ -22, …
Need Help With 3 level model with interactions ( - mixed- using Stata 15) I am working on a research project that predicts that country-level variables will predict individu…
model with crossed random effectsHi all, I am working on a study of grant applications and selections. I have about 8 years worth of …
pwcompare does not generate letters for the groupHi, I am running the mlogit model and using the pwcomapre would like to compare the margins. The out…
Modified Herfindahl–Hirschman (MHHI) Calculation*Dear all, I am new to STATA and tried to calculate a measure that captures the ownership concentrat…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a 1-0 variable if any of a varlist has a value
Post a Comment