generate new variable

  1. D

    Generate a variable

    Hello Everyone, I am fairly new to STATA and want to generate a new variable that captures the number of active members in a household. How do i please do it in STATA? Thanks.
  2. S

    Generating segregation variable

    Hey guys. I know this is really simple, I just can't figure it out and it's bugging me! So I have two variables: one is school ID (arbitrary number that functions as ID variable) and a dummy variable that shows if the children has 0 both parents native or 1 one or both parents imigrants...
  3. M

    Generate a variable based on 3 dummy variables

    Hi all, I have: HIV 1= Positive 0= Negative Syphilis 1= Positive 0= Negative Gonorrhea 1= Positive 0= Negative I want a to create STI 1=HIV 2=Syphilis 3=Gonnorrhea I tried: gen sti=. replace sti =1 if HIV==1 replace sti =2 if Syphilis ==1 replace sti =3 if...