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

RE: st: new: collapse2

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: new: collapse2
Date   Wed, 4 Aug 2004 17:24:22 +0100

I'd second Roger's warning but I'd usually 
want to check before the -collapse-. 
-duplicates- offers one way to approach this. 

[email protected] 

Roger Newson
> "Cheating" is probably the way to go, rather than adding a 
> superfluous id() 
> option. However, I would have typed:
> . collapse (sum) grams kcal fat, by(personid age gender 
> samput stratum psu)
> . by personid: assert _N==1
> That way, I would know that age, gender, samput, stratum and 
> psu really are 
> id variables for personid (because otherwise Stata would 
> complain and stop).

*   For searches and help try:

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