[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: computing percentages
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
g total=hmsa_r==1 | hmsa_r==2 | hmsa_r==3
I want the "pnonmetro" variable to be expressed in terms of percentage,
from the resulting nonmetro/total. How do I do this?
But note that pnonmetro is valued either 0, 1, or missing. If you take its
mean (-sum pnonmetro-), I believe the result will be the same as the
quotient of counts as above.
(I've left off the factor of 100 -- a cosmetic change.)
I hope this helps.
Institute for Policy Studies
Johns Hopkins University
* For searches and help try: