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]

From |
"Fiedler, James (JSC-SK)[USRA]" <james.fiedler-1@nasa.gov> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: Graphical challenge from Gelman blog |

Date |
Thu, 21 Apr 2011 14:52:19 -0500 |

I'd reorder in a different way. The graphs you link to make comparisons easiest between activities and within countries, which is not the most interesting comparison, in my opinion. More interesting to compare between countries and within activity, like so: bysort activity: egen mean = mean(hours) gen hrs_mean = hours - mean twoway bar hrs_mean country, horizontal by(activity , graphregion(color(white)) ixaxes note("")) lcolor(gs3) fcolor(gs3) barwidth(0.85) ytitle("") ylabel( 1(1)6 , valuelabel angle(0) nogrid tlength(0)) xline(0, lcolor(gs0)) yscale( lcolor(white) ) aspect(0.75) subtitle( , fcolor(white) lcolor(white) justification(left)) xtitle("hours above or below mean") James ________________________________________ From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox [njcoxstata@gmail.com] Sent: Thursday, April 21, 2011 2:09 PM To: statalist@hsphsun2.harvard.edu Subject: Re: st: Graphical challenge from Gelman blog But reordering countries on e.g. paid work does tidy up things a bit. I think the problem is that we can all try an amateurish interpretation of the data, but there are social scientists who should be able to do it better, bringing in facts like typical length of education or dates of retirement. On Thu, Apr 21, 2011 at 6:45 PM, Airey, David C <david.airey@vanderbilt.edu> wrote: > . > > The scales of the data across measures make using the raw data in your graph perfectly fine in my opinion. > > I don't like their graphs, either the original or the newer ones. At least the original ring is reminiscent of a clock face, which I think must have been the intention. I don't think it suffers too badly from pie graph problems in the manner done. > > If I were doing one measure at a time, the only thing I would do with your graph would be to order the countries from large to small. But this cannot be done in your graph, because country has a fixed X position across the different measures. > > I guess when making a graph, from data that can be used to form multiple messages, is to ask which message is meant to be conveyed? I did not read Gelman's thread to know what that was. Nick Cox >> Over at Andrew Gelman's blog, there have been various attempts to >> improve on a graph first published by the The Economist. Most of the >> solutions use R. Some Stata users may want to try to see what they can >> do. Here are the threads: >> >> >> http://www.stat.columbia.edu/~cook/movabletype/archives/2011/04/one_more_time-u.html >> >> >> >> http://www.stat.columbia.edu/~cook/movabletype/archives/2011/04/attractive_but.html >> >> >> >> http://www.stat.columbia.edu/~cook/movabletype/archives/2011/04/the_r_code_for.html >> >> >> Here's some code to read the data into Stata. The data are average >> hours per day spent in various activities in different countries. >> >> clear >> input hours >> 4.2 >> 3.2 >> 11.1 >> 1.3 >> 2.2 >> 2 >> 3.9 >> 3.2 >> 10 >> .8 >> 3.1 >> 3.1 >> 6.3 >> 2.5 >> 9.8 >> .9 >> 2.2 >> 2.4 >> 4.4 >> 3.1 >> 9.8 >> .8 >> 3.3 >> 2.7 >> 4.8 >> 3 >> 9.9 >> .7 >> 3.1 >> 2.4 >> 4 >> 3.4 >> 10.5 >> .7 >> 3.3 >> 2.1 >> end >> egen country = seq(), block(6) >> egen activity = seq(), to(6) >> label def country 1 France 2 Germany 3 Japan 4 Britain 5 USA 6 Turkey >> label def activity 1 Paid 2 Unpaid 3 "Eating, sleeping" 4 "Personal >> care" 5 Leisure 6 Other >> label val country country >> label val activity activity >> >> and here's one suggestion on how to plot it. I can see the force of >> Andrew Gelman's suggestion to average across countries and plot >> residuals from that, but plotting the original data works as well for >> me. >> >> tabplot ac co [iw=hours], showval height(0.6) ytitle("") xtitle("") >> subtitle(hours/day) >> >> Here -tabplot- is from SSC. (By the way, versions of -tabplot- not yet >> realised handle negative bars better than that on SSC, but there are >> no negative bars in the above.) * * 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/

**Follow-Ups**:**Re: st: Graphical challenge from Gelman blog***From:*Nick Cox <njcoxstata@gmail.com>

**References**:**Re: st: Graphical challenge from Gelman blog***From:*"Airey, David C" <david.airey@vanderbilt.edu>

**Re: st: Graphical challenge from Gelman blog***From:*Nick Cox <njcoxstata@gmail.com>

- Prev by Date:
**st: adjacency matrix from neighbors for sppack** - Next by Date:
**st: question about hierarchical model** - Previous by thread:
**Re: st: Graphical challenge from Gelman blog** - Next by thread:
**Re: st: Graphical challenge from Gelman blog** - Index(es):