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

Re: st: Plotting string variables with sencode


From   Joanna Carrington <[email protected]>
To   [email protected]
Subject   Re: st: Plotting string variables with sencode
Date   Thu, 06 Oct 2005 12:05:28 +0100

Thank you very much Roger that does help tremendously. I wonder if you or anyone else may also be able to help me with another graphical problem I'm having?

I would like to truncate these plots (either the ecl or rcap plots) so that I can 'magnify' the area where the very small (at present invisible!) confidence intervals are. Some of the upper and lower intervals will be outside of the range that I would like, however the estimates would still fall into the new shorter range. I know of the truncate option that can be applied to version 7 metagraph but eclplot (and rcap) doesn't allow it. Does anyone know a way of doing this please?

Thank you,

Joanna

I am hoping to keep all the intervals in the plot b

Roger Newson wrote:


At 11:12 06/10/2005, Joanna Carrington wrote:

Dear Stata list users,

I am trying to produce a graph that is essentially a forest plot using a combination of a scatter plot and a twoway rcap plot. I have gone down this route as I have found the metagraph and eclplots are not exactly what I need. I have estimates with very different weights and those that are weighted heavily completely engulf the other lightly weighted estimates when metagraph is used (I have tried changing the scale of the weights in the plot and this doesn't help as the smaller weights disappear). The [w="a weight"] option does not work with the eclplot command.

So using the my scatter and rcap plot I need to plot the alphanumerical id of the estimates on the y axis. I have used sencode to produce a new variable that, if I'm correct in thinking, is numerical but keeps the alphanumerical part as a label. Now when I use this variable in the plots I would like the labels to be displayed (automatically preferably to me specifying each individual label using ylabel(1 "" 2 etc)) rather than the number.
Does anyone know how I can do this please?

If you use the option

ylabel(1(1)20, valuelabel)

then the axis labels will be value labels. Otherwise, the axis labels may be value labels or formatted values, depending on the scheme.

Another tip. -eclplot- can do symbols weighted by study size. It does this by specifying weights as part of the -estopts()- option. If you type

eclplot estimate min95 max95 study, estopts(,[aweight=studysize])

(note the comma before the weight), then the estimates will be weighted by study size. And you can also use the -supby()-, -estopts1()- and -estopts2()- options to make the symbols squares for the individual studies and diamonds for the combined meta-analysed estimates. See the on-line help for -eclplot-.

I hope this helps.

Roger



--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
Division of Asthma, Allergy and Lung Biology
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]
Website: http://phs.kcl.ac.uk/rogernewson/

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/

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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