So here's my trouble: I'd like to reshape a long-format data file to wide. However, I don't have a unique "j" variable; each record in the long-format file has several key variables.
For example, I'd like to take this:
| caseid | gender | age | relationship to respondent|
|---------------------------------------------------|
| 1234 | F | 89 | mother |
| 1234 | F | 10 | daughter |
| 1235 | M | 15 | cousin |
etc
and turn it into this:
|caseid | gender1 | age1 | rel1 | gender2 | age2 | rel2 |
|--------------------------------------------------------------|
| 1234 | F | 89 | mother| F | 10 | daughter|
| 1235 | M | 15 | cousin| . | . | . |
etc
However, the data lack the suffix variable necessary for the reshape command. Is there a way that Stata will automatically generate this suffix?