Skip to content
Prev 85719 / 398506 Next

Difficulty with qqline in logarithmic context

[Brian Ripley]
Yes.  Googling around reveals this is not so uncommon.
In the display produced by "qqnorm", the y-axis would then show 
"log(value)" labels, while the user (me!) expects "value" labels.
Once again, I was merely toying with "qqplot".  I found intriguing that, 
while shuffling messages around between folders, for a good while, the 
distribution of log(number of messages) per folder appears vagueley 
normal, as I do not quickly see a reasonable justification for this.
Interesting, thanks for teaching me about "ppoints".  Yet, I stay more 
happy with the abcissa scale produced by "qqnorm".  Besides, how would 
one uses "qqline" with the above?
While comparable scales are somewhat simpler to compare, this is not 
necessarily what is most adequate for the user.  Proof is that while 
quantiles are being compared here, scales do not show quantiles, but 
units as meaningful to the user.  One might want to compare variables 
scaled very differently, maybe because of different units from the same 
distribution, of from different but similar distributions using 
different scales and shifted to different means.  Or even, why not, if 
this is what is meaningful for users, a log scale.
As it stands, yes.  As a convenience, it could be extended (probably 
easily) to log-normality.  "qqnorm" already does something sensible in 
log-context, so a user might expect "qqline" to do equally well.

The real point might be that "qqline" is tied to "abline" a bit too 
blindly.  What is the meaning of intercept and slope of a straight line 
on a graphic in log context?  First, the intercept might not even exist.  
Second, "abline" interpretation depends on the clippling, and possibly 
on the extrema of the pretty breakpoints chosen for scales, so making it 
hard to predict on average use.   There ought to be some reason for the 
log-aware code in "abline", yet I did not find documentation for it.

The wisest for "abline", in my very humble opinion, would be for it to 
complain if ever called in log context.  Then, "qqline" would indirectly 
complain through "abline", if "qqline" is not modified to do something 
more proper.  Moreover, if it is definitely out of question that 
"qqline" be ever meaningfully called in log context, then so "qqnorm", 
which should then complain as well.

Currently, "qqline" misbehaves, in that it silently produces 
a meaningless result, while it could either diagnose that the result is 
meaningless, or produce a mearningful result.


[Remainder of the reply top-quoted, as usual on r-help.]