4
$\begingroup$

I have a bunch of data that's both positive and negative. Its calculated from the residuals of an ANOVA (i.e. specific leaf area calculated as the residuals of an ANOVA of leaf area with leaf blade weight). Right now the data is not homoscedastic or normal. Since I can't log negative numbers I'm unsure of how to make the data normal or homoscedastic. Could I square the residuals and then log them? Should I use the logs of leaf area and leaf blade weight to calculate the specific leaf area? I believe they were homoscedastic. Any help would be appreciated.

$\endgroup$
6
$\begingroup$

I think we need much more context on what you did and why you think you need to make these values more nearly normal. It is possible that you need to focus on developing a different model, not massaging the results of a model that is not quite satisfactory.

On a mechanistic level, cube roots act symmetrically on a variable that is positive, zero and negative and may pull in the tails of a distribution that is approximately symmetric but heavier-tailed than Gaussian or normal. I have sometimes found this useful for raw data. Note that in most software you need to do something like

sign(x) * abs(x)^(1/3) 

because powering will just give missings for negative values. More at e.g. http://www.stata-journal.com/sjpdf.html?articlenum=st0223

More esoteric functions can be suggested to do this e.g. the neglog function or some inverse hyperbolic function, but the cube root is simpler in the sense that it is met earlier in one's mathematical training.

I've not found reason to do this with residuals, however.

| cite | improve this answer | |
$\endgroup$
1
$\begingroup$

If you want to apply a transformation that requires strictly positive numbers (e.g. a log transformation) and your data does not meet that requirement, a common approach is to add a constant to the data before applying the transformation so that after adding the constant all your data is greater than zero.

x_transformed = log(x + C)

where C is a constant that allows x+C to be greater than zero. E.g., C = 1 - min(x).

See also Box-Cox transformation.

| cite | improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ This is unlikely to normalise a variable that is residual-like and both positive and negative as it doesn't act symmetrically. $\endgroup$ – Nick Cox Apr 22 '14 at 8:21

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.