<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;A0YHQnkzcCp7ImA9WhBbEE4.&quot;"><id>tag:blogger.com,1999:blog-27862247</id><updated>2013-05-08T19:52:13.788+01:00</updated><category term="repeated measure ANOVA" /><category term="Loftus and Masson" /><category term="social psychology" /><category term="likelihood ratio" /><category term="serious stats" /><category term="MLwin" /><category term="robust statistics" /><category term="moderator effects" /><category term="puzzle" /><category term="cliff effect" /><category term="dynamite plots" /><category term="multilevel models" /><category term="Greenhouse-Geisser" /><category term="PsyPAG" /><category term="3d visualization" /><category term="evidence" /><category term="psychology" /><category term="statistical significance" /><category term="SPSS" /><category term="simple main effects" /><category term="exploratory data analysis" /><category term="p values" /><category term="ANOVA" /><category term="Bayes factors" /><category term="BPS" /><category term="meta-analysis" /><category term="academic misconduct" /><category term="data fabrication" /><category term="confidence intervals" /><category term="Bath" /><category term="fraud" /><category term="science" /><category term="compound symmetry" /><category term="Bayesian statistics" /><category term="statistical inference" /><category term="loglinear models" /><category term="p curves" /><category term="sample chapter" /><category term="contrasts" /><category term="data sets" /><category term="memory" /><category term="displaying means" /><category term="philosophy" /><category term="sphericity" /><category term="blog" /><category term="effect size" /><category term="language-as-fixed effect fallacy" /><category term="likelihood" /><category term="text book" /><category term="Goldstein and Healy" /><category term="nonparametric statistics" /><category term="interaction" /><category term="comparing correlations" /><category term="Kenwood-Roger approximation" /><category term="linear mixed models" /><category term="statistics" /><category term="moderated multiple regression" /><category term="correlation" /><category term="replication" /><category term="R" /><category term="NTU" /><category term="multiple imputation" /><title>Psychological Statistics</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://psychologicalstatistics.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>39</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/PsychologicalStatistics" /><feedburner:info uri="psychologicalstatistics" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DkQMR38zfSp7ImA9WhBUF0U.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-5778403160068042562</id><published>2013-04-21T20:50:00.000+01:00</published><updated>2013-05-05T21:06:26.185+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-05T21:06:26.185+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="multilevel models" /><category scheme="http://www.blogger.com/atom/ns#" term="effect size" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="ANOVA" /><category scheme="http://www.blogger.com/atom/ns#" term="replication" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical inference" /><category scheme="http://www.blogger.com/atom/ns#" term="repeated measure ANOVA" /><category scheme="http://www.blogger.com/atom/ns#" term="science" /><title>Neuroscience, statistical power and how to increase it</title><content type="html">There has been quite a bit of buzz recently about the &lt;a href="http://www.nature.com/nrn/journal/v14/n5/full/nrn3475.html"&gt;Button et al. Nature Reviews Neuroscience paper on statistical power&lt;/a&gt;. Several similar reviews have been published in psychology and other disciplines and come to broadly the same conclusion - that most studies are underpowered.&amp;nbsp;The main difference with the Button et al. study is that they don't just find that typical studies are underpowered to &amp;nbsp;detect the average size of effect in a field, but they find extremely low power in neuroscience research (around 20%, and below 10% for some subfields). Contrast this with a typical review from psychology and related disciplines. Sedlmeier and Gigerenzer (1989, Table) report power to detect a medium effect size  ranging from 37% to 89%. David Clark-Carter (1997) reviewed papers in the British Journal of Psychology and found power to detect a median effect of 59%. Thus the power of typical research in psychology is not that high, but (if we make fairly reasonable assumptions about the size of typical effects in the discipline) estimates appear to be around 60% rather than the 20% found in the Button et al. paper.  What caught me interest, however, was some of the responses to the publication in blogs and blog comments. For example one of the comments on &lt;a href="http://phenomena.nationalgeographic.com/2013/04/10/neuroscience-cannae-do-it-capn-it-doesnt-have-the-power/?preview=true"&gt;Ed Yong's piece&lt;/a&gt; stated &lt;blockquote&gt;Another argument for parallel recording. Traditional, one-neuron-at-a-time neurophysiological papers study 10s of neurons. Multi-electrode studies have 100s or 1000s of neurons. Enough power? Maybe not, but way more power than single neuron recording.&lt;/blockquote&gt; A similar sentiment arises in &lt;a href="http://computingforpsychologists.wordpress.com/2013/04/11/comment-on-the-button-et-al-2013-neuroscience-power-failure-article-in-nrn/"&gt;Matt Wall's piece&lt;/a&gt;:  &lt;blockquote&gt;MRI scanners have significantly improved in the last ten years, with 32 or even 64-channel head-coils becoming common, faster gradient switching, shorter TRs, higher field strength, and better field/data stability all meaning that the signal-to-noise has improved considerably. This serves to cut down one source of noise in fMRI data – intra-subject variance. The inter-subject variance of course remains the same as it always was, but that’s something that can’t really be mitigated against, and may even be of interest in some (between-group) studies. On the analysis side, new multivariate methods are much more sensitive to detecting differences than the standard mass-univariate approach.&lt;/blockquote&gt; &lt;p&gt;Matt's piece is thoughtful and I would agree which much of what he writes, but the idea that increasing observations within a person will do much to resolve the problem is probably not correct (and for reasons that Matt mentions). To understand why, consider the typical nature of the experimental designs being used. As I understand it there are essentially two main types of design: a nested repeated measures design or a factorial design with fully crossed random effects. There are many variants (e.g., additional layers of nesting, additional fully crossed random factors), but the aforementioned characteristics capture characteristics most of the designs I'm familiar with in cognitive neuroscience (and possibly in many other areas of neuroscience).&lt;/p&gt; &lt;p&gt;In a nested repeated measures design there are m multiple measurements within each of &lt;em&gt;n&lt;/em&gt; persons. The multiple measurement are correlated in some way so - in general - the power of the design has an effective sample size that is less than &lt;em&gt;N&lt;/em&gt; (where &lt;em&gt;N&lt;/em&gt; = &lt;em&gt;n&lt;/em&gt; * &lt;em&gt;m&lt;/em&gt;). It turns out that for most such designs the limiting factor in power and precision is &lt;em&gt;n&lt;/em&gt; and not &lt;em&gt;m&lt;/em&gt; or &lt;em&gt;N&lt;/em&gt;. &lt;/p&gt; &lt;p&gt;This isn't always true, but generally experimental designs get refined quite quickly to reduce the impact of sources of error in the repeated measurements. This could be increasing the number of trials or tightening up the experimental procedures (e.g., instructions, quality of materials) or by technical advances that reduce measurement error for each measurement occasion. Once you get measurement error per trial moderately low, improving measurement error further has very little impact on power. That's because the error at each measurement occasion includes transient error that can't really be eliminated (many behaviours are just inherently variable from occasion to occasion) and because as you reduce these errors the other sources of error in the study become the main limiting factors on power.&lt;/p&gt; &lt;p&gt;For example, when I was a PhD student many reaction time experiments used computers with dodgy clocks that couldn't time more accurately than 1/60th of a second or around 17 ms (and perhaps many still do). If you are looking for a priming effect of say 30 milliseconds this would seem like a major problem. However, you can get pretty accurate inferences without much bias or loss of power as long as the variability of the RTs are fairly large - which they generally are (Ulrich &amp; Giray, 1989). For most neuroscience work involving humans the limiting factors in power (once you are dealing with a reasonably refined experimental set-up) are therefore related to &lt;em&gt;n&lt;/em&gt;. A further consideration is that top level &lt;em&gt;n&lt;/em&gt; generally needs to be in the 30-50 range or (preferably) greater just to get vaguely reasonable estimates of the variances and covariances if you are dealing with data sampled from approximately normal distributions. Smaller samples also make the study more vulnerably to a atypical 'outlier' at the person level (e.g., a participant using a weird strategy or responding randomly) or to selective bias by the experimenters (dropping a 'noisy' participant because they go against the hypothesis). Having small &lt;em&gt;n&lt;/em&gt; at the top level may also make focus on statistical significance rather than interval estimates of effects more attractive (because it reduces precision of measurement). In other words it encourages studies that find 'evidence' of an effect and discourages focus on accurate estimates of the size of an effect.&lt;/p&gt; &lt;p&gt;For fully crossed random factor designs the situation is worse. In these designs you sample both people and stimuli (e.g., faces, words, etc.) from a large (conservatively assumed to be infinite) population. The limiting factor on power now probably depends not on &lt;em&gt;n&lt;/em&gt;1 (the number of people) or &lt;em&gt;n&lt;/em&gt;2 (the number of stimuli) but the the smaller of &lt;em&gt;n&lt;/em&gt;1 and &lt;em&gt;n&lt;/em&gt;2 (assuming you want to make inferences that generalise to people and stimuli not in your experiment). Thus having 1000 people has little effect on power if your study uses only two faces (and you want to make general inferences about face perception rather than perception of those two faces). This is a slight oversimplification - as it assumes that the stimuli and people are equally variable in terms of what you measure - however it is a good rule of thumb unless variability in either people or stimuli is large enough to swamp the other source.&lt;/p&gt; &lt;p&gt;There is also an important caveat here - I'm assuming that you do the statistics correctly. Many, many studies still analyse fully crossed random factor designs as if they are nested, resulting in spuriously high power (see &lt;a href="http://psychologicalstatistics.blogspot.co.uk/2012/06/stimuli-as-fixed-effect-fallacy.html"&gt;here for an earlier blog post on this&lt;/a&gt;). &lt;/p&gt; &lt;p&gt;This analysis should hold whenever: i) the basic experimental procedure is fairly well-refined, ii) variability between people (or stimuli in appropriate designs) on the measures of interest are non-negligible. Thus it should hold more often than not in psychology and related areas of neuroscience. There are undoubtedly subfields in which it won't hold (e.g., some areas of vision research where &lt;em&gt;n&lt;/em&gt; = 2 studies are common because individual differences on the crucial effects are low). &lt;/p&gt; &lt;em&gt;Postscript&lt;/em&gt; &lt;p&gt;One objection to my conclusion is that if neuroscience power is limited by number of participants and number of stimuli, why do small samples persist? This is a good question. I offer three main answers: i) As with psychology (where power is also generally low, remember) you can have low power for each test if you have multiple tests. Maxwell (2004) pointed out that a typical 2 x 2 factorial design might only have 50% power per test but that means 87.5% chance of at least one significant result. Thus low power generally produces something statistically significant (though it also predicts that replications will generally fail to show consistent patterns of statistical significance), ii) researcher degrees of freedom (see Simmons et al., 2011), and iii) many research teams run many small studies (e.g., undergraduate and masters projects) so (in some cases) there are many unreported studies with null results.&lt;/p&gt;    &lt;em&gt;References&lt;/em&gt; &lt;p&gt;Maxwell, S. E. (2004). The persistence of underpowered studies in psychological research: causes, consequences, and remedies. &lt;em&gt;Psychological Methods, 9&lt;/em&gt;, 147–63.&lt;/p&gt;&lt;p&gt;Simmons, J. P., Nelson, L. D., &amp; Simonsohn, U. (2011). False-positive psychology: undisclosed flexibility in data collection and analysis allows presenting anything as significant. &lt;em&gt;Psychological Science, 22&lt;/em&gt;, 1359-66.&lt;/p&gt;   &lt;p&gt;Ulrich, R., &amp; Giray, M. (1989). Time resolution of clocks: Effects on reaction time measurement - Good news for bad clocks. &lt;em&gt;British Journal of Mathematical &amp; Statistical Psychology, 42&lt;/em&gt;, 1-12.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/EWlXSyZXoFU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/5778403160068042562/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2013/04/neuroscience-statistical-power-and-how.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/5778403160068042562?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/5778403160068042562?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/EWlXSyZXoFU/neuroscience-statistical-power-and-how.html" title="Neuroscience, statistical power and how to increase it" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2013/04/neuroscience-statistical-power-and-how.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQCQHY5cCp7ImA9WhBWFk8.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-7162393095033564308</id><published>2013-04-10T21:38:00.002+01:00</published><updated>2013-04-10T21:39:21.828+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-10T21:39:21.828+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="social psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="science" /><title>Reflecting on the end of history illusion illusion</title><content type="html">&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;A while back Jon Sutton at &lt;a href="http://www.bps.org.uk/publications/psychologist/psychologist" target="_blank"&gt;The Psychologist&lt;/a&gt; asked my opinion on the end of history illusion. This was sparked by&amp;nbsp;an interesting&amp;nbsp;&lt;a href="http://www.wjh.harvard.edu/~dtg/Quoidbach%20et%20al%202013.pdf" target="_blank"&gt;Science paper by Quoidbach, Gilbert and Wilson&lt;/a&gt;. Blogger and mathematician Jordan Ellenberg had written a blog post arguing that the paper makes a mistake: &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;"&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 22px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;a somewhat subtle mistake, but a bad mistake, and one which kills a big chunk of the paper"&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 22px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 22px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Jon wanted a second opinion, and after a bit of reading I replied that Ellenberg's criticisms were valid. I meant to blog about it at the time but got caught up in other things. Consequently I missed the &lt;a href="http://bps-research-digest.blogspot.co.uk/2013/01/the-end-of-history-illusion-illusion.html" target="_blank"&gt;BPS research digest piece&lt;/a&gt; on it.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 22px;"&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;The reason for writing this blog post is because the flaw that Ellenberg spotted is quite interesting in its own right and because both the description by Ellenberg and the description in the Research Digest article probably don't explain it clearly enough for some readers to appreciate. Ellenberg's piece is (I hasten to add) crystal clear but relies on a reader being comfortable with the formal, mathematical approach he takes (which many psychologists won't be). The Research Digest description just gives the brief gist (with a link to Ellenberg for the full picture). Here is my belated attempt at a psychologist-friendly interpretation with no formal notation - and as little maths as possible.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; line-height: 22px;"&gt;According to the end of history illusion people underestimate how much they will change in the future. For example, someone asked to predict how their personality would change in the next ten years would come up with a prediction closer to their original position than their actual position. Quoidbach et al. tested this mainly by asking people to predict future values on some psychological variable (e.g., a personality test score) and then showing that actual change is much greater than the difference between the original and predicted scores. This seems highly plausible, but Ellenberg pointed out that the difference in the predicted and original scores is a different quantity from the expected (absolute) change in scores.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; line-height: 22px;"&gt;Why is this? Perhaps the easiest way to understand is to work through a simple example. Imagine that my extraversion score is 50 on a scale that goes from 0 (extremely introverted) to 100 (extremely extraverted). A researcher then asks me to predict my extraversion score in 10 years time. I, being a keen observer of human nature (bear with me on this if you know me - it is just an example), am aware that personality is not fixed and judge that I am likely to change quite a bit - say 15 points - on the scale. However, I might get more extraverted or I might get more introverted (depending on how life treats me over the next ten years). Given that I'm in the middle of the scale, I could end with a score of 35 or a score of 65. Thus I predict that my extraversion score after 10 years will be (35 + 65)/2 = 50. It looks as though I've predicted zero change, when what I've done is give the best prediction I can (one that minimizes my prediction error). Had I instead been asked to give the absolute change I expected, my answer would have been different. It would have been (15 + 15)/2 = 15 (not zero).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; line-height: 22px;"&gt;Although the example is simple it captures the essence of the problem. Commenters on Ellenberg's blog looked again at the raw data that Quoidback et al. provided. According to their analyses the end of history illusion largely disappears when analyzed correctly (though only some of the data sets support such a reanalysis). Thus if the end of history illusion effect exists (and the basic premise seems highly plausible) it is quite probably a much smaller and more fragile effect than originally thought. That makes sense to me - because I'm not sure that such a bias could be both pervasive and large in the face of the counter-evidence available to people about past change in themselves and change in others.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; line-height: 22px;"&gt;My continued interest in the effect is slightly different. There seems to be a cognitive illusion at work here - one that makes the difference between the original score and predicted score appear to be a good measure of an entirely different quantity - the expected absolute change in score ...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/RynNTwUpLJY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/7162393095033564308/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2013/04/reflecting-on-end-of-history-illusion.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/7162393095033564308?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/7162393095033564308?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/RynNTwUpLJY/reflecting-on-end-of-history-illusion.html" title="Reflecting on the end of history illusion illusion" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2013/04/reflecting-on-end-of-history-illusion.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkENQ305eSp7ImA9WhNaFE0.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-4629260375218487371</id><published>2013-01-28T21:27:00.001Z</published><updated>2013-01-28T21:31:32.321Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-28T21:31:32.321Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="BPS" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="philosophy" /><category scheme="http://www.blogger.com/atom/ns#" term="Bayesian statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical inference" /><category scheme="http://www.blogger.com/atom/ns#" term="science" /><title>The growth of Bayesian methods in psychology</title><content type="html">&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;a href="http://onlinelibrary.wiley.com/doi/10.1111/bmsp.2013.66.issue-1/issuetoc" target="_blank"&gt;The British Journal of Mathematical and Statistical Psychology &lt;/a&gt;has published a target article (with commentaries and reply) by Andrew Gelman and Cosma Shalizi on philosophy and the practice of Bayesian statistics.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Mark Andrews and I introduce the target article with an editorial aimed at providing some background to psychologists who are interested in Bayesian statistics but need a little back story. Our main aim was to try and indicate that the debate about Bayesian statistics has moved on from the frequentist vs. Bayesian argument and on to more interesting territory - illustrated both by the target article and the commentaries.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Also I believe that as of writing access is free to the target article and commentary ...&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="margin-left: 24pt; text-indent: -24.0pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Andrews, M., &amp;amp; Baguley, T. (2013). &lt;a href="http://onlinelibrary.wiley.com/doi/10.1111/bmsp.12004/abstract" target="_blank"&gt;Prior approval: The growth of Bayesian methods in psychology&lt;/a&gt;. &lt;i&gt;British Journal of Mathematical and Statistical Psychology&lt;/i&gt;, &lt;i&gt;66&lt;/i&gt;, 1–7. doi:10.1111/bmsp.12004&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font: normal normal normal 12px/normal Times; margin-bottom: 12px; margin-left: 32px; margin-right: 0px; margin-top: 0px; text-indent: -32px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;Gelman, A., &amp;amp; Shalizi, C. R. (2013). &lt;a href="http://onlinelibrary.wiley.com/doi/10.1111/j.2044-8317.2011.02037.x/abstract" target="_blank"&gt;Philosophy and the practice of Bayesian statistics&lt;/a&gt;. &lt;i&gt;British Journal of Mathematical and Statistical Psychology&lt;/i&gt;, &lt;i&gt;66&lt;/i&gt;, 8–38. doi:10.1111/j.2044-8317.2011.02037.x&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #494848; font-family: ff-dagny-web-pro, 'Helvetica Neue', Arial, sans-serif; font-size: 13px; font: normal normal normal 12px/normal Times; margin-bottom: 12px; margin-left: 32px; margin-right: 0px; margin-top: 0px; text-indent: -32px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #494848; font-family: ff-dagny-web-pro, 'Helvetica Neue', Arial, sans-serif; font-size: 13px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #494848; font-family: ff-dagny-web-pro, 'Helvetica Neue', Arial, sans-serif; font-size: 13px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: #494848; font-family: ff-dagny-web-pro, 'Helvetica Neue', Arial, sans-serif; font-size: 13px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/zwR7CQyhDO0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/4629260375218487371/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2013/01/the-growth-of-bayesian-methods-in.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/4629260375218487371?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/4629260375218487371?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/zwR7CQyhDO0/the-growth-of-bayesian-methods-in.html" title="The growth of Bayesian methods in psychology" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2013/01/the-growth-of-bayesian-methods-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8DQHY4fSp7ImA9WhJbFkg.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-8418503535344214853</id><published>2012-09-25T23:10:00.001+01:00</published><updated>2012-09-26T12:27:51.835+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-09-26T12:27:51.835+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="exploratory data analysis" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="Bath" /><category scheme="http://www.blogger.com/atom/ns#" term="3d visualization" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Guest post: Visualizing data using a 3D printer</title><content type="html">&lt;em&gt;In a break from my usual obsessions and interests here is a guest blog post by &lt;a href="http://www.drianwalker.com/work.html"&gt;Ian Walker&lt;/a&gt;.  I'm posting it because I think it is rather cool and hope it will be of interest to some of my regular readers. Ian is perhaps best known (in the blogosphere) for his work on transport psychology - particularly cycling - but is also an expert on psychological statistics.&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;br /&gt;&lt;/em&gt;
Some time ago, I had some data that lent themselves to a three-dimensional surface plot. The problem was, the plot was quite asymmetrical, and finding the right viewing angle to see it effectively on a computer screen was extremely difficult. I spent ages tweaking angles and every possible view seemed to involve an unacceptable compromise.&lt;br /&gt;
&lt;br /&gt;
Of course, displaying fundamentally three-dimensional items in two dimensions is an ancient problem, as any cartographer will tell you. That night, as I lay thinking in bed, a solution presented itself. I had recently been reading about the work of a fellow University of Bath researcher, Adrian Bowyer, and his &lt;a href="http://www.reprap.org/wiki/RepRap"&gt;RepRap project&lt;/a&gt;, to produce an open-source three-dimensional printer. The solution was obvious: I had to find a way to print R data on one of these printers!&lt;br /&gt;
&lt;br /&gt;
I managed to meet up with Adrian back in May 2012, and he explained to me the structure of the STL (stereolithography) files commonly used for three-dimensional printing. These describe an object as a large series of triangles. I decided I'd have a go at writing R code to produce valid STL files.&lt;br /&gt;
&lt;br /&gt;
I'm normally a terrible hacker when it comes to programming; I usually storm in and try to make things work as quickly as possible then fix all the mistakes later. This time, I was much more methodical. As a little lesson to us all, the methodical approach worked: I had the core code producing valid STL files in under 3 hours. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, it then took until September 2012 before I could get hold of somebody with a 3D printer who'd let me test my code. A few days ago the first prototype was produced, as you can see in this photograph:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;img alt="3dfunctionr.jpg" border="0" height="400" src="http://lh6.ggpht.com/-7Y9PZF8ipSk/UGIo6wqQT4I/AAAAAAAAAJA/eVaqm9E3F7M/3dfunctionr.jpg?imgmax=800" width="300" /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
So now I'd like to share the code under a Creative Commons BY-NC-SA licence, in case anybody else finds it useful. You can download the code &lt;a href="http://drianwalker.com/r2stl.r" target="_blank"&gt;here&lt;/a&gt;, in a file called &lt;span style="font-family: monospace;"&gt;r2stl.r&lt;/span&gt;. One day, when I learn how, I might try to make this a library, but for now you can just call this code with R's &lt;span style="font-family: monospace;"&gt;source()&lt;/span&gt; command. All that is in the file is the function &lt;span style="font-family: monospace;"&gt;r2stl()&lt;/span&gt;, and having once called the file with &lt;span style="font-family: monospace;"&gt;source()&lt;/span&gt;, you can then use the r2stl function to generate your STL files. The command is:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;r2stl(x, y, z, filename='3d-R-object.stl', object.name='r2stl-object', z.expand=FALSE, min.height=0.008, show.persp=FALSE, strict.stl=FALSE)&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
&lt;li&gt;&lt;b&gt;x&lt;/b&gt;, &lt;b&gt;y&lt;/b&gt; and &lt;b&gt;z&lt;/b&gt; should be vectors of numbers, exactly as with R's normal &lt;span style="font-family: monospace;"&gt;persp()&lt;/span&gt; plot. x and y represent a flat grid and z represents heights above this grid&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;&lt;b&gt;filename&lt;/b&gt; is pretty obvious, I hope&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;&lt;b&gt;object.name&lt;/b&gt; The STL file format requires the object that is being described to have a name specified inside the file. It's unlikely anybody will ever see this, so there's probably no point changing it from the default&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;&lt;b&gt;z.expand&lt;/b&gt; By default, r2stl() normalizes each axis so it runs from 0 to 1 (this is an attempt to give you an object that is agnostic with regard to how large it will eventually be printed). Normally, the code then rescales the z axis back down so its proportions relative to x and y are what they were originally. If, for some reason, you want your 3D plot to touch all six faces of the imaginary cube that surrounds it, set this parameter to TRUE&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;&lt;b&gt;min.height&lt;/b&gt; Your printed model would fall apart if some parts of it had z values of zero, as this would mean zero material is laid down in those parts of the plot. This parameter therefore provides a minimum height for the printed material. The default of 0.008 ensures that, when printed, no part of your object is thinner than around 0.5 mm, assuming that it is printed inside a 60 mm x 60 mm x 60 mm cube. Recall that the z axis gets scaled from 0 to 1. If you are printing a 60mm-tall object then a z-value of 1 represents 60mm. The formula is min.height=min.mm/overall.mm, so if we want a minimum printed thickness of 0.5mm and the overall height of your object will be 60mm, 0.5/60 = 0.008, which is the default. If you want the same minimum printed thickness of 0.5mm but want to print your object to 100mm, this parameter would be set to 0.5/100 = 0.005&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;&lt;b&gt;show.persp&lt;/b&gt; Do you want to see a &lt;span style="font-family: monospace;"&gt;persp()&lt;/span&gt; plot of this object on your screen as the STL is being generated? Default is FALSE&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;&lt;b&gt;strict.stl&lt;/b&gt; To make files smaller, this code cheats and simply describes the entire rectangular base of your object as two huge triangles. This seems to work fine for printing, but isn't strictly proper STL format. Set this to TRUE if you want the base of your object described as a large number of triangles and don't mind larger files&lt;/li&gt;
&lt;br /&gt;  &lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To view and test your STL files before you print them, you can use various programs. I have had good experiences with the free, open-source &lt;a href="http://meshlab.sourceforge.net/"&gt;Meshlab&lt;/a&gt;, which even has iPhone and Android versions so you can let people interact with your data even when you're in the pub. Even if all you ever do is show people your 3D plots using Meshlab, I believe &lt;span style="font-family: monospace;"&gt;r2stl()&lt;/span&gt; still offers a useful service, as it makes viewing data far more interactive than static &lt;span style="font-family: monospace;"&gt;persp()&lt;/span&gt; plots. To actually get your hands on a printer, you might try your local school - apparently lots of schools have got rapid prototypers these days.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Demo&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;source('r2stl.r')&lt;br /&gt;&lt;br /&gt;# Let's do the classic &lt;span style="font-family: monospace;"&gt;persp()&lt;/span&gt; demo plot, as shown in the photograph above&lt;br /&gt;&lt;br /&gt;x &amp;lt;- seq(-10, 10, length= 100)&lt;br /&gt;&lt;br /&gt;y &amp;lt;- x&lt;br /&gt;&lt;br /&gt;f &amp;lt;- function(x,y) { r &amp;lt;- sqrt(x^2+y^2); 10 * sin(r)/r }&lt;br /&gt;&lt;br /&gt;z &amp;lt;- outer(x, y, f)&lt;br /&gt;&lt;br /&gt;z[is.na(z)] &amp;lt;- 1&lt;br /&gt;&lt;br /&gt;r2stl(x, y, z, filename="lovelyfunction.stl", show.persp=TRUE)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Now let's look at R's Volcano data&lt;br /&gt;&lt;br /&gt;z &amp;lt;- volcano&lt;br /&gt;&lt;br /&gt;x &amp;lt;- 1:dim(volcano)[1]&lt;br /&gt;&lt;br /&gt;y &amp;lt;- 1:dim(volcano)[2]&lt;br /&gt;&lt;br /&gt;r2stl(x, y, z, filename="volcano.stl", show.persp=TRUE)&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope you might find this code useful. Any questions or suggestions, then please get in touch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
September 2012 - &lt;a href="http://www.drianwalker.com/work.html"&gt;Ian Walker&lt;/a&gt;, Department of Psychology, University of Bath.&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/fiJtJO2VsaM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/8418503535344214853/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/09/guest-post-visualizing-data-using-3d.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8418503535344214853?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8418503535344214853?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/fiJtJO2VsaM/guest-post-visualizing-data-using-3d.html" title="Guest post: Visualizing data using a 3D printer" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-7Y9PZF8ipSk/UGIo6wqQT4I/AAAAAAAAAJA/eVaqm9E3F7M/s72-c/3dfunctionr.jpg?imgmax=800" height="72" width="72" /><thr:total>4</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/09/guest-post-visualizing-data-using-3d.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cCRXo9fyp7ImA9WhJWFUU.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-8261916757342750742</id><published>2012-08-21T21:29:00.003+01:00</published><updated>2012-08-21T21:31:04.467+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-21T21:31:04.467+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="p curves" /><category scheme="http://www.blogger.com/atom/ns#" term="blog" /><category scheme="http://www.blogger.com/atom/ns#" term="effect size" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical significance" /><category scheme="http://www.blogger.com/atom/ns#" term="replication" /><category scheme="http://www.blogger.com/atom/ns#" term="p values" /><category scheme="http://www.blogger.com/atom/ns#" term="confidence intervals" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical inference" /><category scheme="http://www.blogger.com/atom/ns#" term="science" /><category scheme="http://www.blogger.com/atom/ns#" term="academic misconduct" /><title>Yet more on p values ...</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;I wasn't going to post on this ... but couldn't resist. A recent &lt;a href="http://www.wfu.edu/~masicaej/MasicampoLalandeInPressQJEP.pdf" target="_blank"&gt;QJEP paper&lt;/a&gt; reports suspicious patterns in &lt;i&gt;p&lt;/i&gt;&amp;nbsp;values across three psychology journals.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;This has been blogged elsewhere (see &lt;a href="http://bps-research-digest.blogspot.co.uk/2012/08/phew-made-it-how-uncanny-proportion-of.html" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://scholarlykitchen.sspnet.org/2012/08/21/sort-of-significant-are-psychology-papers-just-nipping-past-the-p-value/" target="_blank"&gt;here&lt;/a&gt;), so I haven't got too much to add. Although I generally like the paper and am glad it got published in a decent journal (I'm an EPS member and subscriber so I'm glad they published it), I can't say I find the main finding surprising. Everything we know about how significance testing is used in practice would predict the basic pattern of a bump just below &lt;i&gt;p&lt;/i&gt; = .05.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;My main criticism of the paper would be that they didn't use a multilevel model to account for dependencies in &lt;i&gt;p&lt;/i&gt; values from the same paper - while I agree with the authors that the outcome wouldn't change, I think it could be potentially informative to model the dependency (and a simple multilevel model shouldn't be more than a few minutes to set-up and run if the data are coded by study). An even better approach for future work might be to sample papers from multiple journals and thus estimate the stability of the pattern across journals, disciplines etc.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;The main reason I'm blogging is because of a few points raised at other blogs. The generally excellent &lt;a href="http://bps-research-digest.blogspot.co.uk/2012/08/phew-made-it-how-uncanny-proportion-of.html" target="_blank"&gt;BPS research digest&lt;/a&gt;&amp;nbsp;reported:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;Masicampo and&amp;nbsp;Lalande said their findings pointed to the need to educate researchers about the proper interpretation of null hypothesis significance testing and the value of alternative approaches, such as reporting&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Effect_size" style="text-decoration: none;"&gt;effect sizes&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;and&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Confidence_interval" style="text-decoration: none;"&gt;confidence intervals&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;. " ... [T]he field may benefit from practices aimed at counteracting the single-minded drive toward achieving statistical significance," they said.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;I couldn't find the effect sizes comment in the paper (but it may have been from conversations with the authors). I'm pretty sure all the journals surveyed reported effect sizes - point estimates of the magnitude of the effect. Perhaps they meant standardized effect size, but if so the advice is in my view doubly wrong. Standardized effect size has all sort of problems (see &lt;a href="http://nottinghamtrent.academia.edu/ThomBaguley/Papers/76659/Standardized_or_simple_effect_size_What_should_be_reported" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://nottinghamtrent.academia.edu/ThomBaguley/Papers/138898/When_correlations_go_bad_" target="_blank"&gt;here&lt;/a&gt; for my take).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;I won't repeat myself too much over this, but point out that standardized effect size generally obscures the thing you want to measure (as well as distorting it in several ways). That is the first reason why they aren't a solution to dodgy analyses - they will tend to make it harder for people to spot the problems in a study when there are meaningful, well-understood units (such as percentage recall, response times and so forth). They can maybe, sometimes help you interpret arbitrary measures - but generally only if you don't know the range of the scale. For instance, a shift of 3 points on a 7 point scale is huge and might make people suspicious whereas an effect size estimate of &lt;i&gt;d&lt;/i&gt; = .6 or &lt;i&gt;r&lt;/i&gt; = .4 might not.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;The second reason is that effect size in general (and standardized effect size in particular) is at least as vulnerable as &lt;i&gt;p&lt;/i&gt; values to publication bias, optional stopping and all the other known problems with statistical significance as routinely practiced. Combine small studies with a threshold for publication (e.g., &lt;i&gt;p&lt;/i&gt; &amp;lt; .05 or &lt;i&gt;d&lt;/i&gt; &amp;gt; 0.5) and effect size is substantially biased upwards (the bias is lower for large studies). Standardized effect size makes this worse because small samples tend to underestimate population variance and thus inflate the effect size estimate yet further. The final straw is that standardized effect size is easy to game. For instance, Cohen's &lt;i&gt;d&lt;/i&gt; type metrics for a paired design&amp;nbsp;come in at least four flavours (removing between-subject variance or not, crossed with a pooled or non-pooled error standard deviation). Removing the between-subject effect &amp;nbsp;increases the reported &lt;i&gt;d&lt;/i&gt; value artificially relative to an independent subjects design (even though the magnitude of the effect is generally assumed not to change). A similar problem occurs with variance explained measures such as eta-squared. People generally report partial eta-squared inappropriately in preference to classical eta-squared (which is generally smaller except in very simple designs).*&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;So, effect size is a red herring. The point on confidence intervals (and interval estimates in general) is a good one.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;The piece at &lt;a href="http://scholarlykitchen.sspnet.org/2012/08/21/sort-of-significant-are-psychology-papers-just-nipping-past-the-p-value/" target="_blank"&gt;The Scholarly Kitchen&lt;/a&gt;&amp;nbsp;(TSK) annoyed me a little. The tone implied that the problem with &lt;i&gt;p&lt;/i&gt; values a problem in psychology. It isn't. It is a problem in any field that obsesses about &lt;i&gt;p&lt;/i&gt; values (including most quantitative work in social sciences, medicine and science). I'm prepared to bet you'd get the same patterns in medical research (and they could well be much worse given some of the pressures to publish positive results in that area). More interesting TSK &amp;nbsp;notes that JEP: General fared better than the other two journals looked at. TSK speculates that this is a result of better editing and reviewing. As it is the only one of the three journals I have reviewed for, I am disposed to agree with this. However, I suspect it may simply be that&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif; line-height: 19px;"&gt;JEP: General publishes papers with methods that dilute the bias. In particular, I think it publishes more papers that focus on model fit and hence look for &lt;i&gt;p &lt;/i&gt;&amp;gt; .05 more often.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif; line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif; line-height: 19px;"&gt;The QJEP paper also mentions replicability statistics in passing. Another red herring, I think. Replicability can't be reliably estimated from small samples (see &lt;a href="http://nottinghamtrent.academia.edu/ThomBaguley/Papers/1657248/Replication_probabilities_and_p-rep" target="_blank"&gt;here&lt;/a&gt;).&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;* Actually, if you have to report eta-squared measures you should use generalized eta-squared (see Olejnik &amp;amp; Algina, 2003; Baguley, 2012).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;i&gt;References&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-size: 10px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; line-height: 1.5em; margin-bottom: 1.7em; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify; vertical-align: baseline;"&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Baguley, T. (2012, in press).&amp;nbsp;&lt;a href="http://www.amazon.co.uk/gp/product/0230577180/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=0230577180" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;"&gt;Serious stats: A guide to advanced statistics for the behavioral sciences&lt;/a&gt;. Basingstoke: Palgrave.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; line-height: 1.5em; margin-bottom: 1.7em; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify; vertical-align: baseline;"&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Olejnik, S., &amp;amp; Algina, J. (2003). Generalized eta and omega squared statistics: Measures of effect size for some common research designs. Psychological Methods, 8, 434-447.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/E_K5eIdx_sM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/8261916757342750742/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/08/yet-more-on-p-values.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8261916757342750742?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8261916757342750742?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/E_K5eIdx_sM/yet-more-on-p-values.html" title="Yet more on p values ..." /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>3</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/08/yet-more-on-p-values.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QGQXk_fCp7ImA9WhJXEE4.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-3440129871350770610</id><published>2012-08-04T00:08:00.001+01:00</published><updated>2012-08-04T00:08:40.744+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-04T00:08:40.744+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="social psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="effect size" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical significance" /><category scheme="http://www.blogger.com/atom/ns#" term="replication" /><category scheme="http://www.blogger.com/atom/ns#" term="p values" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical inference" /><category scheme="http://www.blogger.com/atom/ns#" term="data fabrication" /><category scheme="http://www.blogger.com/atom/ns#" term="fraud" /><category scheme="http://www.blogger.com/atom/ns#" term="academic misconduct" /><title>What's up with social psychology?</title><content type="html">... or to be more precise, what's up with experimental social psychology?&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
A number of high profile cases of suspected (in some cases admitted) fraud have been highlighted in psychology recently - my own discipline - but they've (nearly all arisen in experimental social psychology. If you are unaware, the best known cases seem to be &lt;a href="http://andrewgelman.com/2012/03/resolution-of-diederik-stapel-case/" target="_blank"&gt;Diederik Stapel&lt;/a&gt;, &lt;a href="http://retractionwatch.wordpress.com/2012/06/25/following-investigation-erasmus-social-psychology-professor-retracts-two-studies-resigns/" target="_blank"&gt;Dirk Smeesters&lt;/a&gt; and now &lt;a href="http://retractionwatch.wordpress.com/2012/07/31/psychological-science-retracts-a-sanna-paper-citing-lawyers-cope-and-retraction-watch/" target="_blank"&gt;Lawrence Sanna&lt;/a&gt;. Another high profile case, &lt;a href="http://neuroskeptic.blogspot.co.uk/2010/09/marc-hausers-scapegoat.html" target="_blank"&gt;Marc Hauser&lt;/a&gt;, is in a somewhat related field (but a stretch to call it experimental social psychology). The not so recent case of &lt;a href="ttp://hardsci.wordpress.com/2011/01/18/the-ongoing-legacy-of-a-case-of-scientific-misconduct/" target="_blank"&gt;Karen Ruggiero&lt;/a&gt; could also be included.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
A separate problem - set aside from the problem of deliberate fraud - are some controversies over specific studies which have apparently hard to replicate effects. The discussion here is around Bargh's priming study and Bem's ESP study. There is &lt;a href="http://www.nature.com/news/replication-studies-bad-copy-1.10634" target="_blank"&gt;ample discussion of this elsewhere&lt;/a&gt;, but the main point is that the standard practices in experimental social psychology may encourage publication of spurious effects.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Fraud and other kinds of academic misconduct are rare and far from confined to psychology - see &lt;a href="http://retractionwatch.wordpress.com/" target="_blank"&gt;retraction watch&lt;/a&gt;&amp;nbsp;(though the scale of Stapel's fraud may have raise psychology's profile on its own). However, the spotlight is focusing heavily on social psychology the moment. My initial view was that experimental social psychology was coming up purely by coincidence, but the recent cases have made me wonder. In the rest of this post I'm going to sketch out some thoughts on what might be going on.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
(1) Coincidence. There remains quite good evidence for the whole thing being coincidence. Psychology and social psychology are popular fields with lots of researchers so there will (sadly) be a few frauds. Deliberate fraud is a rare event and (to quote the late, great &lt;a href="http://amzn.to/MVdV7d" target="_blank"&gt;Robert Abelson&lt;/a&gt;) "probability is lumpy". Discrete random events are appear to be evenly or smoothly distributed in the long run (averaging over many events) so rare events are usually clustered in a given sample of small, fixed &lt;i&gt;n&lt;/i&gt;. So if you look a 10 or 100 fraud cases there are bound to be clusters among certain disciplines.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
(2) Deep discipline-specific flaws. Is there something fundamentally wrong with experimental social psychology research itself? Perhaps. The Bem and Bargh cases point to problems such as lack of replication, pressure to publish, over-emphasis on &lt;i&gt;p&lt;/i&gt; values,&amp;nbsp;intolerance of messy data&amp;nbsp;and desire for surprising or counter-intuitive effects. The problem with most of these arguments is that they are not discipline-specific and they are often cited as factors leading to fraud in other disciplines. On the other hand it may be that one or more of these factors are particularly pronounced in experimental social psychology (and I'll come back to this point later).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
(3) Enhanced scrutiny. There are three strong reasons to suspect enhanced scrutiny contributes to the recent cases. First, the reports of fraud or other problems are not independent. A case - particularly a big one such as the Diederik Stapel case - necessarily draws further scrutiny to particular journals, groups of researchers and perhaps the whole of a field or discipline. Second, several of the cases were uncovered by the same person: &lt;a href="http://blogs.discovermagazine.com/notrocketscience/2012/07/03/an-interview-with-uri-simonsohn-the-data-sleuth-behind-the-smeesters-psychology-misconduct-case/" target="_blank"&gt;Uri Simonsohn&lt;/a&gt;. As Simonsohn works broadly in the area of experimental social psychology, it isn't that surprising that he applied his fraud detection tools to suspicious studies in his own field. Third, findings in experimental social psychology compete for explanatory power more closely with folk psychology explanations than most other fields. To put it another way, just about everyone can assess the plausibility of a study that looks at whether exposing people to old age related material in the lab makes walk faster when they leave the lab or whether eating meat makes you more aggressive. Moreover, they often have strong opinions on these kinds of findings.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
At the moment, I think the enhanced scrutiny explanation looks like a strong contender to me. I wouldn't rule out coincidence, but I think we can expect to see a few more dodgy studies unearthed. I think we can also expect to see the label of social psychology expanded to include suspect research in related areas (such as Marc Hauser's work).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Nevertheless, I do think there is one area in which experimental social psychology may be particularly vulnerable to fraud or questionable research practices. High status journals often seek interesting (aka surprising) effects and large effect sizes in the papers they publish. Such findings are more likely to be false (e.g., see &lt;a href="http://www.ncbi.nlm.nih.gov/pubmed/16014596" target="_blank"&gt;here&lt;/a&gt;). This is part of a general problem with statistical significance which acts a filter (see &lt;a href="http://andrewgelman.com/2011/09/the-statistical-significance-filter/" target="_blank"&gt;Andrew Gelman's blog for lots of discussion on this&lt;/a&gt;). A single small experiment can usually only detect relatively 'big' effects - hence it overestimates the size of effects. When you add an implicit requirement for 'big' effects you are biasing your journal or discipline to spurious and fraudulent results. Thus far experimental psychology isn't so different from other fields where small studies are common (e.g., much of medicine, health, neuroscience, biology, and education). The problem may be that effects are inherently smaller in experimental social psychology than other areas of psychology.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I've put the label 'big' in italics because what we're really talking about is the detectability or discriminability of an effect (standardized effect size) - which is its size relative to the noise or error in the data. Experiments with social stimuli are inherently noisy because there are so many variables to control for and because it is often difficult to use big manipulations (as they tend to be pretty obvious to participants). Of course many of the effects may truly be tiny. For example the age priming effect seems plausible to me but I can't believe it would be a large absolute effect in terms of walking speed (easily swamped by other factors or exaggerated by them) - thus my guess is that the original Bargh study over-estimated the effect size (&lt;a href="http://en.wikipedia.org/wiki/Decline_effect" target="_blank"&gt;as most early studies tend to&lt;/a&gt;).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I think that social psychology and psychology will learn from these cases and the increased scrutiny that &amp;nbsp;seems to be around. I hope we will improve our statistical work, place greater value on replication and reduce the ridiculous pressure to publish ground-breaking, surprising, counter-intuitive work with high frequency. Ground-breaking work will get published, but you can't really tell what research will have real scientific impact until years later (at least two or three years and often much longer, in my view). I hope that psychologists (particularly editors and reviewers) will be more tolerant of messy data (see &lt;a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1850704" target="_blank"&gt;here&lt;/a&gt;) and not quite perfectly watertight conclusions. Many fraudulent studies are detected because of data that are far too clean (real data tend to be messy).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/XxZvMLt8Fxc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/3440129871350770610/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/08/whats-up-with-social-psychology.html#comment-form" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/3440129871350770610?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/3440129871350770610?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/XxZvMLt8Fxc/whats-up-with-social-psychology.html" title="What's up with social psychology?" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>9</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/08/whats-up-with-social-psychology.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMGSHw4fCp7ImA9WhJSFEU.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-8082734134750023512</id><published>2012-07-05T12:40:00.001+01:00</published><updated>2012-07-05T12:40:29.234+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-07-05T12:40:29.234+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="ANOVA" /><category scheme="http://www.blogger.com/atom/ns#" term="p values" /><category scheme="http://www.blogger.com/atom/ns#" term="linear mixed models" /><category scheme="http://www.blogger.com/atom/ns#" term="confidence intervals" /><category scheme="http://www.blogger.com/atom/ns#" term="repeated measure ANOVA" /><category scheme="http://www.blogger.com/atom/ns#" term="serious stats" /><category scheme="http://www.blogger.com/atom/ns#" term="text book" /><category scheme="http://www.blogger.com/atom/ns#" term="comparing correlations" /><title>Serious stats book officially published</title><content type="html">My &lt;a href="http://amzn.to/Kq0GKK" target="_blank"&gt;serious stats&lt;/a&gt; book is officially published (in the UK at least). The US release date is next month (August 7th). I'm not sure why the release is later (possibly extra shipping time for the books). The earlier European release date is I suppose compensation for the usual pattern for most books and DVDs (where the US is usually first).&lt;br /&gt;
&lt;br /&gt;
More details on the &lt;a href="http://seriousstats.wordpress.com/" target="_blank"&gt;companion blog for the book&lt;/a&gt;. The book blog also contains additional resources related to the book and updates on topics covered in the book. Past posts include CIs for differences in correlations, alternatives to the Friedman test, graphing condition means for ANOVA designs, Upcoming plans include (among other things) posts on multilevel ordered logistic regression, &lt;i&gt;p&lt;/i&gt; values from multilevel models, order restricted inference ... as soon as I get the time.&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/LngUI9JGf0I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/8082734134750023512/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/07/serious-stats-book-officially-published.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8082734134750023512?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8082734134750023512?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/LngUI9JGf0I/serious-stats-book-officially-published.html" title="Serious stats book officially published" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/07/serious-stats-book-officially-published.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYBRXk_eSp7ImA9WhJTGU8.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-2588197047120107212</id><published>2012-06-28T23:53:00.000+01:00</published><updated>2012-06-28T23:55:54.741+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-28T23:55:54.741+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="p curves" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="p values" /><category scheme="http://www.blogger.com/atom/ns#" term="philosophy" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical significance" /><category scheme="http://www.blogger.com/atom/ns#" term="likelihood" /><category scheme="http://www.blogger.com/atom/ns#" term="serious stats" /><category scheme="http://www.blogger.com/atom/ns#" term="cliff effect" /><category scheme="http://www.blogger.com/atom/ns#" term="evidence" /><category scheme="http://www.blogger.com/atom/ns#" term="Bayesian statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical inference" /><category scheme="http://www.blogger.com/atom/ns#" term="likelihood ratio" /><category scheme="http://www.blogger.com/atom/ns#" term="science" /><title>p values, the cliff effect and the nature of evidence</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;I've been thinking about &lt;i&gt;p&lt;/i&gt; values quite a bit recently - prompted by a other bloggers and by some journal work. One interesting phenomenon in this area is the cliff effect: a supposed abrupt shift in researchers' confidence in an effect when moving from &lt;i&gt;p&lt;/i&gt; &amp;gt; .05 to &lt;i&gt;p&lt;/i&gt; &amp;lt; .05 (assuming that alpha is set at .05, as it usually is).&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;The &lt;i&gt;p&lt;/i&gt; value cliff effect is interesting for a number of reasons (e.g., as a possible cause of dichotomous thinking about effects - see Rosenthal &amp;amp; Gaito, 1963). Personally (e.g., Baguley, 2012a), I think that the tendency to dichotomous thinking is more subtle and complex - and not just a consequence of the cliff effect. Furthermore, there is some doubt about the prevalence of the cliff effect.&amp;nbsp;Poitevineau and Lecoutre (2001) argued that there was a clear cliff effect in only a minority of participants (4 out of 18 in their sample of researchers with PhDs). The appearance of a cliff in the full sample came from averaging over a mix of patterns among the participants - with, for instance, some showing linear increases and some exponential increases in confidence as &lt;i&gt;p&lt;/i&gt; decreased.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;My own musings on this are about whether there is a 'correct' pattern of confidence in an effect as &lt;i&gt;p&lt;/i&gt; decreases. I'm not sure a sensible answer is possible, but I think it is possible to have a stab at answering if you make a few assumptions. First, assume that confidence is driven by the evidential value of a &lt;i&gt;p&lt;/i&gt; value. This allows us to draw on the &lt;a href="http://en.wikipedia.org/wiki/Likelihood_principle" target="_blank"&gt;likelihood principle&lt;/a&gt; (and hence have some mathematical and philosophical basis for the analysis). I'm not going to explain likelihood or the likelihood principle here - though there is a brief introduction in &lt;a href="http://seriousstats.wordpress.com/2012/02/04/serious-stats-a-quick-chapter-summary/" target="_blank"&gt;Chapter 11 of Serious Stats&lt;/a&gt; (Baguley, 2012b).&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Proceeding on this basis, you hit a major stumbling block. The evidential value in the data is contained in the likelihood function - but the &lt;i&gt;p&lt;/i&gt; value doesn't give us the likelihood function (at least, not straight-forwardly). Furthermore, the &lt;a href="http://en.wikipedia.org/wiki/Likelihood_principle#The_law_of_likelihood" target="_blank"&gt;law of likelihood&lt;/a&gt; implies that you can't get the evidence for an effect from either &lt;i&gt;p&lt;/i&gt; or the likelihood. Evidence for a specific hypothesis (e.g., a null hypothesis such as mu = 0) can only be assessed relative to a specific alternative hypothesis (e.g., mu = 10). So even if you could get at the likelihood function you'd need to know what alternative hypothesis each researcher had in mind when they evaluated &lt;i&gt;p&lt;/i&gt;. To make the problem tractable you could assume that the assume the alternative hypothesis at the most likely value (the maximum likelihood estimate). For simple situations this boils down to the observed parameter estimate of interest (e.g., a mean or difference in means). This is helpful because you can go from a&amp;nbsp;&lt;i&gt;p&lt;/i&gt; value derived from a &lt;i&gt;z&lt;/i&gt; statistic to an approximate&amp;nbsp;&lt;i&gt;maximum likelihood ratio&lt;/i&gt; fairly easily (with additional assumptions about the asymptotic distribution of the test statistic).* The maximum likelihood ratio is the largest possible ratio of the evidential support in favour of the alternative hypothesis relative to the null hypothesis (of zero effect) from the data at hand (ignoring support from other sources). This is the most favourable assessment of the evidence for the alternative hypothesis and against the null on the basis of the data alone&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;(and true evidential support is almost certain to be lower)&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Plotting the maximum likelihood ratio as a function of &lt;i&gt;p&lt;/i&gt; gives the following curve:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-YCWdglQ_m1M/T-zbXWUmPlI/AAAAAAAAAH0/jd1BFr16w1w/s1600/LR+plot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-YCWdglQ_m1M/T-zbXWUmPlI/AAAAAAAAAH0/jd1BFr16w1w/s400/LR+plot.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;It flattens out when &lt;i&gt;p&lt;/i&gt; &amp;gt; .20, so I've just shown the 'curvy' bit. Of course there is no particular reason why you'd use likelihood ratio ratio than say probability of the null hypothesis being false:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-U84PRsZNzMI/T-zchZQ8ThI/AAAAAAAAAH8/Zu0U2CJsCA8/s1600/max+LR+prob+plot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-U84PRsZNzMI/T-zchZQ8ThI/AAAAAAAAAH8/Zu0U2CJsCA8/s400/max+LR+prob+plot.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;This shows a more gradual curve. Yet another possibility is the logarithm of the maximum likelihood ratio (commonly used to index evidential support in statistics):&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-HcAZHLsgGVs/T-zc4p6wp4I/AAAAAAAAAIE/qQUQELNgy-I/s1600/log+LR+plot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-HcAZHLsgGVs/T-zc4p6wp4I/AAAAAAAAAIE/qQUQELNgy-I/s400/log+LR+plot.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Each of these is a plausible quantity to drive intuitions of evidential support (though you could easily arrive at different curves by making different - and perhaps more plausible - assumptions).&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;The upshot is that neither a fairly abrupt cliff effect, nor a smooth (near linear) function nor a steep exponential-style curve would be unreasonable. It is also clear that the task itself - assessing confidence in an effect - is far from trivial. Almost any continuous monotonic function could be considered as rational given the right assumptions and there is no particular reason to expect researchers to be able to do the right computations in their heads ...&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;On the other hand, a step function cliff effect does seem unreasonable - and it is definitely still interesting to understand the psychology of expert and non-expert statistical reasoning. However, we should be wary of assuming that people are being irrational or are bad at statistical reasoning on the basis of this kind of task.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;i&gt;Post script&lt;/i&gt;. This is all predicated on a few idle speculations, several highly debatable assumptions and a quick play with some R code. It is quite possible I've overlooked something major ...&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;* see Edwards et al. (1963) or&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Serious Stats Chapter section 11.4.2.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;References&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 17px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Baguley, T. (2012a). &lt;a href="http://nottinghamtrent.academia.edu/ThomBaguley/Papers/1358154/Can_we_be_confident_in_our_statistics" target="_blank"&gt;Can we be confident in our statistics?&lt;/a&gt; &lt;i&gt;The Psychologist, 25&lt;/i&gt;, 128-9.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 23px;"&gt;Baguley, T. (2012b).&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 23px;"&gt;&lt;span class="Apple-style-span" style="border-color: initial; border-style: initial; outline-color: initial; outline-style: initial;"&gt;&lt;i&gt;&lt;a href="http://amzn.to/Kq0GKK" target="_blank"&gt;Serious stats: A guide to advanced statistics for the behavioral sciences&lt;/a&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 23px;"&gt;. Basingstoke: Palgrave.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 23px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 23px;"&gt;Edwards, W., Lindman, H., &amp;amp; Savage, L. J. (1963). Bayesian statistical inference for psychological research. &lt;i&gt;Psychological Review, 70&lt;/i&gt;, 193-242.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Poitevineau, J., &amp;amp; Lecoutre, B. (2001). Interpretation of significance levels by psychological&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;researchers: The .05 cliff effect may be overstated. &lt;i&gt;Psychonomic Bulletin &amp;amp; Review, 8&lt;/i&gt;,&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;846-850.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Rosenthal, R. &amp;amp; Gaito, J. (1963). The interpretation of levels of significance by psychological researchers. &lt;i&gt;Journal of Psychology, 5&lt;/i&gt;5, 33-38.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 81px; white-space: nowrap;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="a" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-color: initial; border-color: initial; border-color: initial; border-style: initial; border-top-style: none; border-width: initial; border-width: initial; font-style: normal; font-weight: normal; height: 1px; left: 824px; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: absolute; top: 1079px; vertical-align: baseline; white-space: nowrap; word-spacing: -1px; word-wrap: break-word;"&gt;Rosenthal, R. &amp;amp; Gaito, J. (1963). The interpreta&lt;span class="w7" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-color: initial; border-color: initial; border-color: initial; border-style: initial; border-top-style: none; border-width: initial; border-width: initial; display: inline-block; font-style: normal; font-weight: normal; height: 1px; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; white-space: nowrap; width: 7px; word-wrap: break-word;"&gt;&lt;/span&gt;tion of levels of significance by&lt;/span&gt;&lt;span class="a" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-color: initial; border-color: initial; border-color: initial; border-style: initial; border-top-style: none; border-width: initial; border-width: initial; font-style: normal; font-weight: normal; height: 1px; left: 824px; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: absolute; top: 1189px; vertical-align: baseline; white-space: nowrap; word-spacing: -1px; word-wrap: break-word;"&gt;psychological researchers. Journal of Psychology, 55, 3338.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/pqVhYuJHCqk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/2588197047120107212/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/06/p-values-cliff-effect-and-nature-of.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/2588197047120107212?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/2588197047120107212?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/pqVhYuJHCqk/p-values-cliff-effect-and-nature-of.html" title="p values, the cliff effect and the nature of evidence" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-YCWdglQ_m1M/T-zbXWUmPlI/AAAAAAAAAH0/jd1BFr16w1w/s72-c/LR+plot.png" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/06/p-values-cliff-effect-and-nature-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8MRnc9fip7ImA9WhJTE0o.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-850886292749739104</id><published>2012-06-21T16:16:00.001+01:00</published><updated>2012-06-22T15:54:47.966+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-22T15:54:47.966+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="multilevel models" /><category scheme="http://www.blogger.com/atom/ns#" term="blog" /><category scheme="http://www.blogger.com/atom/ns#" term="SPSS" /><category scheme="http://www.blogger.com/atom/ns#" term="language-as-fixed effect fallacy" /><category scheme="http://www.blogger.com/atom/ns#" term="ANOVA" /><category scheme="http://www.blogger.com/atom/ns#" term="linear mixed models" /><category scheme="http://www.blogger.com/atom/ns#" term="Kenwood-Roger approximation" /><category scheme="http://www.blogger.com/atom/ns#" term="repeated measure ANOVA" /><category scheme="http://www.blogger.com/atom/ns#" term="serious stats" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>The stimuli-as-fixed-effect fallacy</title><content type="html">&lt;a href="http://neuroskeptic.blogspot.co.uk/"&gt;Neuroskeptic has just blogged&lt;/a&gt;&amp;nbsp;on a new paper by Judd, Westfall and Kenny on&amp;nbsp;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;i&gt;Treating stimuli as a random factor in social psychology: A new and comprehensive solution to a pervasive but largely ignored problem&lt;/i&gt;. I can't access the original paper (which is supposed to be available via my University but hasn't appeared yet ...) but I know a little bit about the topic and thought I'd write a few words.&lt;/span&gt;&lt;br /&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;What stimulated me to write was a) a few of the comments on Neuroskeptic's blog, and b) that I've just written a book that covers the topic in some detail. (Yes -&amp;nbsp;&lt;a href="http://amzn.to/Kq0GKK" target="_blank"&gt;this book&lt;/a&gt;!).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;The basic problem is that standard statistical analyses in psychology treat participants (subjects) as a random factor, but stimuli as a fixed factor. Thus our statistics assume that the goal of inference is to say something about some population that those participants are representative of (rather than just the particular people in our study). By treating stimuli as fixed it is assumed that we've exhaustively sampled the population of interest in our study. This limits statistical generalization to those particular stimuli. This is an unattractive property for psycholinguists (because they tend to be interested in, say, all concrete nouns rather than the 30 nouns used in the study). The same issue may apply to lots of other types of stimuli (faces, people, voices, pictures, logic problems and so forth).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;The comments fell into several camps, but one response was that this was another case of researchers getting basic stats wrong. I consider this to be unfair because we're not talking basic stats here. The problem is quite subtle and the solutions are, in statistical terms, far from basic. Furthermore, it is not always an error. There are situations in which you don't need to worry about the problem and situations in which it is debatable what the correct approach is.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;Another response was the psycholinguists have known about this problem for years (true!) and have analyzed their data correctly (false!). The problem came to prominence in a paper by Herb Clark (&lt;i&gt;The language-as-fixed-effect fallacy&lt;/i&gt;), but was originally raised by Coleman (1964). Clark noted that running separate ANOVAs treating subjects as unit of analysis and items as&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;unit of analysis did not solve the problem (by-subject and by-item analyses). Either analysis is statistically non-significant the effect fails to generalize, but if both are&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;statistically significant the correct analysis (that combines variability across subjects and items) might still be&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;statistically non-significant. His solution was to estimate the correct ANOVA test statistic (quasi &lt;i&gt;F&lt;/i&gt; or &lt;i&gt;F&lt;/i&gt;') with a simple-to-calculate minimum value (min &lt;i&gt;F&lt;/i&gt;'). This is known to be conservative (i.e., produces&amp;nbsp;&lt;i&gt;p&lt;/i&gt;&amp;nbsp;values that are slightly too large) but not unreasonably so in practice (see&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;Raaijmakers et al., 1999).&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;Raaijmakers et al. (1999) show that until recently most psycholinguistic researchers still got it wrong (e.g., by reporting separate by-item and by-subject analyses).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;What is the correct approach? Well, it depends. First, do you need to generalize beyond your stimuli set? This has to do with your research goals. In some applied research you might just need to understand how people respond to a particular set of stimuli. A single stimulus or stimulus set can offer a counterexample to a strong claim (e.g., that &lt;i&gt;X&lt;/i&gt; is always the case). Alternatively, it might be reasonable to assume that the stimuli are - for the purposes of the study - very similar to others in the population (i.e., that population variability is negligible). This might be the case for certain mass-produced products (e.g., brands of chocolate bar) or precision-engineered equipment.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;However, a lot of the time you do want to generalize beyond your sample of stimuli ...&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;That leaves you with the option of altering the design of the study or doing incorporating the extra variability owing to stimuli into the analysis. The design option was considered by Clark (1973) and by&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;Raaijmakers et al. (1999). Clark pointed out that if each person had a different (ideally random) sample of items from the stimulus population then the &lt;i&gt;F&lt;/i&gt; ratio of a conventional ANOVA would be correct. The principle here is quite simple: &lt;i&gt;all relevant sources of variability need to be represented in the analysis&lt;/i&gt;. By varying the stimuli between participants the variability is present and ends up being incorporated into the between-subjects error term.* This is quite a neat method and can be easy to set up in some studies (e.g., if you have a &lt;i&gt;very&lt;/i&gt; large pool of words to sample from by computer).&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;Raaijmakers et al. (1999) also notes that you get the correct &lt;i&gt;F&lt;/i&gt; ratios from certain other designs. This, in my view, is only partly true. Any design that restricts the population sampled from (of participants or stimuli) restricts its variability and therefore restricts its generalizability to the pool of&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;participants or stimuli&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;being sampled from.&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Recent development in statistics and software (or at least recent awareness of them in psychology) have brought the discussion of the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;i&gt;language-as-fixed-effect fallacy&lt;/i&gt; or more properly &lt;i&gt;stimuli-as-fixed-effect fallacy&lt;/i&gt; back to prominence. In principle it is possible to use a multilevel (or linear mixed) model to deal with the problem of multiple random effects (and this has all sorts of other advantages). However, the usual default model is a nested model that implicitly assumes that stimuli presented to each person are different.&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;A nice point here is that a nested multilevel repeated measures model fitted with RML (restricted maximum likelihood) and a certain covariance structure (compound symmetry) is pretty much equivalent to repeated measures ANOVA and can be used to derive standard &lt;i&gt;F&lt;/i&gt; tests etc. Thus Clark's assertion about using a design with stimuli nested within participants producing the correct F ratios is confirmed.&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;Baayen et al. (2008) offered a critique of the standard approach and explained how to fit a multilevel model with crossed random factors (i.e., where stimuli are the same for all participants ... or equivalently participants are the same for all stimuli). These models can be fit in software such as MLwiN or R (but not SPSS**) that allows for cross-classified multilevel. The &lt;i&gt;lme4&lt;/i&gt; package in R is particularly useful because it fits these models fairly effortlessly.&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;This looks to be the solution described by&amp;nbsp;&lt;/span&gt;Judd, Westfall and Kenny - as far as I can tell by their abstract and the solution I cover in my book (Baguley, 2012).&lt;br /&gt;
&lt;br /&gt;
* Note that a by-item analysis or by-subject analysis violates this principle because the each analysis uses the average response (averaged over the levels of the other random factor) and the variability around this average is unavailable to the analysis.&lt;br /&gt;
&lt;br /&gt;
** UPDATE: Jake Westfall kindly sent me a copy of the paper. I have not read it properly yet but looks extremely good. He points out that recent versions of SPSS can run cross-classified models (I'm still on an older version). Their paper includes SPSS, R and SAS code. I would still recommend R over SPSS. One highlight is that show how to compute the Kenwood-Roger approximation in R. Complex multilevel models make it difficult to assess the correct &lt;i&gt;df&lt;/i&gt; for effects and the&amp;nbsp;Kenwood-Roger approximation is one of the better solutions. In my book I used parametric boostrapping or HPD intervals to get round this problem, but this is potentially a very useful addition.&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 18px;"&gt;&lt;i&gt;References&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 18px;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span style="color: black; font-family: Times, 'Times New Roman', serif;"&gt;



















&lt;/span&gt;&lt;br /&gt;
&lt;div class="ReferenceStyle"&gt;
&lt;span style="color: black; font-family: Times, 'Times New Roman', serif;"&gt;Baayen, R. H., Davidson, D. J., &amp;amp; Bates, D. M.
(2008). Mixed-effects modeling with crossed random effects for subjects and
items. &lt;i&gt;Journal of Memory &amp;amp; Language,
59&lt;/i&gt;, 390-412.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: black; font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="ReferenceStyle"&gt;
&lt;span style="color: black; font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: black; font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="ReferenceStyle"&gt;
&lt;span style="color: black;"&gt;&lt;span style="font-family: Times, 'Times New Roman', serif; font-size: 12pt; line-height: 115%;"&gt;&lt;a href="http://amzn.to/Kq0GKK" target="_blank"&gt;Baguley, T. (2012). &lt;i&gt;Serious stats: A guide to advanced statistics for the behavioral sciences&lt;/i&gt;. Basingstoke: Palgrave.&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: black; font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span style="color: black; font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span style="color: black;"&gt;Clark, H. H. (1973). The language-as-fixed-effect fallacy: A critique of language statistics in psychological research.&amp;nbsp;&lt;i&gt;Journal of Verbal Learning and Verbal Behavior, 12&lt;/i&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;, 335-359.&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span style="color: black; font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span lang="EN-US"&gt;Coleman, E. B. (1964). Generalizing to a language population.&amp;nbsp;&lt;i&gt;Psychological Reports, 14&lt;/i&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;, 219-226.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;/div&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span style="color: black;"&gt;Raaijmakers, J. G. W., Schrijnemakers, J. M. C., &amp;amp; Gremmen, F. (1999). How to deal with "The language-as-fixed-effect fallacy": Common misconceptions and alternative solutions.&amp;nbsp;&lt;i&gt;Journal of Memory &amp;amp; Language, 41&lt;/i&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;, 416-426.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/39KT4bADGk4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/850886292749739104/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/06/stimuli-as-fixed-effect-fallacy.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/850886292749739104?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/850886292749739104?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/39KT4bADGk4/stimuli-as-fixed-effect-fallacy.html" title="The stimuli-as-fixed-effect fallacy" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/06/stimuli-as-fixed-effect-fallacy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4CSXk_fSp7ImA9WhJTGU0.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-8611486187331986229</id><published>2012-05-27T21:28:00.000+01:00</published><updated>2012-06-28T17:29:28.745+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-28T17:29:28.745+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="displaying means" /><category scheme="http://www.blogger.com/atom/ns#" term="exploratory data analysis" /><category scheme="http://www.blogger.com/atom/ns#" term="dynamite plots" /><category scheme="http://www.blogger.com/atom/ns#" term="ANOVA" /><category scheme="http://www.blogger.com/atom/ns#" term="interaction" /><category scheme="http://www.blogger.com/atom/ns#" term="confidence intervals" /><category scheme="http://www.blogger.com/atom/ns#" term="serious stats" /><category scheme="http://www.blogger.com/atom/ns#" term="text book" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>The aesthetics of error bars</title><content type="html">This blog and &lt;a href="http://seriousstats.wordpress.com/"&gt;my other main blog (the companion blog for my book)&lt;/a&gt; are now syndicated via &lt;a href="http://www.r-bloggers.com/"&gt;R-bloggers&lt;/a&gt; (posts tagged R only) and &lt;a href="http://statsblogs.com/"&gt;statsblogs.com&lt;/a&gt;. The latter is a relatively new blog aggregator but looks to have some interesting content. R-bloggers it quite well established and I was already an occasional reader.&lt;br /&gt;
&lt;br /&gt;
Looking at some recent content I noticed an &lt;a href="http://emdbolker.wikidot.com/blog:dynamite"&gt;interesting piece by Ben Bolker&lt;/a&gt; (author, among other things, of the excellent &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;bbmle&lt;/span&gt; package in R) on dynamite plots. Until a few years ago (possibly in the early research for my book) I had not heard the term 'dynamite plot' or the negative press the attract in some research fields. In my own discipline (psychology) and in experimental psychology in particular bar plots with error bars (looking like sticks of dynamite stacked in a row) are rather popular. In fact, I was taught to use them in preference to dot plots when plotting interactions in ANOVA (their main application in experimental psychology). The main arguments against dot plots are that it is easy to manipulate them to make effects look large large by adjusting the scale (and sometimes software does this automatically). The advantage of switching to a bar plot is that these are supposed to be zero-referenced and thus effects are likely to more appropriately scaled.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a dynamite plot adapted from chapter 3 of &lt;a href="http://www.blogger.com/%3Cscript%20type=%22text/javascript%22%20src=%22http://wms.assoc-amazon.co.uk/20070822/GB/js/link-enhancer-common.js?tag=psychologic05-21%22%3E%20%3C/script%3E%20%3Cnoscript%3E%20%20%20%20%20%3Cimg%20src=%22http://wms.assoc-amazon.co.uk/20070822/GB/img/noscript.gif?tag=psychologic05-21%22%20alt=%22%22%20/%3E%20%3C/noscript%3E"&gt;my book&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-5gkFgYdKyWE/T8KFMQAaMlI/AAAAAAAAAFs/n7F5SxcjV0c/s1600/dynamite+plot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-5gkFgYdKyWE/T8KFMQAaMlI/AAAAAAAAAFs/n7F5SxcjV0c/s320/dynamite+plot.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
(Colleagues of mine will note that the quantity displayed by the error bars is not labeled. This should always be clear from plot or figure caption - here they are 95% CIs).&lt;/div&gt;
&lt;br /&gt;
Some of the material on dynamite plots on the web is somewhat one-sided (e.g., see &lt;a href="http://pablomarin-garcia.blogspot.co.nz/2010/02/why-dynamite-plots-are-bad.html"&gt;here&lt;/a&gt;, &lt;a href="http://biostat.mc.vanderbilt.edu/wiki/pub/Main/TatsukiKoyama/Poster3.pdf"&gt;here&lt;/a&gt;, &lt;a href="http://sharpstatistics.co.uk/stats/comparing-data-sets/"&gt;here&lt;/a&gt; or the comments &lt;a href="http://flowingdata.com/2008/02/15/how-to-read-and-use-a-box-and-whisker-plot/"&gt;here&lt;/a&gt;).&amp;nbsp;Ben Bolker bravely presents a more balanced picture. He also gets to the heart of the issue by noting that most criticisms of dynamite plots suggest box plots or plots of raw data as alternatives. This doesn't seem appropriate if your goal is inference rather than description. As Bolker notes, if you've decided to something like ANOVA you are already implicitly assuming approximate normality of the errors and so forth. Thus if the main purpose of the plot is inferential or to display key patterns among the data, box plots or raw data plots are not so useful. (Don't get me wrong I think think that plotting raw data is a good idea - but exploratory work and model checking are different from inference). So for a plot of means with error bars, the choice of dot plot or bar plot is one of aesthetics. These days my preference is for dot plots (which are more versatile and have a better information to ink ratio), but I think a well constructed dynamite plot can be appropriate in some situations. I would usually save these for a situation in which the pattern was quite simple (e.g., a 2 by 2 interaction), there was a meaningful zero or other reference point and when my audience are familiar with this style of plot and may prefer them.&lt;br /&gt;
&lt;br /&gt;
A further aesthetic point here is how to plot the error bars themselves. I am persuaded by &lt;a href="http://andrewgelman.com/2011/07/any-good-articles-on-the-use-of-error-bars/"&gt;Andrew Gelman's argument&lt;/a&gt;&amp;nbsp;that the crossbars on conventional error bar plots are ugly and counterproductive. They draw your attention to the extremes of the error bar - when values closer to the statistic being estimated are more plausible. Here is the earlier dyamite plot redrawn as a conventional error bar plot and in cleaner Gelman-approved style:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-stcvR9hl5qg/T8KF9TYH3-I/AAAAAAAAAF0/Bhv5cQ46hQY/s1600/error+bar+plots.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="196" src="http://4.bp.blogspot.com/-stcvR9hl5qg/T8KF9TYH3-I/AAAAAAAAAF0/Bhv5cQ46hQY/s400/error+bar+plots.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
I find the version on the right to be much prettier. Furthermore it makes it easier to adapt them into two-tiered error bar plots. I like to use two-tier plots to convey 95% CIs for individual means (outer tier) and &lt;a href="http://psychologicalstatistics.blogspot.co.uk/2012/03/graphing-between-subject-confidence.html"&gt;inferential (difference-adjusted) 95% CIs&lt;/a&gt; (inner tier). The inner tier approximates to a 95% CI for the difference - so that the means can be considered different by conventional criteria if the inner tier error bars don't overlap:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-cmVbr3eqU6s/T8KI0xrrYSI/AAAAAAAAAGA/Lt47DTS4W2g/s1600/twotiered.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/-cmVbr3eqU6s/T8KI0xrrYSI/AAAAAAAAAGA/Lt47DTS4W2g/s400/twotiered.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In my paper on &lt;a href="http://psychologicalstatistics.blogspot.co.uk/2011/10/calculating-and-graphing-within-subject.html"&gt;within-subject CIs&lt;/a&gt;&amp;nbsp;I used the style on the left. However, with hindsight I wish I'd included the style on the right. Varying the width of the bars avoids the ugly crossbars but may make detecting a 'statistically significant' difference trickier. I think that aesthetics win here because graphical methods aim to support informal inference - they are not supposed to be there for fine-grain, formal inference (which can be supported by formal hypothesis tests of various kinds - not just null hypothesis significance tests).&lt;br /&gt;
&lt;br /&gt;
UPDATE: The functions for these plots are on the&amp;nbsp;&lt;a href="mailto:http://seriousstats.wordpress.com/2012/06/21/confidence-intervals-with-tiers/" target="_blank"&gt;book blog&lt;/a&gt;. More generally my functions for the book, CIs for ANOVA and a few other things are all available&amp;nbsp;&lt;a href="http://www2.ntupsychology.net/seriousstats/SeriousStatsAllfunctions.txt" target="_blank"&gt;here&lt;/a&gt;. I plan to update these functions regularly to add functionality and deal with any&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Undocumented_feature" target="_blank"&gt;undocumented features&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/GAMfRPAd9r0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/8611486187331986229/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/05/aesthetics-of-error-bars.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8611486187331986229?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8611486187331986229?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/GAMfRPAd9r0/aesthetics-of-error-bars.html" title="The aesthetics of error bars" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-5gkFgYdKyWE/T8KFMQAaMlI/AAAAAAAAAFs/n7F5SxcjV0c/s72-c/dynamite+plot.png" height="72" width="72" /><thr:total>5</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/05/aesthetics-of-error-bars.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08HSH4_fip7ImA9WhVXE00.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-7702174590325559825</id><published>2012-03-23T20:52:00.000Z</published><updated>2012-04-13T08:23:59.046+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-13T08:23:59.046+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="blog" /><category scheme="http://www.blogger.com/atom/ns#" term="meta-analysis" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="sample chapter" /><category scheme="http://www.blogger.com/atom/ns#" term="replication" /><category scheme="http://www.blogger.com/atom/ns#" term="serious stats" /><category scheme="http://www.blogger.com/atom/ns#" term="text book" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><category scheme="http://www.blogger.com/atom/ns#" term="contrasts" /><category scheme="http://www.blogger.com/atom/ns#" term="effect size" /><category scheme="http://www.blogger.com/atom/ns#" term="data sets" /><category scheme="http://www.blogger.com/atom/ns#" term="loglinear models" /><category scheme="http://www.blogger.com/atom/ns#" term="science" /><category scheme="http://www.blogger.com/atom/ns#" term="multiple imputation" /><title>Serious stats - free statistics resources</title><content type="html">The companion web site for Serious Stats is now live:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.palgrave.com/psychology/baguley/"&gt;http://www.palgrave.com/psychology/baguley/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The web site includes:&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.palgrave.com/psychology/baguley/about/"&gt;a free sample chapter (Chapter 15: Contrasts)&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://www.palgrave.com/psychology/baguley/students/datasets.html"&gt;data sets&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://www.palgrave.com/psychology/baguley/students/rcode.html"&gt;R scripts&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://www.palgrave.com/psychology/baguley/students/supplements.html"&gt;5 online supplements&lt;/a&gt; (for meta-analysis, multiple imputation, replication probabilities, pseudo-R squared and loglinear models)&lt;br /&gt;
&lt;br /&gt;
Also don't forget the &lt;a href="http://seriousstats.wordpress.com/"&gt;Serious stats blog&lt;/a&gt; to accompany the book.&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/RkQUX5ndQig" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/7702174590325559825/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/03/serious-stats-free-statics-resources.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/7702174590325559825?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/7702174590325559825?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/RkQUX5ndQig/serious-stats-free-statics-resources.html" title="Serious stats - free statistics resources" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/03/serious-stats-free-statics-resources.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8NQHY8fyp7ImA9WhJTGU0.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-8291477012342848370</id><published>2012-03-19T11:58:00.002Z</published><updated>2012-06-28T17:28:11.877+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-28T17:28:11.877+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="Loftus and Masson" /><category scheme="http://www.blogger.com/atom/ns#" term="displaying means" /><category scheme="http://www.blogger.com/atom/ns#" term="Goldstein and Healy" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="ANOVA" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical significance" /><category scheme="http://www.blogger.com/atom/ns#" term="confidence intervals" /><category scheme="http://www.blogger.com/atom/ns#" term="repeated measure ANOVA" /><category scheme="http://www.blogger.com/atom/ns#" term="serious stats" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Graphing between-subject confidence intervals for ANOVA</title><content type="html">&lt;br /&gt;
This is a quick follow up to &lt;a href="http://psychologicalstatistics.blogspot.co.uk/2011/10/calculating-and-graphing-within-subject.html"&gt;my earlier post that discussed how to graph CIs for&amp;nbsp;within-subjects (repeated measures)&amp;nbsp;ANOVA designs&lt;/a&gt;. My forthcoming book &lt;a href="http://www.amazon.co.uk/Serious-Stats-advanced-statistics-behavioral/dp/0230577180"&gt;Serious stats&lt;/a&gt; describes how to do this for between-subjects designs (a much simpler problem). The blog that accompanies the book now has &lt;a href="http://seriousstats.wordpress.com/2012/03/18/cis-for-anova/"&gt;a post summarizing the main options and explaining how to plot difference-adjusted CIs&lt;/a&gt; (95% CIs constructed so that non-overlapping intervals correspond to a statistically significant difference between means at &lt;i&gt;p&lt;/i&gt; &amp;lt; .05). In addition, the post includes R functions to calculate and plot difference-adjusted CIs (though the calculations are not difficult to reproduce by hand).&lt;br /&gt;
&lt;br /&gt;
UPDATE: I've now added functions for two-tiered CIs for between-subjects designs on the &lt;a href="mailto:http://seriousstats.wordpress.com/2012/06/21/confidence-intervals-with-tiers/" target="_blank"&gt;book blog&lt;/a&gt;. More generally my functions for the book, CIs for ANOVA and a few other things are all available &lt;a href="http://www2.ntupsychology.net/seriousstats/SeriousStatsAllfunctions.txt" target="_blank"&gt;here&lt;/a&gt;. I plan to update these functions regularly to add functionality and deal with any &lt;a href="http://en.wikipedia.org/wiki/Undocumented_feature" target="_blank"&gt;undocumented features&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/ngG0vjhA01I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/8291477012342848370/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/03/graphing-between-subject-confidence.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8291477012342848370?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8291477012342848370?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/ngG0vjhA01I/graphing-between-subject-confidence.html" title="Graphing between-subject confidence intervals for ANOVA" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/03/graphing-between-subject-confidence.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIAQ3k7fSp7ImA9WhVREUw.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-7898274551397259397</id><published>2012-03-15T23:35:00.000Z</published><updated>2012-03-18T23:32:22.705Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-18T23:32:22.705Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="p curves" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical significance" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>p curves revisited</title><content type="html">&lt;br /&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;I finally found some time to take a closer look at &lt;i&gt;p&lt;/i&gt; curves. I haven't had a chance to follow-up my simulations (and probably won't for a few weeks if not months), but I have had time to think through the ideas the &lt;i&gt;p&lt;/i&gt; curve approach raises based on some of the comments I've received and a brief exchange with Uri Simonsohn (who has answered a few of my questions).&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;First, I got a couple of things at least partly wrong.&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;i) how &lt;i&gt;p&lt;/i&gt; curves work&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;ii) the potential for correlated &lt;i&gt;p&lt;/i&gt; values&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;i&gt;How p curves work&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;I made the (I think) reasonable assumption that &lt;i&gt;p&lt;/i&gt; curve analysis involved focusing on a bump just under the &lt;i&gt;p&lt;/i&gt; = .05 threshold. Other work (Wicherts et al., 2011) has shown that there is indeed some distortion around this value. My crude simulation suggested that p curves could maybe be used to detect this kind of bump - but that the method was noisy and required large N.&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;All good so far except my assumption was completely wrong. This isn't what Simonsohn and colleagues are proposing at all. They are focusing on the whole of the distribution between &lt;i&gt;p&lt;/i&gt; = 0 and &lt;i&gt;p&lt;/i&gt; = .05. This is a very different kind of analysis because it uses all the available &lt;i&gt;p&lt;/i&gt; value information about '&lt;i&gt;p&lt;/i&gt; hacking' (if you accept the highly plausible premise that &lt;i&gt;p&lt;/i&gt; hacking is concentrated on statistically significant &lt;i&gt;p&lt;/i&gt; values).&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;Null effects will therefore produce a flat &lt;i&gt;p&lt;/i&gt; curve (because the distribution of &lt;i&gt;p&lt;/i&gt; under the null is uniform). Simonsohn argues that non-null effects should produce downward sloping &lt;i&gt;p&lt;/i&gt; curves. He and his colleagues have simulated &lt;i&gt;p&lt;/i&gt; curves under various ranges of effect size to confirm this - and there is also an analytic proof for the normal case (Hung et al., 1997).*&amp;nbsp; I also (inadvertently) confirmed this in my &lt;a href="http://psychologicalstatistics.blogspot.com/2012/02/simulating-p-curves-and-detecting-dodgy.html"&gt;original simulations&lt;/a&gt; - which show the downward sloping trend (but note that I include &lt;i&gt;p&lt;/i&gt; values up to &lt;i&gt;p&lt;/i&gt; = .10 in my plots).&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;However, mixing in &lt;i&gt;p&lt;/i&gt; hacked studies to a flat curve will produce an upward sloping curve - the feature that Simonshohn and his colleagues are focusing on. I haven't simulated this directly - but it seems sensible because &lt;i&gt;p&lt;/i&gt; hacking is (in essence) a flavour of optional stopping (adding data or iterating analyses until you squeeze a statistically significant effect out). Certainly, an upward sloping curve would be a signal of something wierd going on.&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;This approach uses more information than my mistaken '&lt;i&gt;p&lt;/i&gt; bump' approach and so should be much more stable.&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;* It is far from unreasonable to treat the distribution of effects as approximately normal - as is common in meta-analysis (and see also Gillett, 1994), but I don't think the pattern depends strongly on this assumption.&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;i&gt;Correlated p values&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;It is well known that &lt;i&gt;p&lt;/i&gt; values are inherently extremely noisy 'statistics' - they jump around all over the place for identical replications. Geoff Cumming and colleagues have published some good work on this (e.g., Cumming &amp;amp; Fidler, 2009). Thus the same effect in different studies or different effects of similar sizes will in general not tend to have correlated &lt;i&gt;p&lt;/i&gt; values. However, the noise that causes this jumping around will be crystalized if you use the same data to re-calculate the &lt;i&gt;p&lt;/i&gt; value. This could cause correlated &lt;i&gt;p&lt;/i&gt; values where data is re-used or where variables are very highly correlated. For example, this could happen if you add a covariate that is a modest predictor of Y and uncorrelated with and report &lt;i&gt;p&lt;/i&gt; values with and without the covariate. It could also happen if you report essentially the same analysis twice with a very similar variable (e.g., X correlated with children's age or X correlated with years of schooling).&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;There are two main solutions here: a) just filter out p values that re-use data or use highly-correlated data, or b) model the correlations in some way by accounting for within-study clustering - as you might in a multilevel model and some forms of meta-analysis (itself a form of multilevel model).&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;In summary, I think the &lt;i&gt;p&lt;/i&gt; curve approach looks very interesting, and&amp;nbsp; I'd certainly like to see more work on it (and hope to see the full version published some time soon).&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;i&gt;References&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Times; margin: 0.0px 0.0px 12.0px 32.0px; text-indent: -32.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;Cumming, G., &amp;amp; Fidler, F. (2009). Confidence Intervals. &lt;i&gt;Zeitschrift für Psychologie / Journal of Psychology&lt;/i&gt;, &lt;i&gt;217&lt;/i&gt;(1), 15-26.&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Times; margin: 0.0px 0.0px 12.0px 32.0px; text-indent: -32.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;Gillett, R. (1994). Post hoc power analysis. &lt;i&gt;Journal of Applied Psychology&lt;/i&gt;, &lt;i&gt;79&lt;/i&gt;(5), 783-785. doi:10.1037//0021-9010.79.5.783&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Times; margin: 0.0px 0.0px 12.0px 32.0px; text-indent: -32.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;Hung, H. M., O’Neill, R. T., Bauer, P., &amp;amp; Köhne, K. (1997). The behavior of the P-value when the alternative hypothesis is true. &lt;i&gt;Biometrics&lt;/i&gt;, &lt;i&gt;53&lt;/i&gt;(1), 11-22.&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Times; margin: 0.0px 0.0px 12.0px 32.0px; text-indent: -32.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;Wicherts, J. M., Bakker, M., &amp;amp; Molenaar, D. (2011). Willingness to share research data is related to the strength of the evidence and the quality of reporting of statistical results. &lt;i&gt;PloS one&lt;/i&gt;, &lt;i&gt;6&lt;/i&gt;(11), e26828. doi:10.1371/journal.pone.0026828&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;
&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/LdfojyhSPKY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/7898274551397259397/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/03/p-curves-revisited.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/7898274551397259397?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/7898274551397259397?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/LdfojyhSPKY/p-curves-revisited.html" title="p curves revisited" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>2</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/03/p-curves-revisited.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMMQ3wzeCp7ImA9WhVREUw.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-8018539215618229135</id><published>2012-03-14T20:23:00.000Z</published><updated>2012-03-18T23:31:22.280Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-18T23:31:22.280Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="p curves" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical significance" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>R code for p curves</title><content type="html">&lt;div style="overflow: auto;"&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="r geshifilter-R"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;I have finally got around to posting the R code for my &lt;a href="http://psychologicalstatistics.blogspot.com/2012/02/simulating-p-curves-and-detecting-dodgy.html"&gt;&lt;i&gt;p&lt;/i&gt; curve simulation&lt;/a&gt;. Those familiar with R will realize how crude it is (I've been caught up with other urgent stuff and had no time to explore further).&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="r geshifilter-R"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;You are welcome to play with (and improve!) the code. Changing delta will alter the (at present) fixed effect size. It would be more realistic to vary this (and the sample sizes). A good starting point for the effect size distribution (in the population) might be a normal distribution with say a mean of zero and a variance of 1 (see Gillett, 1994).&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="r geshifilter-R" style="font-family: monospace;"&gt;&lt;/pre&gt;
&lt;pre class="r geshifilter-R" style="font-family: monospace;"&gt;&lt;/pre&gt;
&lt;pre class="r geshifilter-R" style="font-family: monospace;"&gt;delta &amp;lt;- &lt;span style="color: #cc66cc;"&gt;0.5&lt;/span&gt;
m1 &amp;lt;- &lt;span style="color: #cc66cc;"&gt;10&lt;/span&gt;
&lt;a href="http://inside-r.org/r-doc/stats/sd"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;sd&lt;/span&gt;&lt;/a&gt; &amp;lt;- &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;
m2 &amp;lt;- m1 + &lt;a href="http://inside-r.org/r-doc/stats/sd"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;sd&lt;/span&gt;&lt;/a&gt;*delta
n1 &amp;lt;- n2 &amp;lt;-&lt;span style="color: #cc66cc;"&gt;25&lt;/span&gt;
&amp;nbsp;
n.sims &amp;lt;- &lt;span style="color: #cc66cc;"&gt;500&lt;/span&gt;
p.data &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/replicate"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;replicate&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;n.sims&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/stats/t.test"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;t.test&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/stats/rnorm"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;rnorm&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;n1&lt;span style="color: #339933;"&gt;,&lt;/span&gt; m1&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/stats/sd"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;sd&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/stats/rnorm"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;rnorm&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;n2&lt;span style="color: #339933;"&gt;,&lt;/span&gt; m2&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/stats/sd"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;sd&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;$p.val&lt;span style="color: #339933;"&gt;,&lt;/span&gt; simplify=T&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&amp;nbsp;
&lt;a href="http://inside-r.org/r-doc/graphics/par"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;par&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;mfrow=&lt;a href="http://inside-r.org/r-doc/base/c"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;5&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
&lt;span style="color: black; font-weight: bold;"&gt;for&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;i &lt;span style="color: black; font-weight: bold;"&gt;in&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;:&lt;span style="color: #cc66cc;"&gt;15&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;
 p.data &amp;lt;- &lt;a href="http://inside-r.org/r-doc/base/replicate"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;replicate&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;n.sims&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/stats/t.test"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;t.test&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/stats/rnorm"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;rnorm&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;n1&lt;span style="color: #339933;"&gt;,&lt;/span&gt; m1&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/stats/sd"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;sd&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/stats/rnorm"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;rnorm&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;n2&lt;span style="color: #339933;"&gt;,&lt;/span&gt; m2&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;a href="http://inside-r.org/r-doc/stats/sd"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;sd&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;$p.val&lt;span style="color: #339933;"&gt;,&lt;/span&gt; simplify=T&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
 &lt;a href="http://inside-r.org/r-doc/graphics/hist"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;hist&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;p.data&lt;span style="color: #339933;"&gt;,&lt;/span&gt; xlim=&lt;a href="http://inside-r.org/r-doc/base/c"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.1&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; breaks = &lt;span style="color: #cc66cc;"&gt;99&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;a href="http://inside-r.org/r-doc/base/col"&gt;&lt;span style="color: #003399; font-weight: bold;"&gt;col&lt;/span&gt;&lt;/a&gt; = &lt;span style="color: blue;"&gt;'gray'&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt;
 &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="r geshifilter-R" style="font-family: monospace;"&gt;&lt;span style="color: #009900;"&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="r geshifilter-R" style="font-family: monospace;"&gt;&lt;span style="color: #009900;"&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;a href="http://www.inside-r.org/pretty-r" title="Created by Pretty R at inside-R.org"&gt;R code html script courtesy of Pretty R at inside-R.org&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;References&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font: 12.0px Times; margin: 0.0px 0.0px 12.0px 32.0px; text-indent: -32.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;"&gt;Gillett, R. (1994). Post Hoc Power Analysis. &lt;i&gt;Journal of Applied Psychology&lt;/i&gt;, &lt;i&gt;79&lt;/i&gt;, 783-785.&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/SCmHuuefXGQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/8018539215618229135/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/03/r-code-for-p-curves.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8018539215618229135?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8018539215618229135?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/SCmHuuefXGQ/r-code-for-p-curves.html" title="R code for p curves" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/03/r-code-for-p-curves.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYDSXs4fSp7ImA9WhVSEkk.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-1452054299113177074</id><published>2012-02-16T21:08:00.000Z</published><updated>2012-03-08T23:09:38.535Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-08T23:09:38.535Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="p curves" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical significance" /><category scheme="http://www.blogger.com/atom/ns#" term="science" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Simulating p curves and detecting dodgy stats</title><content type="html">&lt;a href="http://psych-your-mind.blogspot.com/2012/02/friday-fun-one-researchers-p-curve.html"&gt;Psych your mind&lt;/a&gt;&amp;nbsp;has an interesting blog post on using &lt;i&gt;p&lt;/i&gt; curves to detect dodgy stats in a a volume of published work (e.g., for a researcher or journal). The idea apparently comes from Uri Simonsohn (one of the authors of &lt;a href="http://people.psych.cornell.edu/~jec7/pcd%20pubs/simmonsetal11.pdf"&gt;a recent paper on dodgy stats&lt;/a&gt;). The author (Michael W. Kraus) bravely plotted and published his own &lt;i&gt;p&lt;/i&gt; curve - which looks reasonably 'healthy'. However, he makes an interesting point - which is that we don't know how useful these curves are in practice - which depends among other things on the variability inherent in the profile of &lt;i&gt;p&lt;/i&gt; values.&lt;br /&gt;
&lt;br /&gt;
I quickly threw together a simulation to address this in R. It is pretty limited (as I don't have much time right now), but potentially interesting. It simulates independent&amp;nbsp;&lt;i&gt;t&lt;/i&gt; test &lt;i&gt;p&lt;/i&gt; values where the samples are drawn from independent, normal distributions with equal variances but different means (and &lt;i&gt;n&lt;/i&gt; = 25 per group). The population standardized effect size is fixed at &lt;i&gt;d&lt;/i&gt; = 0.5 (as psychology research generally reports median effect sizes around this value). Fixing the parameters is unrealistic, but is perhaps OK for a quick simulation.&lt;br /&gt;
&lt;br /&gt;
I ran this several times and plotted &lt;i&gt;p&lt;/i&gt; curves (really just histograms with bins collecting &lt;i&gt;p&lt;/i&gt; values at relevant intervals). First I plotted for an early career researcher with just a few publications reporting 50 &lt;i&gt;p&lt;/i&gt; values. I then repeated for more experienced researchers with &lt;i&gt;n&lt;/i&gt; = 100 or &lt;i&gt;n&lt;/i&gt; = 500 published &lt;i&gt;p&lt;/i&gt; values.&lt;br /&gt;
&lt;br /&gt;
Here are the 15 random plots for 50 &lt;i&gt;p&lt;/i&gt; values:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-nQW3rpxcJtI/Tz1s-5gJ7OI/AAAAAAAAAFI/GqBvXuYg1mo/s1600/simulated+p+curves+n+=+50.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/-nQW3rpxcJtI/Tz1s-5gJ7OI/AAAAAAAAAFI/GqBvXuYg1mo/s640/simulated+p+curves+n+=+50.png" width="516" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
At least one of the plots has a suspicious spike between &lt;i&gt;p&lt;/i&gt;&amp;nbsp;= .04 and .05 (exactly where dodgy practices would tend to push the &lt;i&gt;p&lt;/i&gt; values).&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
What about 100 &lt;i&gt;p&lt;/i&gt; values?&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-JEDvDlF0PAk/Tz1ts_gooWI/AAAAAAAAAFQ/ovBW4OfVrQM/s1600/simulated+p+curves+n+=+100.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/-JEDvDlF0PAk/Tz1ts_gooWI/AAAAAAAAAFQ/ovBW4OfVrQM/s640/simulated+p+curves+n+=+100.png" width="517" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Here the plots are still variable (but closer to the theoretical ideal plotted on Kraus' blog).&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
You can see this pattern even more clearly with 500 p values:&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-HTxkr_0W-UI/Tz1uXhc4ZeI/AAAAAAAAAFg/m7KM3bZfoDU/s1600/simulated+p+curves+n+=+500.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/-HTxkr_0W-UI/Tz1uXhc4ZeI/AAAAAAAAAFg/m7KM3bZfoDU/s640/simulated+p+curves+n+=+500.png" width="516" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Some quick conclusions ... The method is too unreliable for use with early career researchers. You need a few hundred &lt;i&gt;p &lt;/i&gt;values to be pretty confidence of a nice flat pattern between &lt;i&gt;p&lt;/i&gt; = .01 and &lt;i&gt;p&lt;/i&gt; = .06. Varying the effect size and other parameters might well inject further noise (as would adding in null effects which have a uniform distribution of &lt;i&gt;p&lt;/i&gt; values and are thus probably rather noisy).&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
I'm also skeptical that this is useful for detecting fraud (as presumably deliberate fraud will tend to go for 'impressive' &lt;i&gt;p&lt;/i&gt; values such as &lt;i&gt;p&lt;/i&gt; &amp;lt; .0001). Also (going forward) fraudsters will be able to generate results to circumvent tools such as &lt;i&gt;p&lt;/i&gt; curves (if they are known to be in use).&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/c0cvfRGkVpo" height="1" width="1"/&gt;</content><link rel="related" href="http://psych-your-mind.blogspot.com/2012/02/friday-fun-one-researchers-p-curve.html" title="Simulating p curves and detecting dodgy stats" /><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/1452054299113177074/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/02/simulating-p-curves-and-detecting-dodgy.html#comment-form" title="14 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/1452054299113177074?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/1452054299113177074?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/c0cvfRGkVpo/simulating-p-curves-and-detecting-dodgy.html" title="Simulating p curves and detecting dodgy stats" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-nQW3rpxcJtI/Tz1s-5gJ7OI/AAAAAAAAAFI/GqBvXuYg1mo/s72-c/simulated+p+curves+n+=+50.png" height="72" width="72" /><thr:total>14</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/02/simulating-p-curves-and-detecting-dodgy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4BQH07fip7ImA9WhRaEks.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-5330311759010315757</id><published>2012-02-14T23:54:00.003Z</published><updated>2012-02-14T23:59:11.306Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-14T23:59:11.306Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="robust statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="nonparametric statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="confidence intervals" /><title>On nonparametric statistics ...</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Georgia, serif;"&gt;I'm not a big fan of the term "nonparametric statistics", or at least how it is used in psychology and related fields (e.g., education and health research). This is one reason why I don't make a big deal of the parametric/non-parametric distinction in my&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; line-height: 23px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, serif;"&gt;&amp;nbsp;&lt;a href="http://www.amazon.co.uk/gp/product/0230577180/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=0230577180" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #df0000; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Serious stats&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&amp;nbsp;book and probably partly why a &lt;a href="http://www.psychologicalscience.org/index.php/publications/observer/2012/february-11-2012-observer-publications/why-nonparametric-statistics-should-be-part-of-your-toolkit.html"&gt;recent article in APS Observer&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt; annoyed me so much.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Why did it annoy me so much? It says, in essence, what many standard psychology text books say (and also makes several good points - which I shall largely ignore for rhetorical purposes). I like in particular the points about statistical tests used to check statistical assumptions lacking power and making statistical assumptions themselves (which are typically unchecked and they are not robust to). Indeed, that's another thing that annoys me and I have blogged/bored people about in the past (e.g., see &lt;a href="http://psychologicalstatistics.blogspot.com/2006/05/what-is-all-this-stuff-about.html"&gt;here&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;). I also think the article might have been chopped about a bit by editors (as it contains at least one important reference not cited and some of my gripes are also contained in references cited by the article I'm annoyed with). So, on balance, it is (by psychology mainstream standards) not at all a bad piece. However, by buying into the standard nonparametric stats presentation it perpetuates a few myths or errors and may inadvertently gives some pretty poor advice mixed in with the good.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Here is a quick list of my criticisms:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;/span&gt; &lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;(1) The definition of nonparametric statistics is deeply confused. The author starts by writing: "Nonparametric statistical analyses are used to investigate research questions in which the dependent variable is ranked or categorical rather than quantified in a true numeric sense". This seems to suggest that non-parametric procedures are defined by having a discrete or bounded DV. Later it adds that "Traditional parametric statistics require a number of assumptions about the characteristics (i.e., parameters) of the data." This is an appeal to the idea that parametric statistics assume a particular probability distribution (the parameters of which are estimated by the data). This seems like a better definition to me, although like many psychologists, the author appears to assume that the probabilty distribution assumed is always a normal distribution. Mixing the two aspects of the definition is confusing. It is easy to find statistical procedures that are parametric in the second sense, but involve ranked or categorical DVs. I would argue that a chi-square test of independence or a sign test is parametric by the second definition. Not only is the definition problematic, but it could lead to poor analytic decisions. For instance, dichotomous outcomes are often best analyzed using parametric techniques such as logistic regression (a generalized linear model with a logistic link function and a binomial random component) rather than the methods surveyed in the article.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;(2) The article also reads as if nonparametric tests are the same thing as rank randomization tests. Rank&amp;nbsp;randomization&amp;nbsp;tests are examples of nonparametric tests in the sense they are distribution free (making no assumption about a particular probability distribution for the data). However, there are many other nonparametric methods that don't involve ranks. Rank&amp;nbsp;randomization&amp;nbsp;tests are useful but limited in scope. In addition, if the raw data are in the form of ranks then a rank transformation is pretty pointless (you might as well jut run a regular test).&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;The main limitation of the rank approaches is that the rank transformation is irreversible; it destroys the link between the analysis and the raw scores. This is a serious problem if you care about the raw scores - perhaps because you want to test whether effects are non-additive or because you want to get an interval estimate or a effect sizes on the original scale. There are ways to help you do this with rank transformation procedures, but they are generally pretty fiddly. There are good reasons why people don't tend to use rank transformations in multiple regression, use them to test interaction effects or use them to construct confidence intervals.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Third, rank randomization (and other nonparametric) procedures &lt;i&gt;are&lt;/i&gt; bound by pesky assumptions! They tend to make weaker assumptions than parametric procedures, but all statistical procedures make assumptions. The assertion that the "main assumptions of nonparametric tests are that the dependent variable should be continuous and have independent random sampling, which means that nonparametric statistics do not require assumptions of homogeneity of variance and normality" is misleading. The precise assumptions vary from test to test and with the hypothesis being tested. As a rule, rank randomization and related rank transformation tests assume that samples with similar shapes of distribution are being compared. They can therefore be undermined by heterogeneity of variance or varying degrees of skew. If the distributions have very dissimilar shapes then the tests can sometimes behave very strangely (e.g., it is possible to get outcomes where A &amp;gt; B, B &amp;gt; C and yet C &amp;gt; A). Continuity is also not necessarily a requirement of the DV or of the underlying construct being measured (though it may be for some hypotheses).&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;(4) Many generalizations are made that simply don't hold up: "When the data violates the assumptions of a parametric test, nonparametric tests are again the more powerful analytic technique (Siegel, 1957)." This doesn't follow. Often this is true, but not always. There has been a lot of research on this topic since 1957 and parametric tests are not always inferior. This is particularly true if you don't restrict parametric techniques to &lt;i&gt;t&lt;/i&gt; tests, linear regression and ANOVA. Some nonparametric techniques are known to have very poor power. I also got irritated by the critique of log and similar transformations that states: "while these transformations can make variables more normally distributed, they can also diminish or alter experimental effects, which can reduce power." To the extent this is true, it is also true of the rank transformation (more so in some cases). Furthermore, the real problem is with arbitrary transformations. Log transformations - where appropriate - tend to aid interpretation of effects (e.g., by quantifying them as proportionate rather than additive effects). I also dislike the implication that "experimental effects" exist in a pristine form prior to transformation. This is simply not the case - how to quantify and scale measurement of an effect is a tricky business (e.g., memory researchers can use percentage correct, hits minus false alarms, &lt;i&gt;A&lt;/i&gt; prime &lt;i&gt;d&lt;/i&gt; prime etc.) and many effects come "pre-transformed" (e.g., measurement of loudness in decibels). Transformations (including the rank transformation) are useful tools that can increase power and aid interpretation if used carefully and appropriately.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;(5) The use of parametric statistics to analyze Likert-style rating scales may be one of the "seven deadly sins of statistical analysis", but it is rarely a big problem in practice. Least squares methods are most messed up by heavy tailed distributions, severe skew or outliers. If anything, Likert-style rating scales tend not to have these problems (or to manifest them relatively mildly). Furthermore, where there are problems with Likert-style measures, rank randomization or transformation tests s are probably not the solution. A number of parametric procedures for ordinal outcomes exist - notably ordered logistic regression (though least squares methods such as &lt;i&gt;t&lt;/i&gt; tests, ANOVA or regression should work well when their assumptions are not badly violated).&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;(6) The variety of nonparametric tests referred to is slightly artificial. As a general rule there are advantages to sticking to standard 'parametric' tests such as the Welch-Satterthwaite &lt;i&gt;t&lt;/i&gt; test or one-way ANOVA rather than using named rank-transformation tests such as the Mann-Whitney U test. In some cases there may be advantages with specialized rank randomization tests where sample sizes are small (e.g., because software such as R implements exact versions). However, there are a few cases where the rank&amp;nbsp;randomization&amp;nbsp;tests are not robust (e.g., Mann-Whitney U test is not robust to heterogeneity of variance) or lack power (e.g., the Friedman test, Page's L test and most multiple comparison procedures available for ranks). Rank transforming the data and then running a &lt;i&gt;t&lt;/i&gt; test with Welch-Satterthwaite correction is superior to running the Mann-Whitney directly (Zimmerman &amp;amp; Zumbo, 1993a). For more on the low power of the Friedman test and better alternatives see &lt;a href="http://seriousstats.wordpress.com/2012/02/14/friedman/"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Rather than think in terms of nonparametric statistics, it is better to focus on checking assumptions (using graphical methods and simple descriptives) and checking our models against more robust procedures. If more robust methods show different results - the next step is to find out why (and definitely not report just the outcome you prefer). This should lead you to a superior model (using robust methods or perhaps a more appropriate parametric model). The consideration of robust methods is particularly important. This includes some rank transformation tests, but also includes robust regression, bootstrapping and other tools (e.g., see Wilcox &amp;amp; Keselman, 2003; 2004; Baguley, 2012).&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt; &lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;i&gt;References&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;                 &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="ReferenceStyle"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 23px;"&gt;Baguley, T. (2012, in press).&amp;nbsp;&lt;a data-mce-href="http://www.amazon.co.uk/gp/product/0230577180/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=0230577180" href="http://www.amazon.co.uk/gp/product/0230577180/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=0230577180" style="line-height: 1.7;"&gt;Serious stats: A guide to advanced statistics for the behavioral sciences&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 23px;"&gt;. Basingstoke: Palgrave.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Wilcox, R. R., &amp;amp; Keselman, H. J. (2003). Modern robust data analysis methods: Measures of central tendency. &lt;i&gt;Psychological Methods, 8&lt;/i&gt;&lt;span style="font-style: normal;"&gt;, 254-274.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="ReferenceStyle"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span style="font-style: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="ReferenceStyle"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span style="font-style: normal;"&gt;                 &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="ReferenceStyle"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Wilcox, R. R.,&amp;amp;&amp;nbsp; Keselman, H. J. (2004). Robust regression methods: Achieving small standard errors when there is heteroscedasticity. &lt;i&gt;Understanding Statistics, 3&lt;/i&gt;, 349- 364.&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;div class="ReferenceStyle"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span lang="EN-US"&gt;Zimmerman, D. W., &amp;amp; Zumbo, B. D. (1993b). Rank transformations and the power of the Student &lt;i&gt;t&lt;/i&gt; test and Welch &lt;i&gt;t&lt;/i&gt;' test for non-normal populations with unequal variances. &lt;i&gt;Canadian Journal of Experimental Psychology, 47&lt;/i&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;, 523-539.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/FPNppjGSAMI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/5330311759010315757/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/02/on-nonparametric-statistics.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/5330311759010315757?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/5330311759010315757?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/FPNppjGSAMI/on-nonparametric-statistics.html" title="On nonparametric statistics ..." /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/02/on-nonparametric-statistics.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEGSX4-eSp7ImA9WhRbFkk.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-8574724576909358550</id><published>2012-02-05T17:42:00.002Z</published><updated>2012-02-07T19:23:48.051Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-07T19:23:48.051Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="blog" /><category scheme="http://www.blogger.com/atom/ns#" term="correlation" /><category scheme="http://www.blogger.com/atom/ns#" term="confidence intervals" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><category scheme="http://www.blogger.com/atom/ns#" term="comparing correlations" /><title>Comparing correlations update</title><content type="html">I have just published R code for &lt;a href="http://seriousstats.wordpress.com/2012/02/05/comparing-correlations/"&gt;calculating CIs for differences between correlations&lt;/a&gt; on the &lt;a href="http://www.amazon.co.uk/gp/product/0230577180/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=0230577180"&gt;Serious stats book&lt;/a&gt;&amp;nbsp;blog. This covers independent correlations (taken from chapter 6 of the book) and dependent correlations (new R code written as a supplement to chapter 6).&lt;br /&gt;
&lt;br /&gt;
UPDATE on the update ...&lt;br /&gt;
&lt;br /&gt;
I have also added an Excel spreadsheet that should match the R output (though the latter is probably more accurate and reliable).&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/-YfmuH6qGJc" height="1" width="1"/&gt;</content><link rel="related" href="http://seriousstats.wordpress.com/2012/02/05/comparing-correlations/" title="Comparing correlations update" /><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/8574724576909358550/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/02/comparing-correlations-update.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8574724576909358550?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/8574724576909358550?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/-YfmuH6qGJc/comparing-correlations-update.html" title="Comparing correlations update" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/02/comparing-correlations-update.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUGSHc7cCp7ImA9WhVSEkk.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-525144403265746919</id><published>2012-02-02T16:50:00.001Z</published><updated>2012-03-08T23:10:29.908Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-08T23:10:29.908Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="blog" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="serious stats" /><category scheme="http://www.blogger.com/atom/ns#" term="science" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Serious Stats book and blog update</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;This is a quick update to announce my new blog &lt;a href="http://seriousstats.wordpress.com/"&gt;Serious Stats&lt;/a&gt;. This is a companion to my forthcoming book of the same name:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 23px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Baguley, T. (2012, in press).&amp;nbsp;&lt;a data-mce-href="http://www.amazon.co.uk/gp/product/0230577180/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=0230577180" href="http://www.amazon.co.uk/gp/product/0230577180/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=0230577180" style="line-height: 1.7;"&gt;Serious stats: A guide to advanced statistics for the behavioral sciences&lt;/a&gt;. Basingstoke: Palgrave.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 23px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 23px;"&gt;I think is better to separate book specific content out from my regular posts (though in some cases this will be a bit fuzzy). I will also try and post short updates here when something relevant gets published on the blog for the book.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="line-height: 23px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #444444; line-height: 23px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #444444; font-family: Georgia, 'Bitstream Charter', serif; font-size: 14px; line-height: 23px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/1sjN9SPMz-4" height="1" width="1"/&gt;</content><link rel="related" href="http://seriousstats.wordpress.com/" title="Serious Stats book and blog update" /><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/525144403265746919/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/02/serious-stats-book-and-blog-update.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/525144403265746919?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/525144403265746919?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/1sjN9SPMz-4/serious-stats-book-and-blog-update.html" title="Serious Stats book and blog update" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/02/serious-stats-book-and-blog-update.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8BSX8_fyp7ImA9WhVTGUk.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-7472403449669426879</id><published>2012-02-01T20:38:00.009Z</published><updated>2012-03-05T10:20:58.147Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-05T10:20:58.147Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="correlation" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical significance" /><category scheme="http://www.blogger.com/atom/ns#" term="interaction" /><category scheme="http://www.blogger.com/atom/ns#" term="confidence intervals" /><category scheme="http://www.blogger.com/atom/ns#" term="comparing correlations" /><title>More on "A problem of significance"</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;A longer version of my earlier post &lt;a href="http://psychologicalstatistics.blogspot.com/2011/09/problem-of-significance.html"&gt;A problem of significance&lt;/a&gt; just appeared in The Psychologist.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Times, 'Times New Roman', serif; line-height: 18px;"&gt;Baguley, T. (2012). &lt;a href="http://nottinghamtrent.academia.edu/ThomBaguley/Papers/1358154/Can_we_confident_in_our_statistics"&gt;Can we be confident in our statistics?&lt;/a&gt; The Psychologist. 25, 128-9.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Times, 'Times New Roman', serif; line-height: 18px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Times, 'Times New Roman', serif; line-height: 18px;"&gt;Shortly after publication I received an email asking about statistical analysis of differences in correlations. This is more tricky than you might think. I'm working on some R code to implement one of the better approaches and plan to blog on this shortly ...&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Georgia, 'Times New Roman', serif; line-height: 18px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Georgia, 'Times New Roman', serif; line-height: 18px;"&gt;(See &lt;a href="http://psychologicalstatistics.blogspot.com/2012/02/comparing-correlations-update.html"&gt;update&lt;/a&gt; here.) &lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; color: #626262; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 11px; line-height: 18px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/BA0MjtKV1Mo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/7472403449669426879/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2012/02/more-on-problem-of-significance.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/7472403449669426879?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/7472403449669426879?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/BA0MjtKV1Mo/more-on-problem-of-significance.html" title="More on &quot;A problem of significance&quot;" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2012/02/more-on-problem-of-significance.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIGRX05fSp7ImA9WhVREUs.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-5477542586888203401</id><published>2011-10-04T15:43:00.006+01:00</published><updated>2012-03-19T13:08:44.325Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-19T13:08:44.325Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="Loftus and Masson" /><category scheme="http://www.blogger.com/atom/ns#" term="displaying means" /><category scheme="http://www.blogger.com/atom/ns#" term="Goldstein and Healy" /><category scheme="http://www.blogger.com/atom/ns#" term="sphericity" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="ANOVA" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical significance" /><category scheme="http://www.blogger.com/atom/ns#" term="confidence intervals" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Calculating and graphing within-subject confidence intervals for ANOVA</title><content type="html">&lt;span class="Apple-style-span" style="line-height: 24px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;                     &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;Psychologists are gradually coming round to the view that it is a good idea to present interval estimates alongside point estimates of statistics. The most common statistic reported in psychology research is almost certainly the mean (strictly the arithmetic mean). Presenting an interval estimate for the mean of a single sample is usually quite simple. This is usually done as 95% confidence interval about the mean – and most researchers in psychology are able to calculate this by hand or get their statistical software to calculate and graph it for them.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;Extending this to more than one mean introduces an additional layer of complexity. This is because the difference between two means is a different quantity, and its CI (although related to those of the individual means) is different in width from the CIs of the individual means. This creates a problem when plotting the CI because a researcher might be interested in the CI for an individual mean, the CI for their difference (or both).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;The complexity increases further if the aim is to plot a set of means (e.g., from an ANOVA design). In this case, plotting all the possible differences (as is commonly done) obscures patterns in the individual means (e.g., linear or quadratic trends).&amp;nbsp; Last, but not least, if the means are not from independent samples, there are further difficulties. This happens in within-subjects or repeated measures designs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;In these designs the variation around each mean is correlated with the variation around the other means. This correlation arises from individual differences. Statistical procedures such as ANOVA can capitalize on these individual differences to produce more sensitive statistical inferences (i.e., to increase statistical power or obtain narrower CIs). This is done by estimating the variation due to individual differences, and removing it from the error variance (the estimate of statistical noise in the data set).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;This is a problem for graphical presentation of means because the precision of individual means is influenced by individual differences, whereas the precision of differences between means is not (because the estimate of individual differences is common to repeated samples from the same people and thus can be removed). Further complications arise when the sphericity assumption of repeated measures ANOVA is violated.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;Several solutions to these problems have been proposed in the literature. The best known of these in psychology is that of Loftus and Masson (1994). Another well-known solution is that of Goldstein and Healy (1995), extended to correlated samples by Afshartous and Preston (2010).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;Despite a large literature on the problems of graphing a set of correlated means, many people avoid the problems altogether by not reporting (or graphing) CIs or report CIs that are misleading in some way. Researchers are often unaware of the problems or find the solutions hard to understand and implement.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;I recently reviewed the main approaches in the literature, describe how to obtain suitable intervals for individual means and differences between means and provide R code to calculate and plot the intervals.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;The main highlights are that:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;i) for inferences about individual means the standard approach works fairly well for between-subject (independent measures) designs, but there is a case to use CIs from a multilevel model for within-subject (repeated measures) designs&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;ii) an approach proposed by Cousineau (2005) with a correction by Morey (2008) offers advantages over the Loftus and Masson (1994) approach for within-subject ANOVA designs. It simplifies the calculations and does not assume sphericity. The Loftus-Masson approach will however usually be superior when &lt;i style="mso-bidi-font-style: normal;"&gt;n&lt;/i&gt; is small.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;iii) if you are interested in differences between means then you should probably plot a version of the Cousineau-Morey (or Loftus-Masson) interval that is adjusted so that overlap of the CIs around two individual means corresponds to overlap of the CI for their difference. This can be done by incorporating a multiplier to the width of the individual CIs. This multiplier is equal to (2^0.5)/2.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;iv) if you are interested in both precision of individual means and their differences you can use a two-tiered error bar to display both quantities (Cleveland, 1985).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: 3.9pt;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;v) the intervals (and graphical presentation of means) are useful for informal inference about a set of means. For formal inference it is better to set up precise hypotheses and test these via an a priori of contrast. This could be a traditional null hypothesis significance test, but other approaches are available. These include confidence intervals, Bayes factors, likelihood ratios and so forth (Baguley, in press; Dienes, 2008).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: -38.6pt;"&gt;
&lt;span lang="EN-US" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: -38.6pt;"&gt;
&lt;span lang="EN-US" style="font-family: inherit;"&gt;The paper is available &lt;a href="http://nottinghamtrent.academia.edu/ThomBaguley/Papers/900446/Calculating_and_graphing_within-subject_confidence_intervals_for_ANOVA"&gt;here&lt;/a&gt;, the R code &lt;a href="https://docs.google.com/leaf?id=0B8YTvx5C8MjXNWRjMzhhMzQtZmE5YS00MWQ3LTk1NTAtMjc1MzNkOWU2MjYz&amp;amp;hl=en_GB"&gt;here&lt;/a&gt; and the data sets &lt;a href="https://docs.google.com/leaf?id=0B8YTvx5C8MjXMjc3ODY2YjgtZTAyMi00OTM3LTlkYTYtY2E0YzU4YTBjNGEy&amp;amp;hl=en_GB"&gt;here&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span lang="EN-US" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
Update: &lt;a href="http://seriousstats.wordpress.com/2012/03/18/cis-for-anova/"&gt;R functions now available&lt;/a&gt; for the simpler between-subjects (independent measures) ANOVA&lt;br /&gt;
case (at the &lt;a href="http://www.amazon.co.uk/gp/product/0230577180/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=0230577180"&gt;Serious stats&lt;/a&gt; blog).&lt;br /&gt;
&lt;span lang="EN-US" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: 150%; margin-right: -38.6pt;"&gt;
&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;&lt;span lang="EN-US" style="font-family: inherit;"&gt;References&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;&lt;span lang="EN-US" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span lang="EN-US" style="font-family: inherit;"&gt;Afshartous D., &amp;amp; Preston R. A. (2010). Confidence intervals for dependent data: equating nonoverlap with statistical significance. &lt;i&gt;Computational Statistics and Data&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;Analysis. 54&lt;/span&gt;&lt;/i&gt;&lt;span lang="EN-US"&gt;, 2296-2305.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;&lt;a href="http://www.blogger.com/goog_536825781"&gt;Baguley, T. (2011, in press).&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;a href="http://nottinghamtrent.academia.edu/ThomBaguley/Papers/900446/Calculating_and_graphing_within-subject_confidence_intervals_for_ANOVA"&gt;Calculating and graphing within-subject confidence intervals for ANOVA. Behavior Research Methods.&amp;nbsp;DOI: 10.3758/s13428-011-0123-7&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt; Baguley, T. (2012, in press).&amp;nbsp;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.co.uk/e/ir?t=psychologic05-21&amp;amp;l=as2&amp;amp;o=2&amp;amp;a=0230577180" style="border: none !important; margin: 0px !important;" width="1" /&gt;&lt;a href="http://www.amazon.co.uk/gp/product/0230577180/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=0230577180"&gt;Serious Stats: A guide to advanced statistics for the behavioral sciences&lt;/a&gt;. Basingstoke: Palgrave.&lt;/span&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;Cleveland. W. S. (1985).&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.amazon.co.uk/gp/product/0412742705/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=0412742705"&gt;Elements Of Graphing Data&lt;/a&gt;&lt;span lang="EN-US"&gt;. New York, NY: Chapman &amp;amp; Hall.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span lang="EN-US" style="font-family: inherit;"&gt;Cousineau, D. (2005). Confidence intervals in within-subject designs: A simpler solution to Loftus and Masson’s method. &lt;i&gt;Tutorials in Quantitative Methods for Psychology,&lt;/i&gt; &lt;i&gt;1&lt;/i&gt;, 42-45.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;Dienes, Z. (2008).&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.amazon.co.uk/gp/product/023054231X/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=023054231X"&gt;Understanding Psychology as a Science: An Introduction to Scientific and Statistical Inference&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.co.uk/e/ir?t=psychologic05-21&amp;amp;l=as2&amp;amp;o=2&amp;amp;a=023054231X" style="border-bottom-style: none !important; border-color: initial !important; border-left-style: none !important; border-right-style: none !important; border-top-style: none !important; border-width: initial !important; cursor: move; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important;" width="1" /&gt;&lt;span lang="EN-US"&gt;. Basingstoke: Palgrave Macmillan.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;Goldstein, H., &amp;amp; Healy, M. J. R. (1995). &lt;/span&gt;&lt;span lang="EN-US"&gt;The graphical presentation of a collection of means. &lt;/span&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;Journal of the Royal Statistical Society. Series A (Statistics in Society), 158&lt;/span&gt;&lt;/i&gt;&lt;span lang="EN-US"&gt;, 175-177.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span lang="EN-US" style="font-family: inherit;"&gt;Loftus, G. R., &amp;amp; Masson, M. E. J. (1994). Using confidence intervals in within-subject designs. &lt;i&gt;Psychonomic Bulletin &amp;amp; Review&lt;/i&gt;, &lt;i&gt;1&lt;/i&gt;, 476-490.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class="Default"&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span lang="EN-US"&gt;Morey, R. D. (2008). &lt;/span&gt;&lt;span lang="EN-US"&gt;Confidence intervals from normalized data: A correction to Cousineau (2005). &lt;/span&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;Tutorials in Quantitative Methods for Psychology, 4&lt;/span&gt;&lt;/i&gt;&lt;span lang="EN-US"&gt;, 61-64.&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;
&lt;span class="Apple-style-span" style="font-family: Calibri;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/4y9e8wjv1z4" height="1" width="1"/&gt;</content><link rel="related" href="http://nottinghamtrent.academia.edu/ThomBaguley/Papers/900446/Calculating_and_graphing_within-subject_confidence_intervals_for_ANOVA" title="Calculating and graphing within-subject confidence intervals for ANOVA" /><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/5477542586888203401/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2011/10/calculating-and-graphing-within-subject.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/5477542586888203401?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/5477542586888203401?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/4y9e8wjv1z4/calculating-and-graphing-within-subject.html" title="Calculating and graphing within-subject confidence intervals for ANOVA" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2011/10/calculating-and-graphing-within-subject.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYFQ38_cCp7ImA9WhRbFEs.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-2280818886067466881</id><published>2011-09-15T23:27:00.006+01:00</published><updated>2012-02-05T17:48:32.148Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-05T17:48:32.148Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="ANOVA" /><category scheme="http://www.blogger.com/atom/ns#" term="statistical significance" /><category scheme="http://www.blogger.com/atom/ns#" term="interaction" /><title>A problem of significance</title><content type="html">Several people have drawn my attention to a recent article on a common error in published statistical analyses in neuroscience. Sander Nieuwenhuis, Birte Forstmann and Eric-Jan Wagenmakers published (in Nature Neuroscience) a critique of statistical analyses in the neuroscience literature. This paper has been written about by &lt;a href="http://www.guardian.co.uk/commentisfree/2011/sep/09/bad-science-research-error"&gt;Ben Goldacre&lt;/a&gt; and &lt;a href="http://andrewgelman.com/2011/09/the-difference-between-significant-and-not-significant/"&gt;Andrew Gelman&lt;/a&gt; (who published an article on the general problem some time ago) - so I won't go into too much detail.&lt;br /&gt;
&lt;br /&gt;
The point of interest for me is that the error concerns something that most psychologists should know all about (and hence should be expected not to make the error). It concerns the case of two differences, one statistically significant and one non-significant. For example, group 1 may show a significant difference between experimental condition and placebo (for a drug intervention), while group 2 do not. A naive interpretation is that the drug works for group 1 but not group 2. This is not necessarily true. The proper test of a difference in effects of the drug between groups is an interaction test. Psychologists tend to avoid this error because we have heavily trained in ANOVA as undergraduates (certainly in the UK and probably also in the US and most of Europe). Even if we fail to learn this, &amp;nbsp;reviewers and editors (in psychology) tend to spot the error.*&lt;br /&gt;
&lt;br /&gt;
Are psychologists then entitled to feel a little bit smug? Perhaps, but only a little. First, I think the reason we are relatively good performers on this point is because we tend to view many statistical analyses through an "ANOVA" lens. Factorial ANOVA (in which factors are orthogonal) includes the interaction term by default. The 2 by 2 factorial ANOVA is the workhorse of experimental psychology. Our familiarity with this type of design and analysis makes this easy to spot. Second, our ANOVA lens leads to other errors - notably dichotomizing continuous variables (e.g., via median split) in order to squeeze them into an ANOVA design. This always decreases statistical power, and can - albeit infrequently - produce spuriously significant effects (see MacCallum et al., 2002). These errors are sometimes less serious than the difference of differences/interaction error (but are not harmless).&lt;br /&gt;
&lt;br /&gt;
The real test then, is whether psychologists make the same (conceptual) error in a different context. The obvious context is that of association rather than difference. If males show a significant correlation between testosterone and aggression (e.g., &lt;i&gt;r&lt;/i&gt; = .5, &lt;i&gt;N&lt;/i&gt; = 25) and females don't (e.g.,&amp;nbsp;&lt;i&gt;r&lt;/i&gt; = .3, &lt;i&gt;N&lt;/i&gt; = 25), the correlation between testosterone and aggression is not significantly bigger for males than females. To confirm this you'd need to construct a test or (better still) confidence interval for the difference in correlations. This is hardly ever done - and, in my experience, psychologists frequently make this kind of claim without backing it up.** Methods for testing differences in correlations are a bit fiddly (e.g., depending on overlap or lack of overlap in the measurements), and rarely taught at undergraduate or even postgraduate level. The methods that are taught are also often a bit dodgy (see Zou, 2007, for some better alternatives).&lt;br /&gt;
&lt;br /&gt;
Also note that (in both cases) the error can work the other way. Two correlations could be non-significantly different from zero but different from each other (e.g., &lt;i&gt;r&lt;/i&gt; = .5 and &lt;i&gt;r&lt;/i&gt; = -.5 with &lt;i&gt;N&lt;/i&gt; = 10).&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Postscript&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
There is, I think, a lesson or two here. A minor lesson is that interactions are bit more complicated than psychologists (particularly those very familiar with ANOVA) often think. I could write more on this (and do a bit in my forthcoming book). A major lesson is that this concept (the difference between significant and non-significant is not necessarily also statistically significant - see Gelman &amp;amp; Stern, 2006) is probably quite tricky. It may be worth exploring why ... I suspect it is because of several factors.&lt;br /&gt;
&lt;br /&gt;
See updates &lt;a href="http://psychologicalstatistics.blogspot.com/2012/02/more-on-problem-of-significance.html"&gt;here&lt;/a&gt; and &lt;a href="http://psychologicalstatistics.blogspot.com/2012/02/comparing-correlations-update.html"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;References&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Gelman, A., &amp;amp; Stern, H. (2006). The difference between “significant” and “not significant” is not itself statistically significant. &lt;i&gt;American Statistician, 60&lt;/i&gt;, 328–331.&lt;br /&gt;
&lt;br /&gt;
MacCallum, R. C., Zhang, S., Preacher, K. J., &amp;amp; Rucker, D. D. (2002). On the practice of dichotomization of quantitative variables. &lt;i&gt;Psychological Methods, 7&lt;/i&gt;, 19-40.&lt;br /&gt;
&lt;br /&gt;
Nieuwenhuis, S., Forstmann, B. U., &amp;amp; Wagenmakers, E.-J. (2011). Erroneous analyses of interactions in neuroscience: A problem of significance. &lt;i&gt;Nature Neuroscience, 14&lt;/i&gt;, 1105-1107.&lt;br /&gt;
&lt;br /&gt;
Zou, G. Y. (2007). Toward using confidence intervals to compare correlations. &lt;i&gt;Psychological Methods, 12,&lt;/i&gt; 399-413.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;*&amp;nbsp;&lt;/span&gt;&amp;nbsp;Do I have any support for this position? Yes: anecodotal support (e.g., from editing or reviewing many dozens of papers) and some support from&amp;nbsp;Nieuwenhuis et al. They found the error more prevalent in cellular and molecular neuroscience. ANOVA is core training in psychology and widely used in cognitive and behavioural neuroscience - and I'd argue that this reflects the influence of psychologists working in this area and of neuroscientists trained in and using similar methods.&lt;br /&gt;
&lt;div class="ReferenceStyle"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="ReferenceStyle"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;br /&gt;
**&amp;nbsp;Do I have any support for this position?&amp;nbsp;A little. It is easy to find basic psychology texts with ANOVA but without tests of differences in correlations being mentioned. It is rare to find tests of CIs of differences in published papers.&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/m4FtucwOKj4" height="1" width="1"/&gt;</content><link rel="related" href="http://www.ejwagenmakers.com/2011/NieuwenhuisEtAl2011.pdf" title="A problem of significance" /><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/2280818886067466881/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2011/09/problem-of-significance.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/2280818886067466881?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/2280818886067466881?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/m4FtucwOKj4/problem-of-significance.html" title="A problem of significance" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2011/09/problem-of-significance.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QCQHs5fip7ImA9WhdUF0k.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-3228682685795043970</id><published>2011-01-13T13:50:00.000Z</published><updated>2011-10-04T16:16:01.526+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-04T16:16:01.526+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>R: An introduction for psychologists</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Here are the slides from the Introduction to R session Danny Kaye and I ran at the BPS Mathematics, Statistics &amp;amp; Computing section CPS Workshop (13 December 2010, Nottingham Trent University).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://docs.google.com/present/edit?id=0AcYTvx5C8MjXZHA4Nmg2dF8xMDJnY2c2eDdoYw&amp;amp;hl=en_GB&amp;amp;authkey=CMHxy54B"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;iframe frameborder="0" height="451" src="https://docs.google.com/present/embed?id=dp86h6t_102gcg6x7hc&amp;amp;size=m" width="555"&gt;&lt;/iframe&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/qr7EtW4YEeE" height="1" width="1"/&gt;</content><link rel="related" href="https://docs.google.com/present/edit?id=0AcYTvx5C8MjXZHA4Nmg2dF8xMDJnY2c2eDdoYw&amp;hl=en_GB&amp;authkey=CMHxy54B" title="R: An introduction for psychologists" /><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/3228682685795043970/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2011/01/r-introduction-for-psychologists.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/3228682685795043970?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/3228682685795043970?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/qr7EtW4YEeE/r-introduction-for-psychologists.html" title="R: An introduction for psychologists" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2011/01/r-introduction-for-psychologists.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QCSXk8eCp7ImA9WhdUF0k.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-1960747264016613408</id><published>2010-05-13T16:21:00.000+01:00</published><updated>2011-10-04T16:16:08.770+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-04T16:16:08.770+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Introduction to using R in research</title><content type="html">I was recently asked to give a talk to our graduate school annual conference. I offered several titles and the one they picked was &lt;i&gt;Using R in research&lt;/i&gt;. I'm not sure if this was a good idea or not. The graduate school covers PhD students across three areas of the university: social sciences (including psychology), law and business. In addition the students tend to specialize in either qualitative or quantitive research methods, so I was talking to an audience who might know nothing about statistics or a great deal (e.g., several students have completed MSc courses in psychological research methods here or elsewhere).&lt;br /&gt;
&lt;br /&gt;
&lt;iframe src="http://docs.google.com/present/embed?id=dp86h6t_85c23cmxsp" frameborder="0" width="410" height="342"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
My solution was try and explain the advantages of R relative to alternatives such as SPSS (probably the most common statistic package in the University). I also focussed a lot on graphical methods and simulation. It seemed to go quite well, but I worry that quite a few members of the audience were overwhelmed by large chunks of it.&lt;br /&gt;
&lt;br /&gt;
I promised to put my slides on my blog - though I am not sure how useful they are to anybody who wasn't there. Without my commentary some (possibly most) of the slides won't make much sense. I spent a good deal of the time talking through exploratory plots of one data set (from Hayden, 2005). I use this example a lot in teaching and it involves a bit of class participating (guessing the origin of the data) - so I won't go into to detail here (lest I spoil it for future students), but you can google the original article if you are curious. I also spent some time on how R works (e.g., object types, assignment, basic modeling, plotting functions). My reasoning was that many of the audience have no familiarity with non-GUI interfaces in software and without explaining the basics of the interface they will not have the faintest clue how R works. For those with some familiarity (e.g., SPSS syntax) the examples were selected to show how powerful R can be for things like exploratory graphics.&lt;br /&gt;
&lt;br /&gt;
Several students ask about resources for learning R. I mentioned some in earlier blog posts, but for psychologists &lt;a href="http://www.psych.upenn.edu/~baron/rpsych/rpsych.html"&gt;Li and Baron's web resources&lt;/a&gt; are a good place to start. The other major resource is probably &lt;a href="http://www.statmethods.net/"&gt;Quick R&lt;/a&gt;, but there are hundreds of other places to look online (depending on what stuff you need most).&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/BaAmi8ZfMqQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/1960747264016613408/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2010/05/introduction-to-using-r-in-research.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/1960747264016613408?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/1960747264016613408?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/BaAmi8ZfMqQ/introduction-to-using-r-in-research.html" title="Introduction to using R in research" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2010/05/introduction-to-using-r-in-research.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UBRH07fSp7ImA9WhdUF0k.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-7227981003814024457</id><published>2010-03-03T20:14:00.018Z</published><updated>2011-10-04T16:14:15.305+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-04T16:14:15.305+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="memory" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Example of plotting a serial position curve in R</title><content type="html">&lt;div class="separator" style="clear: both; text-align: left;"&gt;A while ago I wrote a co-wrote chapter for an introductory psychology text book&amp;nbsp;&lt;a href="http://www.amazon.co.uk/gp/product/1847875386?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=1847875386"&gt;Essential Psychology: A Concise Introduction&lt;/a&gt;.&amp;nbsp;This is a book edited and written by members of the department where I work. My contribution was the chapter on human memory (cunningly titled &lt;i&gt;Memory&lt;/i&gt;).&lt;/div&gt;&lt;br /&gt;
I produced several plots for the chapter (some of which got cut due to severe space restrictions). One that stayed in was a serial position curve. For this plot I used data from Postman and Phillips (1965).&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_3fIauBYLLhY/S46_ENrgdVI/AAAAAAAAADw/I7TsDMvy6VQ/s1600-h/pp65+plot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/_3fIauBYLLhY/S46_ENrgdVI/AAAAAAAAADw/I7TsDMvy6VQ/s400/pp65+plot.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
I feel particular proud of this plot because I was just beginning to use and learn R at the time (as opposed to dabbling) and because I had had a really hard time getting hold of the data. I first tried google, but had no joy (for some reason I thought someone would have put the raw data online, as it is a classic study - though maybe I just missed it). Then I searched for alternative data sets &amp;nbsp;(as around that period there were quite a few similar studies). I was probably being too picky, but whatever the reason I had no luck.&lt;br /&gt;
&lt;br /&gt;
It would have been trivial to make up fake data, but that didn't feel right. What I eventually did (and wished I'd done straight away) was print out the original figure and measure all the points by hand. I then entered these values into a spreadsheet and tweaked and remeasured until all the summary statistics matched those in the original paper to about one decimal place. This was a lot quicker than I had thought. I cheated slightly because I only needed data from the 20 word conditions (so I could leave out the 10 and 30 word conditions).&lt;br /&gt;
&lt;br /&gt;
(I'm pretty sure I could have used computer software to capture the raw data from an image file, but I'd have had to find the software, learn how to use it and do all the checking anyway. For a single figure I'm reasonably sure measuring by hand would be faster.)&lt;br /&gt;
&lt;br /&gt;
In re-plotting it I noticed a few things that I hadn't paid much attention to before. The main one was the authors report frequency of recalls for 18 participants with 6 lists each. This means all scores are out of 108 and I suspect lots of casual readers would (like me) assume they were percentages. For re-plotting I rescaled the data as percentages.&lt;br /&gt;
&lt;br /&gt;
The plot itself just uses basic R functions. I'm writing about it because:&amp;nbsp;&amp;nbsp;i) I think it is a fairly clear illustration of how basic plot functions in R can produce what I think is a rather nice Figure. (The published version has been edited by the publisher, adding colour and making the style match figures in other chapters), ii) people may find it useful for teaching purposes. So please feel free to use and adapt the R code for non-commercial (e.g., teaching use).&lt;br /&gt;
&lt;br /&gt;
First load the data from this&amp;nbsp;&lt;a href="https://docs.google.com/leaf?id=0B8YTvx5C8MjXYzExMmUwNDctZGMwZC00MzA5LTgyOWMtYzg2MDRhMzAwMjRj&amp;amp;hl=en_GB"&gt;.csv file&lt;/a&gt;&amp;nbsp;(you will need to specify the path or change the working directory if the file is saved elsewhere).&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: 14px;"&gt;pp65 &amp;lt;- read.csv("&lt;a href="https://docs.google.com/leaf?id=0B8YTvx5C8MjXYzExMmUwNDctZGMwZC00MzA5LTgyOWMtYzg2MDRhMzAwMjRj&amp;amp;hl=en_GB"&gt;pp65.csv&lt;/a&gt;")&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: 14px;"&gt;&lt;span class="Apple-style-span" style="font-family: Courier, Courier, monospace;"&gt;Then paste the following:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: 14px;"&gt;&lt;span class="Apple-style-span" style="font-family: Courier, Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;plot(pp65$SP, pch=NA, ylim=c(0,80), xlab= "Serial position", ylab= "Mean percentage recall", main = "Postman &amp;amp; Phillips (1965)", sub = '(20 word conditions only)')&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font: 14.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;points(pp65$C0, pch=19, col='black', cex=.7)&lt;/span&gt;&lt;/div&gt;&lt;div style="font: 14.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;lines(pp65$C0, lty=3)&lt;/span&gt;&lt;/div&gt;&lt;div style="font: 14.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;points(pp65$C15, pch=24, col='black', cex=.7)&lt;/span&gt;&lt;/div&gt;&lt;div style="font: 14.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;lines(pp65$C15, lty=2)&lt;/span&gt;&lt;/div&gt;&lt;div style="font: 14.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;points(pp65$C30, pch=22, col='black', cex=.7)&lt;/span&gt;&lt;/div&gt;&lt;div style="font: 14.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;lines(pp65$C30, lty=5)&lt;/span&gt;&lt;/div&gt;&lt;div style="font: 14.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;legend(3, 80, legend=c("No delay","15 second delay","30 second delay"), lty=c(3,2,5)&lt;/span&gt;)&lt;/div&gt;&lt;div style="font: 14.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 14.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;If you are new to R you can find out more about these plotting functions by using R help:&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;?par&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;?plot&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;?points&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: Courier;"&gt;and so on ...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Courier, Courier, monospace;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: Courier;"&gt;&lt;span class="Apple-style-span" style="font-family: Courier; font-style: italic;"&gt;References&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font: 14.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; font-style: normal;"&gt;Baguley, T., &amp;amp; Edmonds, A. J. (2010). Memory. In P. Banyard, M. N. O. Davies, C. Norman, &amp;amp; B. Winder (Eds.) &lt;a href="http://www.amazon.co.uk/gp/product/1847875386?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=1847875386"&gt;Essential Psychology: A Concise Introduction&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.co.uk/e/ir?t=psychologic05-21&amp;amp;l=as2&amp;amp;o=2&amp;amp;a=1847875386" style="border: none !important; margin: 0px !important;" width="1" /&gt;&amp;nbsp;(pp. 65-82). London: Sage.&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;em&gt;&lt;span style="font-family: Arial; font-style: normal;"&gt;Postman&lt;/span&gt;&lt;/em&gt;&lt;span style="font-family: Arial;"&gt;, L. &amp;amp; &lt;em&gt;&lt;span style="font-style: normal;"&gt;Philips&lt;/span&gt;&lt;/em&gt;, L. W. (&lt;em&gt;&lt;span style="font-style: normal;"&gt;1965&lt;/span&gt;&lt;/em&gt;). Short-term temporal changes in free recall. &lt;i&gt;Quarterly Journal of Experimental Psychology, 17&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;, 132-138.&lt;/span&gt;&lt;/div&gt;&lt;/i&gt;&lt;br /&gt;
&lt;div style="font: 14.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;div style="text-align: center;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.amazon.co.uk/gp/product/1847875386?ie=UTF8&amp;amp;tag=psychologic05-21&amp;amp;linkCode=as2&amp;amp;camp=1634&amp;amp;creative=6738&amp;amp;creativeASIN=1847875386"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_3fIauBYLLhY/S47DhQ6agBI/AAAAAAAAAD4/8sltf9y5r5Y/s320/51JNUB6mI3L._SL160_.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.co.uk/e/ir?t=psychologic05-21&amp;amp;l=as2&amp;amp;o=2&amp;amp;a=1847875386" style="border: none !important; margin: 0px !important;" width="1" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font: 14.0px Courier; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/6pTxjoGZiMk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/7227981003814024457/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2010/03/example-of-plotting-serial-position.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/7227981003814024457?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/7227981003814024457?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/6pTxjoGZiMk/example-of-plotting-serial-position.html" title="Example of plotting a serial position curve in R" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_3fIauBYLLhY/S46_ENrgdVI/AAAAAAAAADw/I7TsDMvy6VQ/s72-c/pp65+plot.png" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2010/03/example-of-plotting-serial-position.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UFQns5fip7ImA9WhdUF0k.&quot;"><id>tag:blogger.com,1999:blog-27862247.post-6683967616011422003</id><published>2010-02-25T00:23:00.001Z</published><updated>2011-10-04T16:13:33.526+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-04T16:13:33.526+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statistics" /><category scheme="http://www.blogger.com/atom/ns#" term="displaying means" /><category scheme="http://www.blogger.com/atom/ns#" term="psychology" /><category scheme="http://www.blogger.com/atom/ns#" term="ANOVA" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title>Interaction plot from cell means</title><content type="html">I needed to produce a few a interaction plots for my book in R and, while the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;interaction.plot(&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;)&lt;/span&gt; function is useful it has a couple of drawbacks. First, the default output isn't very pretty. Second, it works from the raw data, whereas I often need plots from cell means. For teaching purposes it is quite common to produce plots without raw data (for hypothetical data or from published examples).&lt;br /&gt;
&lt;br /&gt;
My first attempts at the plots involved setting them up element by element. Just going over some examples I decided to turn the basic plot (for a 2 x 2 ANOVA) into a simple function. Nothing fancy, just a regular interaction plot in black and white that I think is prettier than the SPSS, Excel or R defaults. At some point I may have a go turning it into a general I x J ANOVA plot (or maybe even add CIs, but I'll probably do that from raw data if I ever get round to it).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;plot.2by2 &amp;lt;- function(A1B1,A1B2, A2B1, A2B2, group.names, legend = TRUE, leg.loc=NULL, factor.labels=c('Factor A', 'Factor B'), swap = FALSE, ylab= NULL, main = NULL){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;group.means &amp;lt;- c(A1B1, A2B1, A1B2, A2B2)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;if(missing(ylab)) ylab &amp;lt;- expression(italic(DV))&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;if(swap==TRUE) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;group.names &amp;lt;- list(group.names[[2]], group.names[[1]]) ; group.means &amp;lt;- c(A1B1, A1B2, A2B1, A2B2); factor.labels &amp;lt;- c(factor.labels[2], factor.labels[1])&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;plot(group.means, pch=NA, ylim=c(min(group.means)*.95, max(group.means)*1.025), xlim=c(0.8,2.2), ylab=ylab, xaxt='n', xlab=factor.labels[1], main=main)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;points(group.means[1:2], pch = 21)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;points(group.means[3:4], pch = 19)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;axis(side = 1, at = c(1:2), labels = group.names[[1]])&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;lines(group.means[1:2], lwd = .6, lty = 2)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;lines(group.means[3:4], lwd = .6)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;if(missing(leg.loc)) leg.loc &amp;lt;- c(1,max(group.means))&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;if(legend ==TRUE) legend(leg.loc[1], leg.loc[2],legend = group.names[[2]], &amp;nbsp;title = factor.labels[2], lty = c(3,1))&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Call the function by entering the four cell means in conventional order: A1B1, A1B2 and so on where A1B1 is the mean of level 1 of factor A at level 1 of factor B. You also need a two item list containing text strings of the two level names of each factor. For instance:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;lev.names &amp;lt;- list(c('A1', 'A2'), c('B1', 'B2'))&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;plot.2by2(5,15,10,20, lev.names)&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_3fIauBYLLhY/S4W72RriWwI/AAAAAAAAADY/cxsvT33MVYU/s1600-h/tempA.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/_3fIauBYLLhY/S4W72RriWwI/AAAAAAAAADY/cxsvT33MVYU/s400/tempA.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;You can swap the axes by adding the argument &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;swap = TRUE&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;plot.2by2(5,15,10,20, lev.names, swap = TRUE)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_3fIauBYLLhY/TNvkiC5AeXI/AAAAAAAAAEg/V9Zmu23zz2Y/s1600/swap.plot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/_3fIauBYLLhY/TNvkiC5AeXI/AAAAAAAAAEg/V9Zmu23zz2Y/s400/swap.plot.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;The default factor names are 'Factor A' and 'Factor B', but these are over-ridden&amp;nbsp;in the call:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;plot.2by2(5,15,10,20,lev.names, swap = TRUE, factor.labels= c('Factor 1','Factor 2'))&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;You can also change the &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;y-&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;axis label with &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ylab&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt; or add a main title with &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;main&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;. &amp;nbsp;The legend can be dropped (&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;legend = FALSE&lt;/span&gt;) if you don't want one or need it to be located outside the plot. To move the legend just specify coordinates with an argument such as &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;leg.loc = c(1,10&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;)&lt;/span&gt;. You can also edit the source code directly.&amp;nbsp;Here is an example with title and meaningful labels:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;group.names &amp;lt;- list(c('placebo','drug'), c('male', 'female'))&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;div class="RcodeStyle"&gt;&lt;span lang="EN-US"&gt;  &lt;!--EndFragment--&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div class="RcodeStyle"&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;plot.2by2(10,10,15,20, group.names, factor.labels=c('Drug', 'Sex'), swap = FALSE)&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;!--EndFragment--&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_3fIauBYLLhY/S4W--6-oydI/AAAAAAAAADo/ZZ8YsWrZX2E/s1600-h/example.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/_3fIauBYLLhY/S4W--6-oydI/AAAAAAAAADo/ZZ8YsWrZX2E/s400/example.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;As this just uses basic plotting functions in R you can also manipulate the plot in other ways: adding lines with &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;segments()&lt;/span&gt;, adding text with &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;text()&lt;/span&gt; changing graphical parameters with &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;par(&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;)&lt;/span&gt; and so on.&amp;nbsp;Depending on your platform it is also easy to extract the plot as a .pdf or .jpg file. On a mac I save it as a .pdf file and open it in preview which allows me to save it as .png, .gif or whatever I need.&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PsychologicalStatistics/~4/ntE9PjYdk60" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://psychologicalstatistics.blogspot.com/feeds/6683967616011422003/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://psychologicalstatistics.blogspot.com/2010/02/interaction-plot-from-cell-means.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/6683967616011422003?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/27862247/posts/default/6683967616011422003?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PsychologicalStatistics/~3/ntE9PjYdk60/interaction-plot-from-cell-means.html" title="Interaction plot from cell means" /><author><name>Thom Baguley</name><uri>https://plus.google.com/110859229901482390817</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-kB60GMkSCOc/AAAAAAAAAAI/AAAAAAAAAJc/FvAXCZkn-MY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_3fIauBYLLhY/S4W72RriWwI/AAAAAAAAADY/cxsvT33MVYU/s72-c/tempA.png" height="72" width="72" /><thr:total>2</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://psychologicalstatistics.blogspot.com/2010/02/interaction-plot-from-cell-means.html</feedburner:origLink></entry></feed>
