Hi,
I would like to create a new variable that will have a unique values depending on the combination of two of my variables (i.e. I want a new variable at the intersection of my two existing variables). More specifically, I want to combine my Gender variable that is equal to 1 if male and 2 if female and I my Year of Labour Market entry variable that takes values from 1978 to 2011 into a new variable so I can then use this new variable for standard error clustering. I wanted to ask whether there is a quick way of telling Stata to do this rather than typing all possible combinations of the two variables and hence avoiding the risk of making a mistake.
Thanks in advance.
I would like to create a new variable that will have a unique values depending on the combination of two of my variables (i.e. I want a new variable at the intersection of my two existing variables). More specifically, I want to combine my Gender variable that is equal to 1 if male and 2 if female and I my Year of Labour Market entry variable that takes values from 1978 to 2011 into a new variable so I can then use this new variable for standard error clustering. I wanted to ask whether there is a quick way of telling Stata to do this rather than typing all possible combinations of the two variables and hence avoiding the risk of making a mistake.
Thanks in advance.
Comment