BookmarkSubscribeRSS Feed
yiferic
Calcite | Level 5
Hey all, I have some data that we're trying to analyze using mixed models but it looks like the data is non-linear. We decided to try a log transform since it looks like the fixed effect has an acute phase and then levels off after the first couple of weeks. The problem is the data has negative values (directionality is important). We're hearing conflicting suggestions about what to do next. Someone told us that we should add a constant to all the values and use the offset to make everything in the positive domain, while others said that's a bad idea. Any suggestions?
3 REPLIES 3
SPR
Quartz | Level 8 SPR
Quartz | Level 8
Hello Yiferic,

I do not think that adding a constant to y is a bad idea. For a simple model
log(y+C)=A+SUM(BiXi), we get y=exp(A+SUM(BiXi))-C. What "others" say, why is it a bad idea?

Sincerely,
SPR
yiferic
Calcite | Level 5
Thanks for the reply SPR, one of the issues is we don't know what constant to use and how it'll affect our likelihood/significance values. I'm assuming we should use a constant that's about the same order as the smallest negative value?
SPR
Quartz | Level 8 SPR
Quartz | Level 8
Yes, it is true. This constant could be found from the equation log(y+C) = 1 for y < 0. This guarantees that log(y+C) => 0.

SPR

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

Discussion stats
  • 3 replies
  • 1517 views
  • 0 likes
  • 2 in conversation