Hi all
I want to generate a new variable (loc) that takes on its value from one of two str3 variables (tm or opp). This will be conditional on a dummy variable (home). So if home=1 take on the value of tm, otherwise, opp. I have scoured the internet and the Stata manual but I don't think my search terms are optimised to help me find what I'm looking for. Apologies if this has already been answered.
Any help would be greatly appreciated.
I want to generate a new variable (loc) that takes on its value from one of two str3 variables (tm or opp). This will be conditional on a dummy variable (home). So if home=1 take on the value of tm, otherwise, opp. I have scoured the internet and the Stata manual but I don't think my search terms are optimised to help me find what I'm looking for. Apologies if this has already been answered.
Any help would be greatly appreciated.

Comment