Statalist


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

RE: st: error bars


From   "Newson, Roger B" <r.newson@imperial.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: error bars
Date   Wed, 18 Jun 2008 21:52:59 +0100

Maarten's reference refers to the -eclplot- package (downloadable from
SSC), which produces a wide range of plots of estimates and confidence
limits. And, using -eclplot-, moleps should be able to produce bar
graphs with the upper error bar and no lower error bar. However, moleps
probably should not produce these, as the reader usually also wants to
know the lower limit as well as the upper limit.

Bar graphs with upper error bars and no lower error bars are known as
"detonator plots", because the bars look like detonators. A presentation
on -eclplot-, including some discussion of detonator plots, is given in
Newson (2005), which can be downloaded from the SSC site at
http://ideas.repec.org/s/boc/usug05.html

I hope this helps.

Best wishes

Roger


References

Newson R. Generalized confidence interval plots using commands or
dialogs. Presented at the 11th UK Stata User Meeting, 17-18 May, 2005.


Roger B Newson
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: r.newson@imperial.ac.uk 
Web page: www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/pop
genetics/reph/

Opinions expressed are those of the author, not of the institution.

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maarten buis
Sent: 18 June 2008 21:22
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: error bars

Have a look at:
R. Newson (2003), "Confidence intervals and p-values for delivery to
the end user", The Stata Journal, 3(3), pp. 245--269.
http://www.stata-journal.com/article.html?article=st0043

I actually refered to that earlier (see below)

-- Maarten


--- moleps islon <moleps2@gmail.com> wrote:

> I' making a double error bar graph- e.g two different variables x and
> y with error bars categorised according to z. I've tried using ciplot
> x y, by(z) however I get a graph with two identical error bars
> (though
> different symbol, but identical values) for each instance of z. Any
> idea how to remedy this? If I need to make bars (a bar graph)  for
> each category and then have the positive part of the error bar
> projecting from the top- how do I go about this?
> 
> Regards
> 
> 
> On Mon, Jun 16, 2008 at 2:23 PM, Nick Cox <n.j.cox@durham.ac.uk>
> wrote:
> > Standard errors can come from lots of places, including the -ci-
> > command.
> >
> > Moleps seems to be implying that -ci- does the right calculation
> for his
> > or her purposes.
> >
> > (I note that Moleps has yearly results, but -ci- for separate years
> does
> > nothing about any time series structure in the data, for example
> about
> > taking serial correlation into account.)
> >
> > -ciplot- and -stripplot- from SSC both do -ci-type calculations and
> > graphing in one.
> >
> > Nick
> > n.j.cox@durham.ac.uk
> >
> > Maarten buis
> >
> > --- moleps islon <moleps2@gmail.com> wrote:
> >> I need to make a an error-bar graph categorised by year. I've
> tried
> >> using serrbar mean(x) etc, but I cant find a command for the
> standard
> >> error. Do I need to run a CI, generate a new variable from the ci
> >> result and feed that into serrbar?
> >
> > There are many ways of doing this. For instance you can use methods
> > discussed in (Buis 2007) (a convenient estimatation command would
> in
> > this case be -mean-), or you can remember that the standard error
> of
> > the mean is the standard deviation divided by the square root of
> the
> > number of observations, like in the example below:
> >
> > *-------------- begin example -----------------------
> > sysuse nlsw88, clear
> > gen mis = missing(wage, age)
> > bys age: egen mwage = mean(wage)
> > bys age: egen sdwage = sd(wage)
> > bys age mis: gen se = sdwage/sqrt(_N) if mis == 0
> > serrbar mwage se age, scale(1.96)
> > *-------------- end example -------------------------
> >
> > Notice that a fixed scale is slightly problematic here as idealy
> this
> > scale should depend on the number of observations (a t-test), but
> 1.96
> > should work fine in large samples. For a more flexible approach,
> where
> > you can take all this into account see: (Newson 2003)
> >
> > -- maarten
> >
> > M.L. Buis (2007), "Stata tip 54: Where did my p-values go?", The
> Stata
> > Journal, 7(4), pp.584--586.
> > http://home.fsw.vu.nl/m.buis/wp/pvalue.html
> >
> > R. Newson (2003), "Confidence intervals and p-values for delivery
> to
> > the end user", The Stata Journal, 3(3), pp. 245--269.
> > http://www.stata-journal.com/article.html?article=st0043
> >
> >
> > *
> > *   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/
> 


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

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

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


      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index