Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: horizontal graphic


From   "Maarten Buis" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: horizontal graphic
Date   Tue, 4 Jul 2006 17:29:15 +0200

sysuse auto, clear
collapse (mean) mean = mpg (p5) lband = mpg (p95) upband = mpg, by(rep)
twoway scatter rep mean || rcap lb up rep, hor xline(20)

i.e. to add a vertical line to represent mean is 20, you add the option xline(20)

HTH,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214 

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of stata_user stata_user
Sent: dinsdag 4 juli 2006 16:53
To: [email protected]
Subject: RE: st: RE: horizontal graphic

Thanks Scott,
Yes this what I was looking for
How  can I add a vertical line represnting a fixed value of the mean? for
example mean==2
Thanks
Sami

>From: "Scott Merryman" <[email protected]>
>Reply-To: [email protected]
>To: <[email protected]>
>Subject: st: RE: horizontal graphic
>Date: Tue, 4 Jul 2006 09:08:37 -0500
>
>Do you mean something like this?
>
>sysuse auto, clear
>collapse (mean) mean = mpg (p5) lband = mpg (p95) upband = mpg, by(rep)
>twoway scatter rep mean || rcap lb up rep, hor
>
>
>Scott
>
> > -----Original Message-----
> > From: [email protected] [mailto:owner-
> > [email protected]] On Behalf Of stata_user stata_user
> > Sent: Tuesday, July 04, 2006 8:07 AM
> > To: [email protected]
> > Subject: st: horizontal graphic
> >
> > Hi,
> > I have data set with mean values (mean) and lower (Lband) and upper bond
> > (Uband) of confidence interval
> > for each category of Xvar (6 categories)
> >
> > The follwing bellow, produces a graphic for the means and confidence
> > interval, vertical: Xvar is in the X axis
> >
> > How can I produce the same graphic with Xvar in the yaxis like for
> > horizontal box plot?
> >
> > Thanks for any comments
> >
> > Sami
> >
> >
> > twoway                                                 ///
> > (connected Mean  Xvar)                          ///
> > (rcap Lband Uband Xvar)
> >
>
>
>*
>*   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/

_________________________________________________________________
The new MSN Search Toolbar now includes Desktop search!
http://join.msn.com/toolbar/overview

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

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index