Hello ! I have a database where I need to create a new binary variable based on the values of 2 already existing variables. The 2 already existing variables that interests me are A (what is your profession) and B (what is the sector you're working in) because they help me identifying the professions of people interviewed. For the new variable I want to create, I want to select only people working on the transport sector starting from responses given in A and B. The new variable is going to be called Transport with 1 if they work on this sector and 0 if they don't.
In A : I have a subset of values that is certain that I want to assign 1 in my new variable
while I have another subset that I want to condition to the responses given in B.
Could the egen & cond() commands help me ? Thanks !
In A : I have a subset of values that is certain that I want to assign 1 in my new variable
while I have another subset that I want to condition to the responses given in B.
Could the egen & cond() commands help me ? Thanks !
Comment