I am working on a dataset with many dummy variables. What I want to achieve is egen a variable that captures the unique value of the different columns. For example,
| date | wt04 | wt09 | wt15 | wt17 | wt18 |
| 20040111 | |||||
| 20040112 | 1 | ||||
| 20040113 | 1 | ||||
| 20040114 | 1 | ||||
| 20040115 | 1 | 1 | |||
| 20040116 | 1 | ||||
| 20040117 | 1 | 1 | 1 | ||
| 20040208 | |||||
| 20040209 | 1 | ||||
| 20040210 | 1 | ||||
| 20040211 | 1 | ||||
| 20040212 | 1 | ||||
| 20040213 | 1 | ||||
| 20040214 | |||||
I would much appreciate it if anyone can help me with this.
Best,
0 Response to How I can egen a variable to capture the sum value of numbers in the different columns
Post a Comment