POLMETH Archives

Political Methodology Society

POLMETH@LISTSERV.WUSTL.EDU

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Simon Jackman <[log in to unmask]>
Reply To:
Political Methodology Society <[log in to unmask]>
Date:
Tue, 24 Oct 2006 12:07:37 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (100 lines)
in R you can use the alpha channel when specifying colors to get
overlap... see, for instance, the rgb() function in R, which you
could use to generate the color with which you might shade a polygon,
or a use for a (transparently) filled plotting symbol.

some recent examples:

http://jackman.stanford.edu/pictures/R/thePolls.pdf (showing
frequency of national polling on Bush approval, by week, by survey
house, with area of plotted circle proportional to each house's
weekly sample size; the overlap and deeper color shows more data
piling up).

less dramatically:
http://jackman.stanford.edu/pictures/R/thePollsLevels.pdf (point
estimates of Bush approval, plus confidence intervals)

and then chaining several alpha-channel enhanced PDFs together to
make an animation (after converting them to jpgs, and then to a
Quicktime movie, and caution this is 125MB):

http://jackman.stanford.edu/pictures/R/alphaMCMC.mov

you'll want pdf() as your R graphics device, and you'll also want to
specify pdf version 1.4.

hmm, I sense a TPM piece coming on...

-- simon jackman

On Oct 23, 2006, at 8:41 AM, Jim Battista wrote:

> So I have a multinomial logit model and want to display my results
> graphically.
>
> I can do this easily enough without confidence intervals using the
> xpost
> tools after the estimation.  Or I can use the spost tools inside Stata
> to generate confidence intervals, and use rarea to plot them.
>
> Now, I'm not ashamed of my confidence intervals.  They're beautiful
> confidence intervals that I'm happy to show.  But, sometimes, some of
> the confidence intervals overlap, which makes my existing figures
> unsatisfactory.  I've found the drarea package for Stata which shades
> overlapped areas as the average of the two areas, but that only
> lets you
> throw up two CI's, whereas I have three, and you can't add to it with
> addplot().
>
> Dumping the data that Stata uses to create the graphs is trivial.
> So is
> there another graphing / charting package that will let me overlay one
> CI on another with the top one such that I can still see the other one
> underneath it?  That will let me set a transparency value for the top
> one, or that will average or sum the colors / grey values for
> overlapped
> areas without me having to manually calculate the areas to shade them
> directly?  What I'd really like is something such that a light grey
> overlapping a medium gray turns into a dark (=light+medium) grey.
>
> Apologies if this is trivially easy in R.  I've looked, but I am not
> always the best searcher.
>
> Jim
>
> --
> James S. Coleman Battista
> Dept. of Political Science, Univ. of North Texas
> [log in to unmask]    (940)565-4960
>
> **********************************************************
>             Political Methodology E-Mail List
>        Editor: Karen Long Jusko <[log in to unmask]>
> **********************************************************
>        Send messages to [log in to unmask]
>  To join the list, cancel your subscription, or modify
>           your subscription settings visit:
>
>          http://polmeth.wustl.edu/polmeth.php
>
> **********************************************************

Simon Jackman, Depts of Political Science & (by courtesy) Statistics,
Stanford University, Stanford, CA 94305-6044, USA.
http://jackman.stanford.edu
Director, Political Science Computational Lab. http://pscl.stanford.edu
cell: +1 (650) 387 3019  fax: +1 (650) 724-9095

**********************************************************
             Political Methodology E-Mail List
        Editor: Karen Long Jusko <[log in to unmask]>
**********************************************************
        Send messages to [log in to unmask]
  To join the list, cancel your subscription, or modify
           your subscription settings visit:

          http://polmeth.wustl.edu/polmeth.php

********************************************************** 

ATOM RSS1 RSS2