Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unbalanced panel data: How to handle gaps.

    I have panel data containing historical firm´s earnings from different quarters. Quarters are unbalanced. For example, both a firm with quarterly data between 1985 & 1996 and a firm that only has data between 2000 & 2008 will be included in the analysis. However, I want to only assess firms that have reported earnings (either positive or negative) for at least 12 quarters in a row. Suppose that I have one company with data between 2000-2004 and 2005-2006, then I want to drop all the observations of the 2005-2006 period. How to do so?
    Also, Let’s say that from this company, I also have data from 1980-1988 to 1996-2002. Is there a way to tell Stata to treat these different periods as three separate panels?

    My data:
    • Gvkey (firm identifier)
    • Qdate (quarterly date e.g. 1986q3)
    • NIQ (Quarterly figure net income/loss)
    Panel data is declared as follows:


    Thanks!

  • #2
    Click image for larger version

Name:	question gaps statalist.png
Views:	1
Size:	3.4 KB
ID:	1383432
    (attachment did not work)

    Comment


    • #3
      FAQs

      http://www.stata.com/support/faqs/da...ons/index.html on your question

      http://www.statalist.org/forums/help #12 on which attachments work (no screenshots please, just .png of Stata graphs)

      Comment


      • #4
        Thanks for your reply. I see you already provided a detailed instruction in the following thread: http://www.statalist.org/forums/foru...l-observations

        After using the tsspell I still have gaps within panels, so there are some firms that have multiple runs of 12 consecutive earnings reports. Do I need to specify these separate runs as separate panels, or shouldn't it cause a problem when I perform the analysis?


        Comment

        Working...
        X