Hi~ I have a question about extending a unbalanced panel into a balanced monthly panel:
I have a panel data which have a structure looks like the following:
Different individuals may have different numbers of records. Therefore it's an unbalanced panel.
I need to construct a balanced monthly panel out of the above information. More precisely, I need a data structure looks like the following:
Note that: (1) in month 1 and 6, there are multiple wage records and I need to sum up the wages for these months. (2) For month 11 and 12, there is no records, so the wage is 0.
I have no idea how to create such a balanced panel with STATA. Could anyone give some advice? Your help is very much appreciated !
I have a panel data which have a structure looks like the following:
id | starting date | ending date | monthly wage |
001 | 19990101 | 19990115 | 400 |
001 | 19990116 | 19990605 | 800 |
001 | 19990606 | 19991031 | 1000 |
I need to construct a balanced monthly panel out of the above information. More precisely, I need a data structure looks like the following:
id | year | month | monthly wage |
001 | 1999 | 1 | 400+800 |
001 | 1999 | 2 | 800 |
001 | 1999 | 3 | 800 |
001 | 1999 | 4 | 800 |
001 | 1999 | 5 | 800 |
001 | 1999 | 6 | 800+1000 |
001 | 1999 | 7 | 1000 |
001 | 1999 | 8 | 1000 |
001 | 1999 | 9 | 1000 |
001 | 1999 | 10 | 1000 |
001 | 1999 | 11 | 0 |
001 | 1999 | 12 | 0 |
I have no idea how to create such a balanced panel with STATA. Could anyone give some advice? Your help is very much appreciated !
Comment