I have a list of companies (id) and I want to identify the highperfomer (money = 5). Unfortunatly, not every company ist connected with the money status.
id | money |
1334 | 5 |
1334 | |
1334 | |
1334 | |
1445 | 4 |
1445 | |
1445 | |
1445 | |
1445 | |
1454 | 2 |
1454 | |
1454 | |
1460 | 5 |
1460 | |
1460 | |
1482 | 2 |
1482 | |
1485 | 5 |
1485 |
Code:
gen highperform =1 if money= 5
How can I tell stata, to generate the highperform =1 variable for every single company in which the money status is 5 ?
0 Response to Generate variable and fill up missing values
Post a Comment