5
$\begingroup$

Under the null, the p-value is uniformly distributed between 0 and 1. Taking the negative of the log base 10 of many such p-values should follow an exponential distribution. You can show quantiles of their distribution under the null, but more importantly, logging them makes large differences very compelling. I can't remember the name of such a plot though:

enter image description here

## example R code
x <- replicate(100, rnorm(10), simplify=FALSE)
y <- replicate(100, rnorm(10), simplify=FALSE)

lm.sig <- function(x, y) {
  coef(summary(lm(y ~ x)))[2, 4]
}

sigs <- mapply(lm.sig, x, y)

plot(-log(sigs, base=10), type='h', xlab='Comparison Index', ylab='-log p value')
abline(h=-log(0.05, base=10), lty=2)
legend('topleft', lty=2, 'Nominal 0.05 error rate')
$\endgroup$
  • 1
    $\begingroup$ I don't know of a specific name of such a plot (though I'd bet it has probably been called by a couple of names before). I'd be inclined to put actual probabilities on the plot (or at the least, include them on the right side). $\endgroup$ – Glen_b -Reinstate Monica Mar 11 '14 at 21:16
  • $\begingroup$ Agreed. That would be my mistake. The y-axis could be better labeled to represent the log-scale. The problem with presenting untransformed p-values is that 0.05 doesn't look much different from 0.01, nor 0.01 from 0.0001. Complementary log transformations allow such values to "pop". $\endgroup$ – AdamO Mar 11 '14 at 21:18
  • 2
    $\begingroup$ I'm not sure if we misunderstand each other or it's just my own lack of comprehension of part of your response. I have no problem with the use of a log-scale, merely the value labels on the axis. I find it much easier to interpret "0.005" than "-2.3". I'm merely suggesting the use of tick marks and labels for $p$ rather than $\log_{10}p$*, or at least the use of two axes. $\quad\quad$*(while keeping the plot essentially unchanged -- well, I would also plot points rather than lines; what does the length of the line-segment mean on the plot?) $\endgroup$ – Glen_b -Reinstate Monica Mar 11 '14 at 21:25
5
$\begingroup$

Geneticists call this a "Manhattan plot". Usually the bars are thicker, with no gap in between, so it looks (sort of kind of) like the New York skyline.

$\endgroup$
  • $\begingroup$ That's right! I kept thinking "Metropolis" plot, as I knew there was some relationship to a city and the shape of the figure. $\endgroup$ – AdamO Mar 11 '14 at 22:24
3
$\begingroup$

A plot of vertical lines is often called a "Needle Plot". See Graphics with R (section 3.7.3) or SAS doc.

Normally there is a shared baseline for the needles, making it conceptually like a bar chart. Your code suggests a baseline of 0 segments(seq(sigs), 0, seq(sigs), -log(sigs, base=10)), but your image looks more like lines centered at 0, segments(seq(sigs), log(sigs, base=10), seq(sigs), -log(sigs, base=10)).

$\endgroup$
  • $\begingroup$ Thanks for the introduction to type='h' for generating verticle line (e.g. needle plots). However, Manhattan, as Harvey indicated, is the term for multiple testing and p-value context specifically. $\endgroup$ – AdamO Mar 14 '14 at 22:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.