Discussion: View Thread

Visualizing 4D

  • 1.  Visualizing 4D

    Posted 08-09-2013 07:49
    This message has been cross posted to the following eGroups: Statistics and the Environment Section and Statistical Consulting Section .
    -------------------------------------------
    Hello All, Does anyone know of any software or applet that will let you visualize in 4D? I'm thinking about creating a graph with two categorical and two quantitative variables. The quantitative variables will be plotted on the X-Y axes. One of the categorical variables will be the color and the other will be the size of the marker. For example, let's say we were looking at income ($), # credits earned, academic major, and # years experience. Number of credits would be my x-axis and income would be on the y-axis. Let's say I use circles as the markers. The categorical variable academic major would be determined by color. Each major would be colored a different color. Finally, the fourth variable would be determined by the size of the circle. The experience variable would be partitioned so that those with less than 5 years experience would get a small circle, between 5-10 years a medium-sized circle, and 11 or more years experience a large circle. If anyone could point me in the direction of a software that can do this, it would be greatly appreciated. Ray ------------------------------------------- Raymond Mooring Senior Statistical Consultant Analysis Made Easy -------------------------------------------


  • 2.  RE:Visualizing 4D

    Posted 08-09-2013 07:57
    Hi Ray

    You could do exactly this in either `R` or `SAS` and probably in other software too (but those are the two I know)

    In `R` you could use either base graphics or the ggplot package (or probably others). In ggplot you would want to look into faceting.



    -------------------------------------------
    Peter Flom
    -------------------------------------------








  • 3.  RE:Visualizing 4D

    Posted 08-09-2013 08:38
    JMP will handle this, too.

    -------------------------------------------
    Wayne Fischer
    Statistician
    University of Texas Medical Branch
    -------------------------------------------








  • 4.  RE:Visualizing 4D

    Posted 08-09-2013 08:43

    Spotfire will do this easily, if you have access to it.

    Bob
    -------------------------------------------
    Robert Gallavan
    Principal Statistician
    I3/Statprobe
    -------------------------------------------








  • 5.  RE:Visualizing 4D

    Posted 08-09-2013 08:50
    In SPSS you could do a 3 way scatter plot with the 4th dimension being the type of marker.
    IIRC there is also a way to vary the size of circles.  I would shy away from that because it relies on the reader's ability to compare areas.  Research has shown that people do not compare areas well.
    In the output file you can rotate the image to view it from varying angles.
    The free output reader allows you to send the rotatable graph to anybody who uses a computer.

    -------------------------------------------
    Arthur Kendall
    Social Research Consultants
    -------------------------------------------








  • 6.  RE:Visualizing 4D

    Posted 08-09-2013 10:32
    Thanks all for the advice. I knew it wasn't hard to do with the right tools. I got info on how to do it in SAS, SPSS, and R - the three packages i know best (in that order). So I'm happy. I also got info on how to do it for web visualization. I may look into that for another project. This request was born out of the need to beef up the graphics in one of my manuscripts. Thanks again. Ray ------------------------------------------- Raymond Mooring Senior Statistical Consultant Analysis Made Easy -------------------------------------------


  • 7.  RE:Visualizing 4D

    Posted 08-09-2013 11:11
    Raymond,

    That's great news!  Glad you have what you need regarding tools.  Someone mentioned that area (ie, size of the dots) is not something humans are good at processing.  As a follower of Edward Tufte's graphics principles (who has a lot to say about graphic design), consider for your manuscript, what is the Thought Task that you want the audience of the manuscript to undertake?  What do you want them to take away from seeing the graph?

    It's been my life experience that pictures and stories are the most compelling ways of getting across ideas to others.  It's not just the graphics tool!  More important is the graphic design.
     
    A cross-industry group of FDA and pharmaceuttical industry statisticians have been thinking about both the design and easy ways to graph safety data.  You are in a different field than pharmaceuticals, but regardless, these Graphics Best Practices can be useful as a checklist  https://www.ctspedia.org/do/view/CTSpedia/BestPractices

    If you're curious about our team's work, here is the website: https://www.ctspedia.org/do/view/CTSpedia/StatGraphHome

    And here is one of the presentations floating around the ether that summarizes it http://www.bassconference.org/PDFs/BASS%202012%20Duke.pdf

    -------------------------------------------
    Susan Duke, MS, MS
    Manager, Benefit Risk Evaluation
    Global Clinical Safety and Pharmacovigilance
    GlaxoSmithKline
    -------------------------------------------








  • 8.  RE:Visualizing 4D

    Posted 08-09-2013 12:22

    I could add other software that does what you want easily, but instead I will ask if that is what you really want to do. I suggest trying trellis plots, also called lattice in R and panel charts in Excel. Then compare the designs and decide which the audience will understand more easily. I'm with Susan: the design is more important than the tools.


    -------------------------------------------
    Naomi Robbins
    NBR
    Author of Creating More Effective Graphs
    -------------------------------------------








  • 9.  RE:Visualizing 4D

    Posted 08-11-2013 12:16
    Any statistician whose employer licenses data visualization software (e.g. Spotfire, JMP, Miner3D, etc.) has no time constraints insofar as time investment to program graph construction - mere seconds for point-and-click exchange of roles serving axes, Trellis plot conditioning variables, etc.  Scroll halfway down this link, example 2 is generally regarded a classic that prominently highlights the usefulness of Trellis plots to visually reveal and connect intuition, scientific understanding and actionable discoveries:

    http://netlib.bell-labs.com/cm/ms/departments/sia/project/trellis/display.examples.html

    Slide 21 of presentation (third web link) that Susan Duke offered in her post states, "... value of clear communications inherent in graphs is typically downstream from the group who creates them."  It's in such multidisciplinary settings that we have priceless opportunities to collaborate in making effective team contributions.  Bring to bear the subject-matter knowledge possessed by the intended audience to inform, steer, and align statistician data visualization expertise onto what's important re: the applied science base.  The mutual learning that often occurs can pay unimaginable future dividends on reciprocal professional career development.

    The second web link Susan provided shows the three latest graph entry additions to the CTSpedia library, wherein R code creates the individual QTc display.  JReview clinical data website shows graph examples, yet functionality for rendering Trellis plot visualizations isn't included among highlights:

    http://www.i-review.com/jreview.html

    I've yet to invest time to familiarize myself in hands-on use of JReview software features licensed at my current workplace.  Can it create Trellis plots?


    -------------------------------------------
    Steven Burke
    -------------------------------------------






    https://www.ctspedia.org/do/view/CTSpedia/BestPractices

    If you're curious about our team's work, here is the website: https://www.ctspedia.org/do/view/CTSpedia/StatGraphHome

    And here is one of the presentations floating around the ether that summarizes it http://www.bassconference.org/PDFs/BASS%202012%20Duke.pdf

    -------------------------------------------
    Susan Duke, MS, MS
    Manager, Benefit Risk Evaluation
    Global Clinical Safety and Pharmacovigilance
    GlaxoSmithKline
    -------------------------------------------







    Original Message:
    Sent: 08-09-2013 10:32
    From: Raymond Mooring
    Subject: Visualizing 4D


    Thanks all for the advice. I knew it wasn't hard to do with the right tools. I got info on how to do it in SAS, SPSS, and R - the three packages i know best (in that order). So I'm happy. I also got info on how to do it for web visualization. I may look into that for another project. This request was born out of the need to beef up the graphics in one of my manuscripts.


    Thanks again.
    Ray


    -------------------------------------------
    Raymond Mooring
    Senior Statistical Consultant
    Analysis Made Easy
    -------------------------------------------


















  • 10.  RE:Visualizing 4D

    Posted 08-11-2013 12:52
    I don't know JReview but the link you provided shows that it has R integration so you can create trellis plots through R.

    -------------------------------------------
    Naomi Robbins
    NBR
    Author of Creating More Effective Graphs
    -------------------------------------------








  • 11.  RE:Visualizing 4D

    Posted 08-15-2013 11:52
    I've used JReview a small amount.  I suspect it would only have a portal into R, so probably a lot cleaner/easier to use R on its own (but this is only a suspicion based on some SAS features of JReview).

    And this speaks to Steve's comment about statisticians who have access to data visualization software (e.g. Spotfire, JMP, Miner3D, etc.).  If all the statistician needs to do graphically is explore, then I'd tend to agree, as one can usually get 70-80% of what's of interest with solutions someone has designed in their canned point/click, PROC, etc.  And when the audience is us (ie, well trained in looking at data and if it's our study, also well versed in the data itself), we can get the rest of the way there without the graph being necessarily all that well designed. 

    But if the graph is needed for a presentation to others, a publication or submission, that's a very different story.  That is why we created the wiki, to encourage use of standard graph types for commonly asked questions in drug safety.  When the commonly asked drug safety questions are answered more consistently with graphs well-designed to answer them, there will be more clarity for patients in the treatment choices they face. 

    Having had some training from and interaction with Naomi, I believe it's also a motivation for writing her book, which I can highly recommend.

    -------------------------------------------
    Susan Duke
    Manager, Benefit Risk Evaluation
    Global Clinical Safety and Pharmacovigilance
    GlaxoSmithKline
    -------------------------------------------








  • 12.  RE:Visualizing 4D

    Posted 08-09-2013 10:46
    In R you can use rgl to use plot3d with different markers or colors to have truly 3 dimensions.  Using the writeWebGL function, you can then export this to a standalone webpage that is viewable if WebGL is enabled on the browser.


    Also, you can use the googleVis package to do motion charts in R, that has a tutorial and examples here: https://code.google.com/p/google-motion-charts-with-r/



    -------------------------------------------
    John Muschelli
    -------------------------------------------