Log transformation
Posted: Wed Apr 08, 2015 4:33 am
I want to transform a series of total medical costs totmed by taking the natural log. However some values are zero so when I try to do this using generate it gives me an error saying some values are non positive. Is there a way that I can do this log(totmed); = 0 if totmed < 1 so that the non positives are zero in the new series and the rest are transformed?