From | Giulio Rizzoli <[email protected]> |
To | [email protected] |
Subject | Re: st: how to recover data saved with tabstat ? |
Date | Sun, 12 Dec 2004 13:40:47 +0100 |
At 14:14 11/12/2004, you wrote:
In aggiunta alla email precedente, volendo usare tabstat, un modo pu� essere questoMany thanks to Orsini Coviello and Baum for their rapid response and many solutions.
gen group2 = .
gen proportion2 = .
qui tab trunk
local N = r(r)
tabstat trunk foreign , by(trunk) stat(mean) save
forv i = 1(1)`N' {
mat M = r(Stat`i')
scalar name = M[1,1]
scalar prop = M[1,2]
qui replace group2 = scalar(name) in `i'
qui replace proportion2 = scalar(prop) in `i'
}
l group* proportion* if group in 1/18
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |