Hi all!
I am quite new in Stata and hoping anyone can help me!
I am working on a maternity survey and wondering if there is a way to convert 4 variables in my database into the values of a new variable?
E.g. I have 4 variables (yes/no): 1) midwife 2)physician 3)medical_doctor 4)obstetrician but I want to create a new variable (“Professional responsible for your maternity care” which has 4 different values: midwife, physician, medical doctor, obstetrician
Is this possible? Do I need to care a local macro? Loop?
Thank you so much!
Cristina
I am quite new in Stata and hoping anyone can help me!
I am working on a maternity survey and wondering if there is a way to convert 4 variables in my database into the values of a new variable?
E.g. I have 4 variables (yes/no): 1) midwife 2)physician 3)medical_doctor 4)obstetrician but I want to create a new variable (“Professional responsible for your maternity care” which has 4 different values: midwife, physician, medical doctor, obstetrician
Is this possible? Do I need to care a local macro? Loop?
Thank you so much!
Cristina
Comment