# Use logarithmic or linear values when performing correlation and ANOVA?

The data was collected using a logarithmic scale: scores (explanatory variable) are collected with values from 0-5. A score of 3 is 10x the value of a score of 2.

I wasn't sure if using either the log scale (0-5) or a "linearalized" scale (0-100000), when performing corr. or ANOVA, was correct, so I tried both. Unsurprisingly, the scale I choose affects whether correlations are found or not, and whether variances are found or not.

Which scale should I use in my analysis? Or what questions do I need to answer to help me decide which scale I should use in my analysis?

Thanks very much!

• as Michal J. Figurski says you need normally distributed data. Have a look at the Kruskal-Wallis test! – Verena Haunschmid Jan 10 '14 at 16:55

An ANOVA doesn't require normally distributed data, but normally distributed residuals. That is, a normally distributed dependent variable conditional on the predictors in the model. However, you refer to the transformed variable as a "explanatory variable." I take that to be an independent variable, and thus it does not need to be transformed to fit into the assumptions of an ANOVA framework.

• dmartin: To ensure I understand you correctly, do you mean that I don't need to transform the log scale (0-5) to lin (0-100000) to perform ANOVA? If that is so, why would ANOVA (Kolmogorov-Smimov, t-test) show that my independent variable does NOT vary across a dependent variable when in linear scale, but DOES vary across that dependent variable when in log scale? Thanks a bunch. – seadragon Jan 11 '14 at 3:36
• @Ted it's hard to say without seeing a reproducible example in your question – dmartin Jan 11 '14 at 17:11
• dmartin: On a linear scale, independent variable "Distance" does not vary across the "Person" who took the distance measurement: Person A: 220.423 +/- 283.897. Person B: 16.087 +/- 6.512. p = 0.104 (t-test). However, on a logarithmic scale, "Distance" does vary by the "Person" who took the measurement: Person A: 1.743 +/- 0.268. Person B: 1.224 +/- 0.121. p < 0.001 (t-test). Does that help? Thanks! – seadragon Jan 13 '14 at 1:42
• Looks like there is a homogeneity of variance issue before taking the log. – dmartin Jan 13 '14 at 12:21
• Would using robust standard errors in the model solve this problem? – seadragon Jan 13 '14 at 18:49

As far as I remember, ANOVA requires you to have normally distributed data. Hence if your dataset is not normally distributed, you'd use a transformation. I've just read a paper that had a good review of data transformation techniques (even though probably quite unrelated to your topic): http://www.degruyter.com/view/j/cclm.2010.48.issue-11/cclm.2010.319/cclm.2010.319.xml

If you don't have access to full text, here's a summary by myself:

1. Plot a histogram of your data. Start with your raw data, then log-transformed data, and then after each transformation. Overlay the Gaussian bell-shape if you can, but you should be able to judge visually which transformation brings you closest to the normal shape.
2. Some transformations to try: x^3, X^2, sqrt(x), log(x)
3. If these do not work, try adding or subtracting a constant "a": (x-a)^3, ..., log(x-a), etc.
4. If you need to judge formally (not just visually) which transformation works best, use skewness (should be between -0.15 and 0.15) and curtosis (should be between 2.7 and 3.3).

Hope this helps.

• I think you mean that the data conditional upon the model are normally distributed? On their own they don't need to be normally distributed. By data I mean $y$, the response. I usually talk about this assumption as being of the residuals of the model, not the data, but if you include conditional upon the model the two are the same IIRC. – Reinstate Monica - G. Simpson Jan 10 '14 at 18:22
• @GavinSimpson - honestly, I am not following what you're saying - I'm no specialist in the topic, and this just sounds too complicated to me. So please correct me - the way I see it is that analysis of variance relies on normal distribution, because of the variance which is a parameter in that distribution. Therefore, I think, you can't do AOV on data that is not normally distributed, because you're estimating a parameter from normal distribution. – Michal J. Figurski Jan 10 '14 at 18:40
• ANOVA is just regression (comes from the generalisation known as the general linear model), and we don't assume that $y$ is normally distributed there. The residuals from the model are assumed to be normally distributed, but not the response data $y$. We assume that the response data is normally distributed conditional upon the estimated parameters. I.e. you don't need to have a histogram of $y$ follow a normal distribution. – Reinstate Monica - G. Simpson Jan 10 '14 at 18:55
• OK - I guess I get it. – Michal J. Figurski Jan 10 '14 at 20:25
• GavinSimpson, does doing ANOVA on log vs. lin scaled values change whether the residuals are normally distributed or not? – seadragon Jan 11 '14 at 3:16