[R-sig-eco] Log transforming zero value data

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Wed Jun 24 09:37:58 CEST 2009


Dear Nate,

Much depend on the nature of your data. If they are counts, then I would
recommend to use glm(count ~x + y + z, family = poisson) instead of
lm(log(count) ~ x + y + z). Otherwise people tend to use a log(x+1)
transformation.

HTH,

Thierry


------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: r-sig-ecology-bounces at r-project.org
[mailto:r-sig-ecology-bounces at r-project.org] Namens Nate Upham
Verzonden: woensdag 24 juni 2009 2:31
Aan: r-sig-ecology at r-project.org
Onderwerp: [R-sig-eco] Log transforming zero value data

I have a general stats question for you guys:

How does one normally deal with zero (0) values when log transforming
data?  

I would like to log transform (natural log, ln) several response
variables for use in quantile regression.  But one of my variables
includes several zero values.  Since ln(0) = infinity, this is not
readily possible.  Is it best to remove all data with zero values?  Or
should I add a very small number to each value (e.g., 0.00001)?  This
seems problematic.  Is there an easy way to address this issue?

Thanks much for your help,
--Nate

_________________________________
Nathan S. Upham
Ph.D. student
Committee on Evolutionary Biology
University of Chicago
1025 E. 57th St., Culver 402
Chicago, IL 60637
nsupham at uchicago.edu

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer 
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in  this message 
and any annex are purely those of the writer and may not be regarded as stating 
an official position of INBO, as long as the message is not confirmed by a duly 
signed document.



More information about the R-sig-ecology mailing list