13
$\begingroup$

Problem

I would like to plot the variance explained by each of 30 parameters, for example as a barplot with a different bar for each parameter, and variance on the y axis:

alt text

However, the variances are are strongly skewed toward small values, including 0, as can be seen in the histogram below:

alt text

If I transform them by $\log(x+1)$, it will be easier to see differences among the small values (histogram and barplot below):

alt textalt text

Question

Plotting on a log-scale is common, but is plotting $\log(x+1)$ similarly reasonable?

$\endgroup$

2 Answers 2

13
$\begingroup$

This has been called a "started logarithm" by some (e.g., John Tukey). (For some examples, Google john tukey "started log".)

It's perfectly fine to use. In fact, you could expect to have to use a nonzero starting value to account for rounding of the dependent variable. For example, rounding the dependent variable to the nearest integer effectively lops off 1/12 from its true variance, suggesting a reasonable start value should be at least 1/12. (That value doesn't do a bad job with these data. Using other values above 1 doesn't really change the picture much; it just raises all the values in the bottom right plot almost uniformly.)

There are deeper reasons to use the logarithm (or started log) to assess variance: for example, the slope of a plot of variance against estimated value on a log-log scale estimates a Box-Cox parameter for stabilizing the variance. Such power-law fits of variance to some related variable are often observed. (This is an empirical statement, not a theoretical one.)

If your purpose is to present the variances, proceed with care. Many audiences (apart from scientific ones) cannot understand a logarithm, much less a started one. Using a start value of 1 at least has the merit of being a little simpler to explain and interpret than some other start value. Something to consider is to plot their roots, which are the standard deviations, of course. It would look something like this:

alt text

Regardless, if your purpose is to explore the data, to learn from them, to fit a model, or to evaluate a model, then don't let anything get in the way of finding reasonable graphical representations of your data and data-derived values such as these variances.

$\endgroup$
1
  • 1
    $\begingroup$ thank you for the explanation and proper terminology / reference. The audience is readers of a scientific journal and the topic is variance decomposition; understanding the concept of a log transform is a pre-requisite but I still wasn't sure if this presentation required further justification - roots are a good alternative. Thanks. $\endgroup$ Jan 12, 2011 at 0:30
3
$\begingroup$

It can be reasonable. The better question to ask is whether 1 is the proper number to add. What was your minimum? If it was 1 to begin with, then you are imposing a particular interval between items with value of zero and those with value 1. Depending on the domain of study it may make more sense to choose 0.5 or 1/e as the offset. The implication of transforming to a log scale is that you now have a ratio scale.

But I am bothered by the plots. I would ask whether a model that has most of the explained variance in the tail of a skewed distribution be considered to have desirable statistical properties. I think not.

$\endgroup$
1
  • $\begingroup$ I am not sure if it is clear, but the histograms are of the 30 values of variance, and the barplots are the raw values of the variance, i.e. var <- c(0,0,1,3,10,100,150), hist(var), barplot(var), so I interpret this as a few parameters explain most of the variance, not that most of the explained variance is in the tail. Does that make more sense? Sorry if it was unclear. $\endgroup$ Jan 11, 2011 at 4:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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