Presentation is loading. Please wait.

Presentation is loading. Please wait.

Visualising Variables – Validly! Damien Jolley School of Health & Social Development Deakin University, Victoria Originally presented at: ASCEPT Workshop:

Similar presentations


Presentation on theme: "Visualising Variables – Validly! Damien Jolley School of Health & Social Development Deakin University, Victoria Originally presented at: ASCEPT Workshop:"— Presentation transcript:

1 Visualising Variables – Validly! Damien Jolley School of Health & Social Development Deakin University, Victoria Originally presented at: ASCEPT Workshop: “Extracting the real significance from biological data” AHMRC, Thursday 28 November 2002 AHMRC Posters Department of Human Physiology & Anatomy School of Human Biosciences La Trobe University 23 April 2004

2 Download slides from: http://www.jolley.com.au Average daily retail petrol price, Melbourne, Oct-Nov 2002 Th TuSat FriSatTh Source: http://www.accc.gov.au, 21 Nov 2002http://www.accc.gov.au

3 Download slides from: http://www.jolley.com.au Sydney Adelaide Brisbane Melbourne Other weeks Average daily retail petrol price, selected cities, 4 week to 21 Apr Source: http://www.accc.gov.au, 23 Apr 2004http://www.accc.gov.au Vertical lines indicate Sundays

4 Download slides from: http://www.jolley.com.au Obvious fact #1: l Graphs can communicate data: l quickly l accurately l powerfully l efficiently

5 Download slides from: http://www.jolley.com.au “Only 50% of American 17-year-olds can identify information in a graph”* Source: Wainer H. Understanding graphs and tables. Educational Researcher 1992; 21:14-23 * US National Assessment of Educational Progress, June 1990

6 Download slides from: http://www.jolley.com.au Whose fault? Source: Wainer H. Understanding graphs and tables. Educational Researcher 1992; 21:14-23 “Like characterising someone’s ability to read by asking questions about a passage full of spelling and grammatical errors. What are we really testing?” Drawn using MS Excel ‘XY-chart’

7 Download slides from: http://www.jolley.com.au Obvious fact #2: l Bad graphs can hinder communication

8

9 Download slides from: http://www.jolley.com.au Less obvious facts #3, #4, #5: l What characterises a “good” graph? l What are the characteristics of a “bad” graph? l What software to use? How to use it?

10 Download slides from: http://www.jolley.com.au Howie’s Helpful Hints for bad graph displays l Ten useful pointers to help you create uninformative, difficult-to-read scientific graphs l Adapted from: Wainer H. (1997) Visual Revelations. Mahwah, NJ: Lawrence Erlbaum Associates, Publishers

11 Download slides from: http://www.jolley.com.au Steps for better graphs 1. Identify direction of effect l In almost all cases, the cause or predictor variable should be horizontal (X) l Effect or outcome variable is best vertical (Y) 2. Identify the levels of measurement l Nominal, ordinal or quantitative are different! 3. Think of visual perception guides l Columns or dots? Lines or scatterplot? 4. Minimise guides and non-data l Grid lines, tick marks, legends are non-data

12 Download slides from: http://www.jolley.com.au Cause (X) and effect (Y) Figure 16 Standard deviation of batting averages for all full-time players by year for the first 100 years of professional baseball. Note the regular decline.* Standard deviation Time Source: Gould, Stephen Jay. Full House: The Spread of Excellence from Plato to Darwin. Random House, 1997. cited: http://www.math.yorku.ca/SCS/Gallery/, 24 Nov 2002http://www.math.yorku.ca/SCS/Gallery/ * My emphasis Standard deviation Time

13 Source: Killias M. International correlations between gun ownership and rates of homicide and suicide. Can Med Assoc J 1993; 148: 1721-5

14 % of households owning guns Rate of homicide with a gun (per million per year) 10203040 1 5 10 50 USA Norway Canada France Finland Belgium Australia Spain Switzerland Netherlands West Germany Scotland England & Wales Drawn using S-plus

15 Download slides from: http://www.jolley.com.au Levels of Measurement l The right display for a variable depends on its level of measurement l For univariate graphs, l qualitative  barplot l ordinal  column chart l quantitative  boxplot or histogram l For bivariate graphs, l X ordinal, Y binary  connected percents l X & Y both quantitative  scatterplot l X categorical, Y quant  box plots l Binary s eg gender, death, pregnant l Categorical l Qualitative s eg race, political party, religion l Diverging s eg change (-ve to +ve) l Ordinal s eg rating scale, skin type, colour l Quantitative l Interval s only differences matter, eg BP, IQ l Ratio s absolute zero, ratios matter, eg weight, height, volume

16 Source: Lewis S, Mason C, Srna J. Carbon monoxide exposure in blast furnace workers. Aust J Public Health. 1992 Sep;16(3):262-8. Ordinal variable, but categories mixed Outcome is COHb%, but drawn on X

17 Download slides from: http://www.jolley.com.au An alternative display... Area of circles proportional to n Predictor variable Outcome variable Drawn using MS Excel ‘bubble plot’

18 Download slides from: http://www.jolley.com.au Principles of visual perception l WS Cleveland l much work in psycho- physics of human visual understanding Tells us: l hierarchy of visual quantitative perception l patterns and shade can cause vibration l graphs can shrink with almost no loss of information Source: Cleveland WS. The Elements of Graphing Data. Monterey: Wadsworth, 1985.

19 Download slides from: http://www.jolley.com.au Ubiquitous column charts Source: Jamrozik K, SpencerCA, et al. Does the Mediterranean paradox extend to abdominal aortic aneurism? Int J Epidemiol 2001; 30(5): 1071

20 Download slides from: http://www.jolley.com.au A dotchart version… Drawn using S-plus “Trellis” graphics

21

22 Moiré vibration is easy with a computer !!!

23 Download slides from: http://www.jolley.com.au Moiré vibration l Vibration is maximised with lines of equal separation l This is common in scientific column charts cited in Tufte E. The Visual Display of Quantitative Information.

24 Download slides from: http://www.jolley.com.au Minimise non-data ink l Non-data ink includes tick marks, grid lines, background, legend l Explanation of error bars, P-values can be included in caption or in text Greeks in Australia Swedes in Sweden Japanese in Japan Anglo-Celts in Australia Greeks in Greece 0.100.250.500.751.00 Relative mortality rate (all causes) Note the exception for X-Y orientation: because predictor is qualitative (unordered)

25 Download slides from: http://www.jolley.com.au Software for scientific graphics l Dedicated programs – thousands! l DeltaGraph (SPSS) l Prism l ViSta l Business graphics l MS Excel l many other spreadsheet programs l Graphics in statistical packages l S-Plus, R s powerful, difficult l SPSS interactive graphics s easy, expensive l Systat s good reputation l SAS GRAPH language s expensive, powerful l Stata s simple, limited Advice: Avoid “default” choice in all programs (almost always wrong). Avoid programs with “Chart Type” menus – wrong approach.

26 Download slides from: http://www.jolley.com.au Graph formats l Object-oriented l lines, shapes, etc can be identified within graph l each object has attributes (eg size, colour, font) l editable using selection and “grouping” l Common formats: l Postscript (ps,eps) l Windows metafile (wmf,emf) l Bit-mapped l image exists as a collection of pixels l each pixel is light or dark, coloured l can edit only pixels not objects l often “compressed” to save disk space, bandwidth l Common formats l graphics interchange (gif) l Windows bitmap (bmp) l JPEG interchange (jpg) Advice: Use WMF format where possible. Paste WMF into PowerPoint, “ungroup”, then edit objects for publication quality.

27 Download slides from: http://www.jolley.com.au References, further reading Tufte ER. The Visual Display of Quantitative Information Cheshire, CT: Graphics Press 2001 www.edwardtufte.com Cleveland WS. Visualizing Data Summit NJ: Hobart Press, 1993 Wainer H. Visual Revelations. Graphical Tales of Fate and Deception from Napoleon Bonaparte to Ross Perot Mahwah, NJ: Lawrence Erlbaum Associates, Publishers. 1997 www.erlbaum.com Wilkinson L. The Grammar of Graphics New York: Springer Verlag, 1999

28 Download slides from: http://www.jolley.com.au Summary l Howie’s Helpful Hints for bad graphs: l Don’t show the data l Show the data inaccurately l Obfuscate the data l Steps for better graphs: l Identify direction of cause & effect l Exploit levels of measurement l Accommodate visual perception principles l Minimise non-data ink l Don’t use Excel unless you have to l And if you have to, don’t use the default chart!

29 Download slides from: http://www.jolley.com.au Summary so far … l Howie’s Helpful Hints for bad graphs: l Don’t show the data l Show the data inaccurately l Obfuscate the data l Steps for better graphs: l Identify direction of cause & effect l Exploit levels of measurement l Accommodate visual perception principles l Minimise non-data ink l Don’t use Excel unless you have to l And if you have to, don’t use the default chart!

30 Download slides from: http://www.jolley.com.au Next … Some principles for better scientific graphs …


Download ppt "Visualising Variables – Validly! Damien Jolley School of Health & Social Development Deakin University, Victoria Originally presented at: ASCEPT Workshop:"

Similar presentations


Ads by Google