Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: detonator plot with three grouping variables
Ronnie Babigumira <firstname.lastname@example.org>
Re: st: detonator plot with three grouping variables
Thu, 9 May 2013 14:09:15 +0200
Dear David, Nick, and Roger,
Many thanks for your feedback.
I agree with David and Nick, however, the team with which I am working on this settled for the bar chart. The reviewers liked how the data were displayed but requested CI's be added. I will use the links you have provided to make the case against using the detonator/dynamite plots but there is an even simpler case which is that the resulting plot will be quite busy. It is for this reason that I must make the plot. I will look at -ciplot- which, I think, does what David suggests.
Nick, I used graph bar for illustrative purposes (to show the 3 level structure of the data). The example has 2 levels, race and socio-economic status while our data has 3. I could do three different graphs for each of the highest levels (e.g rep78 in the demo example) but the point was to have one graph. On -stripplot- I am a true convert/believer and use it whenever I have the opportunity to.
Roger, thanks for the additional information on eclplot. I looked at the examples but it was not clear to me how to do the three levels. It is entirely possible that I am looking at this the wrong way :-(
On May 9, 2013, at 1:05 PM, "Roger B. Newson" <email@example.com> wrote:
> My take on detonator plots is that they CAN be useful, and complementary to the CI plots for differences, because an audience presented with mean or prevalence differences will frequently ask what these differences are differences between. The important thing (I find) is to make both confidence limits visible, which of course makes the bars look a little bit less like detonators. People commonly make the mistake of coloring the bars black, and leaving the comfidence limits black too, which makes the bars look a bit more like detonators. I usually color the bars white, or light shades of grey.
> The -eclplot- package, downloadable from SSC, is my usual tool for making detonator plots, specified by the options
> eplottype(bar) rplottype(spike)
> eplottype(bar) rplottype(cap)
> depending on whether or not I want the confidence limits to have caps. And I usually use my graphics scheme -scheme_rbn1mono-, which you can also download from SSC, and which usually colors bars white, or fairly light shades of gray, unless instructed to do otherwise. And -eclplot- will usually put the confidence limits in the foreground, and the bars in the background, unless instructed otherwise.
> I hope this helps.
> Best wishes
> 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: firstname.lastname@example.org
> Web page: http://www.imperial.ac.uk/nhli/r.newson/
> Departmental Web page:
> Opinions expressed are those of the author, not of the institution.
> On 09/05/2013 11:49, Nick Cox wrote:
>> I agree strongly with David.
>> I think I heard the term "detonator plots" from Stata user and
>> Statalist member Paul Seed at a users' meeting several years ago. He
>> may care to comment on whether it's his coinage.
>> Independently of that, and echoing David, it's my impression that the
>> term "dynamite plot" is more common.
>> Naturally what you call the beast is not central here, but it is
>> germane in so far as searching for "dynamite plot" on the internet
>> yields good discussions such as
>> The key issues are (to me)
>> 1. Such plots omit detail which you should care about showing (when
>> it's your data) or examining (always).
>> 2. The visual signal strongly emphasises mean values relative to zero,
>> by the solid or thick bars, and plays down uncertainty, shown by the
>> intervals. Comparison with zero can be an important comparison, but
>> it's often not of scientific interest or concern.
>> A much more informative display is available through (e.g.)
>> -stripplot- (SSC) which allows error bars to be shown with raw data.
>> In terms of what Ronnie wants to do in Stata, his question is
>> puzzling, because the UCLA FAQ he cites explains in detail that -graph
>> bar- is a dead end here and you must switch to -twoway bar-.
>> On 9 May 2013 04:47, David Hoaglin <email@example.com> wrote:
>>> A good first step would be to omit the bars entirely. Freeman et al.
>>> (2008) discuss that type of plot under the name "dynamite plunger
>>> plot" in their chapter "How to display data badly." The bars take up
>>> space to no good purpose. A more effective plot would show the
>>> estimates with error bars or confidence intervals (and an explanation
>>> of whether the intervals are error bars or confidence intervals).
>>> David Hoaglin
>>> Freeman JV, Walters SJ, Campbell MJ (2008). How to Display Data. BMJ Books.
>>> On Wed, May 8, 2013 at 5:49 PM, Ronnie Babigumira <firstname.lastname@example.org> wrote:
>>>> I am trying to create a detonator plot like the one in this example http://www.ats.ucla.edu/stat/stata/faq/barcap.htm only I have 3 levels. Here is an example using the accessible auto data
>>>> sysuse auto,clear
>>>> egen lwst = fill(1,2,1,2)
>>>> recode rep78 (1 2 = 3)
>>>> What I would like to do is add error bars to this plot
>>>> gr bar price, over(lwst) over(foreign) over(rep78)
>>>> Any help is much appreciated
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
* For searches and help try: