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

Re: st: Saved Results by Group


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: Saved Results by Group
Date   Tue, 06 Aug 2002 21:47:38 +0100

At 16:25 06/08/02 -0400, Dan Pregibon wrote:
Dear Statalisters,

Suppose I am summarizing survival data with the command "stsum, by(group)" and would like to store particular results of each group in a new variable I have generated. The stored result "r(p50)", for example, will give me the 50th percentile of the total set. Is there a stored result for the 50th percentile of just group 1 or group 2?
No, there isn't. You need to use the -statsby- command of official Stata to store the results of an analysis for multiple by-groups in a data set with 1 observation per by-group. See -help statsby- online or -[R] statsby- in the manuals.

If you are doing analyses with by-groups using estimation commands such as -stcox-, rather than r-class commands such as -sumby-, you can use either -statsby- (to generate a data set with 1 observation per by-group) or -parmby- (to generate a data set with 1 observation per parameter per by-group and data on confidence limits, P-values and other things). -parmby- is part of the -parmest- package, which you can download from SSC. Type -ssc describe parmest- in Web-aware Stata to find out more.

I hope this helps.

Roger


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]

Opinions expressed are those of the author, not the institution.

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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