Statalist The Stata Listserver


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

st: repeated time values within panel


From   Tobias Br�tsch <[email protected]>
To   <[email protected]>
Subject   st: repeated time values within panel
Date   Thu, 3 May 2007 08:36:01 +0200

Dear Statalist

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.

Many thanks

Tobias



*
*   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