Log transformation
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
mranpara03
- Posts: 1
- Joined: Wed Apr 08, 2015 4:27 am
Log transformation
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?
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Log transformation
Code: Select all
series newSeries = @recode(totmed<1,0,log(totmed))Who is online
Users browsing this forum: No registered users and 2 guests
