Hi everyone,
First I would like to appologize in case this question was posted before.
I have data in the form:
and I want to generate a new variable that picks Var1, search for the same value in Var2 and equals Var3. It should end up like this:
Is there any way to do this?
Thanks in advance
First I would like to appologize in case this question was posted before.
I have data in the form:
Var1 | Var2 | Var3 |
A | A | 1 |
A | B | 2 |
A | C | 3 |
B | D | 4 |
B | E | 5 |
... | ... | ... |
and I want to generate a new variable that picks Var1, search for the same value in Var2 and equals Var3. It should end up like this:
Var1 | Var2 | Var3 | Var4 |
A | A | 1 | 1 |
A | B | 2 | 1 |
A | C | 3 | 1 |
B | D | 4 | 2 |
B | E | 5 | 2 |
... | ... | ... | ... |
Is there any way to do this?
Thanks in advance
Comment