Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Drop observations of groups with gaps in their data

From   "Achmed Aldai" <>
Subject   st: Drop observations of groups with gaps in their data
Date   Fri, 03 Jun 2011 10:01:18 +0200


Below find an extract of my data set.

gvkey            year
1001            1985
1001            1986
1001            1987
1001            1990
1001            1991
1200            1986
1200            1987
1200            1988
1200            1989

I want to drop all the firms that have a gap in reporting (gvkey = firm code). This means that all firms which e.g. reported from 1985 to 1987 and then again from 1990 to 1991 have to be dropped. Those companies should completely be eliminated from the data set, meaning stata should drop all observations of this company. So in the end I am left with the companies that do not have any gaps in reporting.

Thank you

Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro!
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index