Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: xtlogit, excluding individuals with few obs


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: xtlogit, excluding individuals with few obs
Date   Wed, 28 Sep 2005 10:27:55 +0100

I can't speak for STATA. In Stata this sounds like 

. bysort id : drop if _N < 4

Nick
[email protected] 

Dirk Nachbar (modulo deprecated HTML) 

I want to run xtlogit with many explanatory variables, but some individuals have only few observations. Now I need to find a neat way to exclude those which have few obs. In pseudocode this would be 
for id=1 to 10000 
drop rows(id) if numobs(id)<4 
end 
But how do I do this is STATA?

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