Hi All,
I have a dataset that has the following format
As you can see companies can have multiple values at the same period (as they are rated by 2 different agencies). The problem then arises that when I use xtset to define my panel data it throws the "repeated time values within panel". I wish to cluster errors by company and so I define the panel data set using "xtset CompanyID Date". Is there a way I can get round the error?
I wish to distinguish between the two entries that stata perceives as the same (i.e. but isnt as the dummy variables differentiate between them) but still cluster errors bases on company (using company id). Do I need to create a new id? (will this lose clustering by company?)
Any help would be appreciated.
Laurence
I have a dataset that has the following format
Company | Dependent var | Independent vars | Company ID | Date | Rating agency 1 dummy | Rating agency 2 dummy |
A | Values | Values | 1 | 01/01/2015 | 0 | 1 |
A | Values | Values | 1 | 01/01/2015 | 1 | 0 |
A | Values | Values | 1 | 01/01/2014 | 1 | 0 |
B | Values | Values | 2 | 01/01/2015 | 0 | 1 |
B | Values | Values | 2 | 01/01/2014 | 0 | 1 |
I wish to distinguish between the two entries that stata perceives as the same (i.e. but isnt as the dummy variables differentiate between them) but still cluster errors bases on company (using company id). Do I need to create a new id? (will this lose clustering by company?)
Any help would be appreciated.
Laurence
Comment