Hi everyone,
Happy new year!
I have a question relating to identifying a specific response option from a list of possible responses. The specific question asks respondents to choose from a list of fields of study. There are around 15 options and respondents are asked to select all that apply to them (e.g. science, law, management, economics etc).
I need to create an indicator variable which equals 1 if a respondent has studied economics (among other fields). Is there a simple way to identify if the field of economics is chosen? Since respondents can select multiple fields, and they appear in string format, it's a bit tricky to single out those who have studied economics (for those who have selected multiple fields). I'm typically looking for a command where I can generate a variable that equals one if economics appears anywhere in the response).
These are some example responses:
1. Agriculture, environment studies, economics
2. Economics, management, accounting
3. Business studies, accounting, economics
4. Natural and physical sciences
5. Management, information technology
I need to generate a variable that would equal one for the first three responses, where the field economics is chosen.
Thank you very much,
Ashani.
Happy new year!
I have a question relating to identifying a specific response option from a list of possible responses. The specific question asks respondents to choose from a list of fields of study. There are around 15 options and respondents are asked to select all that apply to them (e.g. science, law, management, economics etc).
I need to create an indicator variable which equals 1 if a respondent has studied economics (among other fields). Is there a simple way to identify if the field of economics is chosen? Since respondents can select multiple fields, and they appear in string format, it's a bit tricky to single out those who have studied economics (for those who have selected multiple fields). I'm typically looking for a command where I can generate a variable that equals one if economics appears anywhere in the response).
These are some example responses:
1. Agriculture, environment studies, economics
2. Economics, management, accounting
3. Business studies, accounting, economics
4. Natural and physical sciences
5. Management, information technology
I need to generate a variable that would equal one for the first three responses, where the field economics is chosen.
Thank you very much,
Ashani.
Comment