I have a panel dataset with an unequal number of observations per company. In other words, some companies might show up in the data five times and others might show up 11 times. I have 11 years total. Here is a sample of what I have:
Company rank13 rank 12 rank11 rank10
A 1 . . .
A . 1 . .
B . . . 2
I would like to create one observation for each company with all ranks. For example:
Company rank13 rank12 rank11 rank10
A 1 2 . .
B . . . 2
I have tried to do this with the -reshape- command, but I can't get it to do what I want. I have also searched Google and Statalist, but haven't been able to find anything that applies.
Thank you advance for your help.
Company rank13 rank 12 rank11 rank10
A 1 . . .
A . 1 . .
B . . . 2
I would like to create one observation for each company with all ranks. For example:
Company rank13 rank12 rank11 rank10
A 1 2 . .
B . . . 2
I have tried to do this with the -reshape- command, but I can't get it to do what I want. I have also searched Google and Statalist, but haven't been able to find anything that applies.
Thank you advance for your help.
Comment