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" <[email protected]>
To   <[email protected]>
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 
[email protected] 

Andi Kopf

> Von: "Martin Weiss" <[email protected]>

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