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
export extra statistics from ado file (with different formats)Dear All, A new/useful -xthenreg- command (forthcoming in Stata Journal) can be downloaded here (or …
Unconditional quantile regression with fixed effectsHello, Can you please help me with the following: I want to run an unconditional quantile regressi…
Error: data not sorted, even though I have sorted themHello, I am working on a project where I want to study how inheritances affect labour supply of rec…
Panel regression with time dummiesHi, I've just done a fixed effect and random effect regression with time dummies for both, and the …
IV when there is an interaction term including the endogenous variableHi, I have a regression of 'reg Y X1 X2 X1 X2 controls' and X1 is endogenous. When I use ivreg I d…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a 1-0 variable if any of a varlist has a value
Post a Comment