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

st: RE: -robust cluster()- with an -if-

From   "Nick Cox" <>
To   <>
Subject   st: RE: -robust cluster()- with an -if-
Date   Fri, 17 Sep 2004 15:37:17 +0100

In general an -if- condition in Stata means 
that all observations not meeting 
that condition are ignored, absolutely. 

There is no question of anything superseding anything 
else, or vice versa. 


Hixson, Eric
> I am using the -robust cluster()- option with -logit- to 
> address lack of independence of observations.  My question 
> has to do with how Stata performs the operation when an -if- 
> statement is also included.
> I have a dataset composed of subjects (id) that may have 
> multiple observations.  For each observation, the subject 
> could have one of two levels of a certain characteristic 
> (type = 0/1).  
> If I specify "logit outcome var2 if type==1, robust 
> cluster(id)", would observations for a given subject where 
> type==0 be included in the determination of the robust 
> standard errors [per the -cluster(id) statement] or would the 
> sample first be limited by the -if type==1- before any 
> modeling is done?
> In other words, does -if- supercede -cluster()- or visa 
> versa?  If this should be obvious, go easy on the caning and 
> I'll keep reading!

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index