Hello,
I would like to automate the creation of categorical variables in Stata. My data look like this
I would like to assign to each name (Durand, Lepetit etc.) a state following to two conditions (poste + rang) for each year in a new column.
For instance assistant + R1 = state A ; assistant + R2 = state B ; associé + R1 = state C etc.
Can I do this in Stata?
Thanks for your help!
I would like to automate the creation of categorical variables in Stata. My data look like this
nom | poste2011 | rang2011 | poste2012 | rang2012 |
Durand | assistant | R1 | assistant | R3 |
Lepetit | associé | R2 | associé | R2 |
Legrand | assistant | R3 | assistant | R2 |
Gros | assistant | R1 | assistant | R3 |
Maigre | associé | R2 | associé | R2 |
Dupuis | assistant | R3 | assistant | R2 |
For instance assistant + R1 = state A ; assistant + R2 = state B ; associé + R1 = state C etc.
Can I do this in Stata?
Thanks for your help!
Comment