Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Maarten Buis <maartenlbuis@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
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/