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
interaction vs stratification models-which one to optHi all I am doing one study to see the effect of Racim on oral health related quality of life (OHIP-…
Keeping subset of data using date variablePlease advise how I can keep a subset of data using "date variable": i.e. keeping data from 27 Feb 2…
GARCH modelDear all, i am facing issue in running GARCH (1,1)Model. iterations are repeated but show as (NOT CO…
Histogram with bin freq and % on yaxisDear Statalist, I want to generate Histogram Stata with percent option and want counts/freq of bins…
Events in IntervalsHi, I am attempting to count admissions that have occurred for an ID variable (IDV) that occur (ADat…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a 1-0 variable if any of a varlist has a value
Post a Comment