I am trying to create combinations of two variables for each observation of varA and each observation of varB, and for varA matching varB from the original set of variables (TABLE #1), 1 is assigned (as seen in TABLE #2), but for each varA not matching varB in TABLE #1, 0 is assigned as in TABLE #2. Please see the example below:
TABLE #1
Variable | varA | varB |
1. | Br | Ba |
2. | Na | Cl |
Variable | varA | varB | NewVar |
1. | Br | Ba | 1 |
2. | Br | Cl | 0 |
3. | Na | Ba | 0 |
4. | Na | Cl | 1 |
0 Response to Combinations/Likelihoods
Post a Comment