Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: repeated time values within panel


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: repeated time values within panel
Date   Fri, 4 May 2007 17:46:29 +0100

On the face of it, your data don't qualify as 
panel data in Stata's sense. This is why -tsset- 
doesn't play. Hoping to use -tsfill- is thus 
out of the question. There isn't a fix for 
this. 

The only way you can get panel data is by 
ensuring that there is at most one observation
for each combination of panel identifier, 
which would require some kind of reduction, 
e.g. a -collapse- to mean, minimum, maximum
or some single number per month. 

Nick 
[email protected] 

Tobias Br�tsch
 
> I have a Problem with Tsset. I just tried with the link
> http://www.stata.com/support/faqs/data/repeatedtime.html
> But I cant find the solution.
> 
> I have the following dataset:
>             Firmname  Rec.        Rec_2      BNUM            
> Id    monthend
>  
> |-------------------------------------------------------------
> --------------
> -----------
>    1. |      ABB          4          2        ABN Amro        
>  1      15705
> |
>    2. |      ABB          3          5        BCV             
>  2      15644
> |
>    3. |      ABB          4          4        BNP Paribas     
>  3      15613
> |
>    4. |      ABB          4          4        BNP Paribas     
>  3      15674
> |
>    5. |      ABB          3          2        BNP Paribas     
>  3      15764
> |
>  
> |-------------------------------------------------------------
> --------------
> -----------
>    6. |      ABB          2          2        BNP Paribas     
>  3      15764
> 
> 
> It is a sample with stockrecommendations about 5 years. The variable
> monthend was generatet:
> 
> - Gen daily = date(datum,"dmy"
> - Egen monthend = eomd(daily)
> 
> The ID was generated:           
> 
>  egen Id= group( titelname BNUM)
> 
> 
> Now i have to Tsset my data:
> 
> - tsset Id  monthend
> 
> And then I get the "repeated time values within panel" - misstake.
> Of course there are repeated time values in my data, there are many
> observations about the same firm from the same broker in the 
> same month, or
> sometimes on the same day.
> 
> 
> . duplicates report  Id  monthend  gives me about 500 duplicates.
> 
> 
> How can I solve this problem? I cant delete all the 
> duplicates and I have to
> analyse the data for each month. I have to tsset my data, 
> because I want use
> tssfill after tsset.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index