From | David Kantor <dkantor@jhu.edu> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: computing percentages |
Date | Wed, 28 Apr 2004 11:29:56 -0400 |
At 09:36 AM 4/28/2004 -0500, Mike Merten wrote:
I am using the following command:As Nick pointed out, you probably want to aggregate over the dataset or parts thereof, counting up and dividing (count of nonmetro) / (count of total) .
g nonmetro=hmsa_r==2
g total=hmsa_r==1 | hmsa_r==2 | hmsa_r==3
gen pnonmetro=nonmetro/total
I want the "pnonmetro" variable to be expressed in terms of percentage, from the resulting nonmetro/total. How do I do this?
Thanks,
[...]
© Copyright 1996–2023 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |