AnsweredAssumed Answered

How to do regressions with log 0 transformed data ('-Inf' value) ?

Question asked by fgrattarola on Aug 9, 2018
Latest reply on Aug 9, 2018 by Dan_Patterson

Hello ! 

I'm performing regression analysis (OLS and WGR) using biodiversity data, between sampling effort and species richness values. I have a country-size grid-cell data set and I want to find out how does this relationship varies in different areas of the country.

 

Some of the grid-cells have 0 as value, because there were no organisms sampled in that area and therefore no species detected. The zeros are important for me to keep (in terms of neighbors), they are grid-cells that are not unknown, the are actually zero sampling effort areas. The problem is that I have log transform my data and those 0 values become -Inf values, so I cannot perform any analysis with those grids. My solution was doing a different log transformation, using log(value+1). In this way, the 0 becomes a 1, and log(1)=0. So, with this log transformation I can now include these zero value grids.

 

Is this OK? Do you have any other possible solution for this problem?

 

Many thanks !

Outcomes