Skip to content
Prev 169645 / 398506 Next

Log transformation and -Inf values for use in glm()

Paul,

On Fri, Feb 6, 2009 at 3:25 PM, Paul Warren Simonin
<Paul.Simonin at uvm.edu> wrote:

            
In general, use syntax like this:

glm(yoyras ~ log(temp), data = EarlyLn, subset = temp > 0)

However, it's bad statistical practice to use a transformation that
causes you to lose data. One approach is to add a constant to temp
via:

glm(yoyras ~ log(temp + 1), data = EarlyLn, subset = temp > 0)

with the disadvantage being that the constant you choose is arbitrary
but affects your inferences.

Stephen
Rochester, MN USA