Statalist


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

RE: st: Re: multilevel graph about the distribution of means by country


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Re: multilevel graph about the distribution of means by country
Date   Tue, 12 May 2009 21:46:26 +0100

-bargap()- indeed nothing in your case. You have only one y variable --
in your case JS -- so there are no gaps for it to tune. 

You should look at -gap()- as a suboption of -over()-. 

In your case, 

... over(countries, gap(<whatever>)) 

This is all laid out in the help for -graph bar-. 

Nick 
n.j.cox@durham.ac.uk 

Andi Kopf

> Von: "Martin Weiss" <martin.weiss1@gmx.de>

Thanks, that works.
But, the gaps between the countries are very small, so I tried to
enlarge them by -bargap()-.
Unfortunetly it seems that this option doesn't change anything.
I used the command: graph hbar (mean) JS, bargap(100) over(countries)
ytitle("Job satisfaction") title("job satisfaction by countries") 

> drop _all
> set obs 30
> 
> //30 countries
> gen country=_n
> //100 observations per country
> expand 100
> 
> //get data whose means interest you
> sort country
> gen x=runiform()*4+rnormal()
> 
> //get graph
> graph hbar (mean) x, over(country)
> 

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index