[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Quick display of categorical data

From   Martin Weiss <>
Subject   Re: st: Quick display of categorical data
Date   Thu, 26 Jun 2008 19:28:02 +0200

Try this:

sysuse auto, clear
foreach var of varlist rep78 for{
ta `var'
inspect `var'

Admittedly quick and dirty...

Zitat von "Michael I. Lichter" <MLichter@Buffalo.EDU>:

Hi. I have what ought to be a common problem: I'm beginning to analyze
some survey data, and much of the data consists of responses to
questions on a 1-5 scale, a few responses on a 1-3 scale, and a few
responses to limited nominal scales. I have too many cases (1,000+) to
learn anything from a stemplot (although I suppose I could sample 1/10
of the cases for this purpose), which isn't meant for categorical data
anyway, and it's way, way too cumbersome to individually create and
print bar charts using Stata graphics (unless there's something I don't
know about how to do this, which is likely). Ideally, what I'd like is
a display something like this:

Some inter |
esting var |
     iable |      Freq.     Percent        Cum.
------------+-----------------------------------         Never, ever |
      315       30.79       30.79        30 X           X
Maybe once |        204       19.94       50.73           X           X
Occasionlly |        149       14.57       65.30        20 X  X        X
Pretty oftn |         55        5.38       70.67           X  X  X     X
   Always! |        300       29.33      100.00        10 X  X  X     X
------------+-----------------------------------           X  X  X  X  X
     Total |      1,023      100.00                       1  2  3  4  5

I would happily settle for just the ASCII bar chart, and a horizontal
bar would be fine. The point is to be able to get a sense of the data
at a glance, without wasting a bunch of paper. Does anything exist
along these lines? Am I overlooking something really obvious? My search
didn't reveal anything ... Thanks in advance.

Michael Lichter, Ph.D.
Wandering Research Analyst
Buffalo, NY

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index