I would like to know how to transform negative values to log(), since I have heteroskedastic data. I've read that log(x+1) solves the problem but this doesn't work with my data and I continue getting NaNs as result.
For e.g. I get this warning message (I didn't put my complete database because I think one of my negative values is enough to show the problem):
> log(-1.27+1)
[1] NaN
Warning message:
In log(-1.27 + 1) : NaNs produced
>
UPDATE:
Here is an histogram of my data. I'm working with palaeontological time series of chemical measurements. If the difference between (for e.g.) variables like Ca and Zn is too big, I need some type of data standardization, which is why I'm testing the log() function.



log(x+1)transformation will is only defined forx > -1, as thenx + 1is positive. It'd be good to know your reason for wanting to log transform your data. – Matthew Drury Jun 04 '15 at 04:58sign(x) * (abs(x))^(1/3), the details depending on software syntax. For more on cube roots see e.g. http://www.stata-journal.com/sjpdf.html?articlenum=st0223 (see esp. pp.152-3).We used cube roots to help visualization of a response variable that can be positive and negative in http://www.nature.com/nature/journal/v500/n7464/full/nature12382.html?WT.ec_id=NATURE-20130829 – Nick Cox Jun 04 '15 at 07:54var042minusvar065, or whatever, then I and everybody else have something to discuss. Otherwise I can't see what you are expecting or asking us to do beyond what we have suggested. Nor are you responding to any of the specific suggestions already made. It's already established that log() is pointless unless for positive arguments. – Nick Cox Jun 05 '15 at 09:34log(x+1)to another constant (the minimum value) as explained Jeromy Anglim here, it islog(x+C). Now the logarithmic transformation works great with my data, of course it is transforming the negative to positive first. Regarding to transform data to remove heteroskedasticity I have to formulate a new question. – Darwin PC Jun 06 '15 at 01:47