You are here:

- Home
- Science
- Mathematics
- Probability & Statistics
- Log transforming data with zeroes

Advertisement

Hi there,

I am doing regression analysis work and need to know how I can transform the data I have (all non-negative values) into ln. The problem is of course 7% of the 1170 numbers take a natural value of 0.

How can I go about doing this? I imagine it's doable in Excel so if you could instruct me to sort it out I'd really appreciate it. It's a really important task pertaining to a study I'm doing and I'm not a maths or statistics major.

Alex

It depends on the nature of your data. If your data is translation-invariant, but for some reason you want to convert it to this logarithmic scale, you can always take your entire data set, add 1 to every number, then take the natural log of each one.

Is there more context here? Does this idea work? Please submit a follow-up with more information if this suggestion does not help.

- Add to this Answer
- Ask a Question

Rating(1-10) | Knowledgeability = 10 | Clarity of Response = 10 | Politeness = 10 |

Comment | Clear answer, matches the opinion of another academic I asked. |

I can answer all questions up to, and including, graduate level mathematics. I do not have expertise in statistics (I can answer questions about the mathematical foundations of statistics). I am very much proficient in probability. I am not inclined to answer questions that appear to be homework, nor questions that are not meaningful or advanced in any way.

I am a PhD educated mathematician working in research at a major university.**Organizations**

AMS**Publications**

Various research journals of mathematics. Various talks & presentations (some short, some long), about either interesting classical material or about research work.**Education/Credentials**

BA mathematics & physics, PhD mathematics from a top 20 US school.**Awards and Honors**

Various honors related to grades, various fellowships & scholarships, awards for contributions to mathematics and education at my schools, etc.**Past/Present Clients**

In the past, and as my career progresses, I have worked and continue to work as an educator and mentor to students of varying age levels, skill levels, and educational levels.