Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Graph (vertical lines)


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: Graph (vertical lines)
Date   Mon, 07 Apr 2003 17:31:57 +0100

At 08:56 07/04/03 -0700, Ricardo Ovaldia wrote:
Dear All,

In prior versions of Stata it was possible to connect
points using vertical lines using the ii and II
connect symbols. How do you do that in Stata 8?

e.g. in Stata 7:

clear
input type tm20 l20 u20 t37 l37 h37
1 .6  .5  .7  1.0 .8    1.2
2  1.3 1.1  1.5 .4 .2  .6
end
graph  tm20 l20 u20 t37 l37 h37 type, /*
*/ c( l II l II) s(o . . o . .)
I had exactly the same query, which was why I developed the -eclplot- package, downloadable from SSC, which does this. Type -ssc describe eclplot- to find out more.

More generally, it is done by using -twoway- and overlaying -scatter- subplots (specifying the estimates) with -rcap- or -rspike- subplots (specifying confidence limits). Ricardo's example might be implemented as

twoway scatter tm20 t37 type || rcap l20 u20 type || rcap l37 h37 type

or something similar.

I hope this helps.

Roger


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]

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

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