cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
David_Burnham
Super User (Alumni)

Col Functions and Row States

According to the release notes for version 15 of JMP:

The Col functions honor excluded rows through the Excluded(Row State()) function.
Col Maximum( :height, :sex, Excluded( Row State() ) );

However, this syntax doesn't seem to work.  Can anyone suggest the corect syntax?

-Dave
17 REPLIES 17
David_Burnham
Super User (Alumni)

Re: Col Functions and Row States

On one computer it works:

 

this-works.PNG

 

And on the another it fails:

 

this-fails.png

 

-Dave
Oren_Barilan
Level I

Re: Col Functions and Row States

Adding to this discussion, I would consider the Col functions behaviour to being odd and different from what is typical in JMP and therefore, unexpected and confusing.

Col functions ignore exclusion of rows and filtering, both local and global. 

This means that local filtering within an analysis output is ignored with col functions and getting results with filtering or by subgroups is not possible or actually the obtained results are incorrect.

The ability to exclude some rows by using a formula is still very limiting.

 

I see this a problem with JMP since this could potentially confuse or mislead users. I hope JMP team would address this to make Col functionality adhere to that of other functions.

txnelson
Super User

Re: Col Functions and Row States

@Oren_Barilan ,

To take a ten thousand foot view of your concern about the Col functions not following the Excluded functionality of the JMP,  Platforms, one would have to include many more functions than just the Col functions.  A simple SQRT() function, or a SUM() should also be included in your argument, for if they are processed for values on an Excluded row, they too should return a null value.  And if this was the case, how do you handle the situation where you do not want the rows ignored?

So from my point of view, JMP takes a more functional approach, allowing the programmer to have it which every way they need it.

Col Mean( :weight );

calculates the Mean over all rows in the data table, while

Col Mean( If( Excluded( Row State( Row() ) ), ., :weight ) )

calculates the Mean on only the non Excluded rows

Jim
jthi
Super User

Re: Col Functions and Row States

I agree with Jim.

 

There is also third option, where you handle Excluded as it's own "group" (not sure how it is handled in reality)

 

Col Mean(:weight, Excluded())

 

jthi_0-1702056117300.png

 

My only "issue" with Col Functions is that they can be dangerous due to how they handle excluded rows AND you can create them so easily from right-click menu. Maybe this risk could be reduced, if JMP did auto-include Excluded() to those formulas (or make it a preference)?

 

-Jarmo

Re: Col Functions and Row States

It looks like it is used with a column formula where the Row() function is defined as it is evaluated.

Re: Col Functions and Row States

According to the documentation, when a By variable is specified the function should be used in a column formula or For Each Row():

(Optional) A By variable to compute statistics across groups of rows. Use the By variable in a column formula or in a For Each Row() function.

In reviewing some of the examples from earlier in this post, I would agree that it appears to be treating excluded values as their own By level.

 

Wendy
David_Burnham
Super User (Alumni)

Re: Col Functions and Row States

OK thanks.  I can't really get my head around the idea of generating a column statistic for every row of the table but I guess there must be use-cases.  I'll stick with using a user-defined function to calculate column stats whilst taking into account  row exclusions.

-Dave

Re: Col Functions and Row States

I think that it is the same concept as the one behind binning. You are mapping one value to another for each observation, in this case, a group value. It might be a bin. It might be a measure of central tendency.