turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- Log Modulus Transformation

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-29-2016 08:38 AM

I read a recent Blog at :

http://blogs.sas.com/content/iml/2014/07/14/log-transformation-of-pos-neg.html

related to the log-modulus transformation which was listed as:

**L( x) = sign(x) * log(|x| + 1)**

**My question is that once you have the transformed value which is now positive how should that value be calculated for the normal scale. I am using natural logs for my example**

**EG x=0.24 ln(x)=-1.42**

**L(x)=-1 *Ln(|0.24|+1)=0.42**

**What sould I do if I have values in that data set that do not give negative logs also add 1.0?**

**When I want to return to the normal scale for this Ln value (0.42) ie ( exp) x, w****hat should be the appropriate value for x? **

**I hope that I have interpreted the blog correctly.**

Accepted Solutions

Solution

08-30-2016
08:33 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-30-2016 08:13 AM

I'm not sure what you mean by the "normal scale"? What are you trying to accomplish?

The log-modulus transformation is one of many transformations that can be used for a variety of purposes, including visualizing data that spans many orders of magnitude, such as {-10000, -10, -0.01, 0.1, 100, 1000}.

Some other transformations (such as log() or sqrt()) are sometimes used as normalizing transformations. You can apply a normalizing transformation with the data are lognormally distributed (use log() ) or are distributed like x^2 (use sqrt()).

Perhaps you are asking "how can I undo the log-modulus transformation"?

The inverse transformation is

z = sign(y) ( exp(abs(y)) - 1 )

For example, if your original data X are normally distributed and you apply the log-modulus transformation to get Y, then you can apply the inverse transformation to recover X.

All Replies

Solution

08-30-2016
08:33 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-30-2016 08:13 AM

I'm not sure what you mean by the "normal scale"? What are you trying to accomplish?

The log-modulus transformation is one of many transformations that can be used for a variety of purposes, including visualizing data that spans many orders of magnitude, such as {-10000, -10, -0.01, 0.1, 100, 1000}.

Some other transformations (such as log() or sqrt()) are sometimes used as normalizing transformations. You can apply a normalizing transformation with the data are lognormally distributed (use log() ) or are distributed like x^2 (use sqrt()).

Perhaps you are asking "how can I undo the log-modulus transformation"?

The inverse transformation is

z = sign(y) ( exp(abs(y)) - 1 )

For example, if your original data X are normally distributed and you apply the log-modulus transformation to get Y, then you can apply the inverse transformation to recover X.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-30-2016 08:34 AM

The inverse transform was what I was seeking. Thanks for the clarification.