> --- Ali Khashan <[email protected]> wrote:
> > I need to see the effect of a binary exposure variable on the
> > distribution of birthweight. I expect that there is a shift in the
> > ditribution and want to show this shift by producing a histogram
> > which shows the distribution of exposed and unexposed seperately
> > but on the same plot.
--- Friedrich Huebler <[email protected]> wrote:
> Is this what you are looking for?
> . histogram birthweight, by(exposed)
Nice alternatives are:
*---------- begin example -------------
sysuse auto, clear
/*if you have many cases*/
twoway kdensity price if foreign == 1 || /*
*/ kdensity price if foreign == 0, /*
*/ legend(label(1 "foreign") label(2 "domestic"))
/*if you have few cases*/
dotplot price, over(foreign)
*----------- end example --------------
(For more on how to use examples I sent to the Statalist, see:
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )
Hope this helps,
Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
___________________________________________________________
Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/