Turn on suggestions

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

Showing results for

- JMP User Community
- :
- Discussions
- :
- log2 transformation using new formula column

- 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
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

log2 transformation using new formula column

Dec 17, 2019 7:08 AM
(455 views)

How can I log2 transformation many columns (hundreds) all at once? Is there a way of doing log2 transformation using the new formula column?

Thanks, Neal

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: log2 transformation using new formula column

I don't think so. The log base 2 is not a built-in function. As far as I know, you would have to use the equivalent log( x ) / log( 2 ) expression.

It is possible to define custom functions that can appear in the formula editor. I do not think that they appear in the New Column Formula menu, though. There are a lot of Community members who are smarter than me, so someone else might have a better answer for you.

Learn it once, use it forever!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: log2 transformation using new formula column

So, you do have to build the formula, but it may not be as bad as you think. Let's suppose you have 100 columns where you need this transformation. Put those columns all together. By this I mean, they are contiguous. Suppose the first one is Column 11, second one is Column 12, etc. up to Column 110. Now create 100 new columns. Select your 100 new columns and choose Cols > Standardize Attributes. In the Standardize Properties area click on Column Properties and select Formula.Check the box for Substitute Column Reference. Click Edit Formula. Now enter the first formula for your first new column. With my scenario it would be Log(Column 111)/Log(2). When you click OK JMP will fill in a formula for every one of your new columns, marching through each of the columns that had the data to be transformed. Your last formula column should be Log(Column 110)/Log(2).

Dan Obermiller

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: log2 transformation using new formula column

Thanks so much. Neal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: log2 transformation using new formula column

Hi @rexneal,

I would suggest something similar to @Dan_Obermiller, but by first taking advantage of the New Formula Column functionality you do have to make new columns and title them correctly.

- Select your columns
- Right Click column header > New Formula Column > Transform > Log
- Select the new Log transformed columns
- Right Click column header > Standardize Attributes
- In the Standardize Properties section, select Formula
- Check the box for Substitute Column Reference
- Click Edit Formula
- Select the column inside the log function, and click the comma key to reveal the base
- Change the base to 2, click ok to close the formula, then ok to close Standardize Attributes.

It might sound like a lot, but you can do this in 45 seconds. Here's a short video showing all the steps.

I hope this helps!