Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: xtivreg2 singleton groups identification or definitions


From   "Shao,Diana" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: xtivreg2 singleton groups identification or definitions
Date   Wed, 26 Mar 2014 19:39:02 +0000

Hello all, 
I'm using the -xtivreg2- to run a regression that considers firm fixed effect and two-way cluster (firm year). So -xtivreg- seems to be a good choice. I have read through several posts on statalist that the singletons groups would be detected and not used in running xtivreg2.  One of the posts says "a singleton is a group in which there is only one observation". I use "xtset gvkey" on my data so I assume that a singleton group for my sample would be a firm that only enters the sample once. When running xtivreg2, stata says that 1592 singleton groups detected. But when I manually sort firm and then by firm: gen number=_N and count if number==1, stata reports 1406. I wonder if anyone knows how to explain this discrepancy between the counting of singleton groups. Did I understand the definition of singleton groups wrong? Or did I count in a wrong way? 
Or if anyone knows how to control for firm fixed effect and at the same time clustering both year and firm, that'd be greatly appreciated too. 
Many thanks to all of you. 
Anxiously waiting for replies, 
Diana Shao

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index