Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: option problems with byhist (interlaced histogram)


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: option problems with byhist (interlaced histogram)
Date   Wed, 30 Nov 2011 12:24:14 +0100

On Tue, Nov 29, 2011 at 7:38 PM, Patricia Biedermann wrote:
>
> I want to produce an interlaced histogram with two variables:
> 1. Variable: 1= Case; 2=Control (binary)
>
> 2. Varialbe: 1=Agriculture, 2=Employment; 3=Business, and so on... (categorical)
>
> I tried this command:
>
> byhist occup, by(casecontrol) percent tw1(color(blue) lwidth(3)) tw2(color(red) lwidth(3))
<snip>
> (the important thing is that it has to be ONE GRAPH!)

A histogram is the wrong graph for such variables as your second
variable is not even an ordinal variable. For two categorical
variables I would look at Nick Cox's -spineplot-, which you can get by
typing in Stata -ssc install spineplot-.

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany


http://www.maartenbuis.nl
--------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index