Statalist


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

RE: st: RE: old question, new solutions?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: old question, new solutions?
Date   Tue, 17 Nov 2009 11:21:55 -0000

George seemed a bit open to a range of plots under this heading, so I
broadened the topic a bit. Besides, the thread is as usual open to
widening comments of standard form: 

1. You mentioned that, but you may also be interested in this other
thing. 

2. You are using that, but you would be better off doing this other
thing. 

3. Other people interested in this thread may want to know of this other
thing too. 

4. Look at me! I am a clever guy, and I wrote something very marginally
related to this topic. 

That aside: 

-serrbar- plots whatever you feed to it, so could show sd, se or
anything else as +/- bars. 

-stripplot- plots (in this context) se-based intervals. 68% intervals,
or whatever, could be chosen therefore. 

Clearly, there are lots of (excellent) alternatives. 

Nick 
[email protected] 

Austin Nichols

Nick--
Do the proposed solutions offer graphing bars +/- some number of
standard deviations around the mean, rather than standard errors?  I
would think -vioplot- from SSC would be a better choice than either
what the poster requests or a boxplot, but you could also adapt this
approach for SDs:

sysuse auto, clear
levelsof rep78, loc(rs) miss
loc g
loc l
foreach r of loc rs {
 qui su mpg if rep78==`r'
 if `r'>=. {
  loc l `l' `max' "`r'"
  loc r `max'
  loc max=`max'+1
  }
 else {
  loc l `l' `r' "`r'"
  loc max=`r'+1
 }
 loc g `g'||pci `=r(mean)-2*r(sd)' `r'
 loc g `g' `=r(mean)+2*r(sd)' `r'
 loc g `g'||scatteri `=r(mean)' `r', ms(o) msize(large)
}
tw `g' leg(off) xla(`l')

On Mon, Nov 16, 2009 at 12:48 PM, Nick Cox <[email protected]> wrote:

> But personally I'd prefer -stripplot- from SSC. Check out its -bar-
> option.

Nick Cox

The official command -serrbar- does precisely this.

Hoffman, George

> Has anyone found/written/adapted a program which will plot means +/-
sd
> for observations of Y over categories X, without drawing a connecting
> line between means (as in grby)? The desired solution would be like
> 'graph box Y, over(X)' except that box would be a single symbol with
> upper and lower ranges for sd or sd. Nick cox' civplot is close, but
> doesn't allow sd's.
> I've gotten around this by using joanne garrett's 'predxat' but that
> plots se's not sd's.
>
> I understand some of the reasons why not to use this sort of display,
> but it does occasionally become useful to display data.

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