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

Re: st: storing summ results in a .dta file


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: storing summ results in a .dta file
Date   Wed, 15 Jan 2003 16:40:52 +0000

At 09:48 15/01/03 -0600, Rajiv wrote:
I run the following code and use summ to summerize. However, I want to save values (15 values for each) of summ c*, summ c* if good==1, summ c* if good==0 in a separate Stata .dta file. How would I append/modify my code to do this? Thank you for your help.

Rajiv

code
-----------------
clear
set mem 104m
use "c:\raj\clm\temp.dta", clear

forv i=1/15 {
g c`i' = coef`i' * new12
}
summ c*
summ c* if good==1
summ c* if good==0
Use the official Stata -statsby- command. Once you have sorted your data by -good-, you can use -statsby- to create a data set with 1 obs per level of -good- and one obs for the combination of all levels. See -[R] statsby- in the Reference Manual and/or the on-line -help statsby-.

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