Hello everyone,
I am a new user to Statalist and have tried to adhere to the forum guidelines. This has been a tremendously helpful forum for me over the years and so I thank you for all of your help.
I have a problem reshaping my panel data. My data looks like this:
I would like to have the ID still in the same format but the Indicators as columns and current Columns (which are quarterly dates) where the Indicator variables are. Something like:
The closest I got was using this command: reshape long q, i(name indicator) j(date) string
But that is still wrong as then it puts the dates AND the indicators as two single columns (instead of putting the indicators across the top as separate columns).
Any help would be great appreciated!
Thank you kindly.
Roger
I am a new user to Statalist and have tried to adhere to the forum guidelines. This has been a tremendously helpful forum for me over the years and so I thank you for all of your help.
I have a problem reshaping my panel data. My data looks like this:
ID | Indicator | q1_2006 | q2_2006 | q3_2006 |
1 | Board meetings | 4 | 6 | 7 |
1 | Environmental score | 8 | 9 | 9 |
1 | Social score | 1 | 1 | 4 |
... | ... | ... | ... | ... |
8 | Board meetings | 7 | 1 | 8 |
8 | Environmental score | 8 | 5 | 6 |
8 | Social score | 4 | 3 | 4 |
ID | Date | Board meetings | Environmental score | Social score |
1 | q1_2006 | |||
1 | q2_2006 | |||
1 | q3_2006 | |||
... | ... | ... | ... | ... |
8 | q1_2006 | |||
8 | q2_2006 | |||
8 | q3_2006 |
But that is still wrong as then it puts the dates AND the indicators as two single columns (instead of putting the indicators across the top as separate columns).
Any help would be great appreciated!
Thank you kindly.
Roger
Comment