Hi,
I have two string variables with non-formatted responses from a survey. These refer to the level of education on each parent. I would like to combine those two string variables into a numeric variable, where various strpos are combined into one number.
For example, looking at the data below (it's in Portuguese, sorry) I'd like to generate a new variable stating whether both parents had attended higher education or not. So I need to know:
1) How can I first convert the multiple strpos of each variable that might refer to HE into one number?
2) How could I then combine the same number of both parents into the new variable to represent both parents having attended HE?

I have two string variables with non-formatted responses from a survey. These refer to the level of education on each parent. I would like to combine those two string variables into a numeric variable, where various strpos are combined into one number.
For example, looking at the data below (it's in Portuguese, sorry) I'd like to generate a new variable stating whether both parents had attended higher education or not. So I need to know:
1) How can I first convert the multiple strpos of each variable that might refer to HE into one number?
2) How could I then combine the same number of both parents into the new variable to represent both parents having attended HE?

Comment