[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: Frequencies and string variables
At 08:42 24/02/04 -0500, W. Robert Newberry wrote:
Here's a dumb newbie question: how do I generate frequencies of string
The -tabulate- command will do this, if you only want your frequencies and
percentages to be displayed, and not saved.
What I have is data with gender coded as "M" or "F", and I want to know
the relative frequencies. Were I in SAS, I'd use Proc Freq, but the same
approach doesn't seem to worth with Stata. A little help, please?
You do not say what version of Stata you have. However, if it is Stata 8,
then the nearest equivalent to -proc freq- is the -xcontract- package,
downloadable from SSC. This allows the user to list frequencies and
percentages and/or save them in an output data set, just like -proc freq-.
To find out more, type
ssc desc xcontract
in Web-aware Stata. The -xcollapse- package is also downloadable from SSC,
and does a similar job to -proc means- or -proc summary- in SAS.
I hope this helps.
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
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
Opinions expressed are those of the author, not the institution.
* For searches and help try: