Statalist


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

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


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: multilevel graph about the distribution of means by country
Date   Mon, 11 May 2009 23:47:33 +0200

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)

HTH
Martin
_______________
----- Original Message ----- From: "Andi Kopf" <andik79@web.de>
To: <statalist@hsphsun2.harvard.edu>
Sent: Monday, May 11, 2009 7:34 PM
Subject: st: multilevel graph about the distribution of means by country


Hi Everybody,
I have got some difficulties with drawing a graph about the distribution of means of
a dependent ordinal variable in 30 countries.
I would like to have a graph which looks similar to a histogram. The y-axis should be the dependent variable and the x-axis should display the means of this variable for these countries. The graph should show how the means of the variable are distributed across countries.

Greetings, Andi
*
*   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/


*
*   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