[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: new: collapse2
I'd second Roger's warning but I'd usually
want to check before the -collapse-.
-duplicates- offers one way to approach this.
> "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: