Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: RE: RE: how to add error bars to each data marker on a line graph (or the size of the data marker reflect the confidence interval)?


From   Roger Newson <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: RE: RE: how to add error bars to each data marker on a line graph (or the size of the data marker reflect the confidence interval)?
Date   Fri, 18 Feb 2011 18:07:59 +0000

Another possibility is to use the SSC package -eclplot-, which produces confidence interval plots in many styles. As in:

eclplot y ymin ymax x, eplottype(connect) estopts(sort)

The -eclplot- package gives a wide variety of 56 confidence interval plot styles, distinguished by the -eplottype()- and -rplottype()- options. There is definitely no need to use Excel. The online help for -eclplot- contains a few hypertexts to resources documenting the use of -eclplot-.

I hope this helps.

Best wishes

Roger



Roger B Newson BSc MSc DPhil
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: [email protected]
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/

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

On 18/02/2011 17:08, Nick Cox wrote:
Zhiqiang Wang already gave a one-line solution in Stata.

http://www.stata.com/statalist/archive/2011-02/msg00986.html

Nick
[email protected]

Liao, Junlin

Excel is probably the best for this task. Excel does not require all CI to be the same. With data correctly lined up, it's easy to do it in Excel. It requires quite some manipulation to achieve it in Stata. Please search online for your problem. There are many nice tutorials out there. UCLA is a nice place to look for such material for doing it in Stata.

Xin Lu

I have a data set with 15 rows and four columns: x | y | lower CI for y | upper CI for y.

I use the line graph to illustrate my data. So I would have 15 data markers connected by straight line segment. I need to put error bars (confidence interval for y) at each data point, or I could use the size of the data marker to reflect the confidence interval. Does anyone know if Stata can accomplish it?

I can't use Excel to do it, because Excel requires all CI to be the same at each data point.

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index