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.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-.
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
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |