From | Roger Newson <[email protected]> |
To | [email protected] |
Subject | Re: st: new: collapse2 |
Date | Wed, 04 Aug 2004 16:50:14 +0100 |
At 16:19 04/08/2004, Dan Blanchette wrote:
How about adding an option to save id variables during the -collapse-?"Cheating" is probably the way to go, rather than adding a superfluous id() option. However, I would have typed:
It would be great if you could do this:
. collapse2 (sum) grams kcal fat , by(personid) id(age gender sampwt stratum psu)
because age, gender etc do not vary within a person's set of observations.
I've been cheating -collapse- to get the same result by doing:
. collapse (sum) grams kcal fat , by(age gender sampwt stratum psu personid)
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |