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
Waferswafers
Level II

How can I create a column for the statistics (means,max,min) of specific lots (specific rows) that I have in my data table?

I am able to create Mean or min or max of the whole column by clicking column properties, formula, statistical, Col Mean. This brings me the mean of the whole data set. How can I make it bring me the mean of every lot? for example, rows 1 to 10 are lot A, and rows 11 to 20 are lot B. I would like rows 1 to 10 to show me mean of Lot A and 11 to 20 to show me the mean of lot B.

2 ACCEPTED SOLUTIONS

Accepted Solutions
GregF_JMP
Staff

Re: How can I create a column for the statistics (means,max,min) of specific lots (specific rows) that I have in my data table?

Hello new member,
The column mean formula element has an optional "by variable" that will calculate by groups, in your case lot.

The appearance when looking at the sample data table, Big Class for average height by age group would be Col Mean(:height, :age).

 

Tips:

  • when using the formula editor to enter a space for the optional argument, after entering the column in Col Mean() function, press the caret key (up arrow) in the function editor to make the space for the next optional argument.
  • There is hover function help available in the function editor, hold the mouse pointer steady over the function name in the left pane or in the edit window.

View solution in original post

txnelson
Super User

Re: How can I create a column for the statistics (means,max,min) of specific lots (specific rows) that I have in my data table?

The Col Mean() function has more than one element that can be specified.  These additional elements are noted in a couple of different ways.

  1. When you select the function in the Formula Editor, when there are additional element available, a ^ is displayed in the formula, indicating that one can insert additional elements.txnelson_0-1698195005095.pngThe formula can be expanded by clicking on the txnelson_1-1698195120587.png icon at the top of the window. txnelson_2-1698195194413.png.  The formula now shows that a BY column can be specified.  The Col Mean() function will now calculate the mean separately for each of the BY columns different values. txnelson_3-1698195402359.png would calculate the Mean of column NPN1 for whatever value of Lot_id the specific row has.txnelson_4-1698196040403.png

     

     

     

     

     

  2. You can also see the additional elements available to a function by looking in the Scripting Index.  This is easily done by right clicking in the Formula Editor on the function you are interested in, and selecting Show in Scripting Indextxnelson_5-1698196273266.png  which will open the Scripting Index directly to the function in questiontxnelson_6-1698196393146.png.  The Syntax definition shows all of the different elements that can be used.

     

     

What you seem to be attempting to do, is to use/treat JMP as if it is Excel.  In Excel, one uses formulas to create the different outputs one wants.  While you can do that in JMP, it is typically much easier to use the built in platforms in JMP to get the answers you want. And rather than having the final goal to have all of your results at various places on your spreadsheet, JMP takes the approach of having the different results typically displayed in their own window.  Their location and linking to either by having them created from within a defined project, or by referencing them from the data table they were produced from.  Taking your specific issue, you might have either used the Summary Platform, or the Tabulate Platform to get the results you want.

Summary Platform

Tables=>Summary

txnelson_8-1698197312629.png

Which produces a new data table

txnelson_9-1698197365006.png

or

Analyze=>Tabulate

Which is an interactive, drag and drop application that allows you to develop a summary report

txnelson_10-1698197546238.png

 

Jim

View solution in original post

5 REPLIES 5
GregF_JMP
Staff

Re: How can I create a column for the statistics (means,max,min) of specific lots (specific rows) that I have in my data table?

Hello new member,
The column mean formula element has an optional "by variable" that will calculate by groups, in your case lot.

The appearance when looking at the sample data table, Big Class for average height by age group would be Col Mean(:height, :age).

 

Tips:

  • when using the formula editor to enter a space for the optional argument, after entering the column in Col Mean() function, press the caret key (up arrow) in the function editor to make the space for the next optional argument.
  • There is hover function help available in the function editor, hold the mouse pointer steady over the function name in the left pane or in the edit window.
Waferswafers
Level II

Re: How can I create a column for the statistics (means,max,min) of specific lots (specific rows) that I have in my data table?

It worked, thank you so much!

txnelson
Super User

Re: How can I create a column for the statistics (means,max,min) of specific lots (specific rows) that I have in my data table?

The Col Mean() function has more than one element that can be specified.  These additional elements are noted in a couple of different ways.

  1. When you select the function in the Formula Editor, when there are additional element available, a ^ is displayed in the formula, indicating that one can insert additional elements.txnelson_0-1698195005095.pngThe formula can be expanded by clicking on the txnelson_1-1698195120587.png icon at the top of the window. txnelson_2-1698195194413.png.  The formula now shows that a BY column can be specified.  The Col Mean() function will now calculate the mean separately for each of the BY columns different values. txnelson_3-1698195402359.png would calculate the Mean of column NPN1 for whatever value of Lot_id the specific row has.txnelson_4-1698196040403.png

     

     

     

     

     

  2. You can also see the additional elements available to a function by looking in the Scripting Index.  This is easily done by right clicking in the Formula Editor on the function you are interested in, and selecting Show in Scripting Indextxnelson_5-1698196273266.png  which will open the Scripting Index directly to the function in questiontxnelson_6-1698196393146.png.  The Syntax definition shows all of the different elements that can be used.

     

     

What you seem to be attempting to do, is to use/treat JMP as if it is Excel.  In Excel, one uses formulas to create the different outputs one wants.  While you can do that in JMP, it is typically much easier to use the built in platforms in JMP to get the answers you want. And rather than having the final goal to have all of your results at various places on your spreadsheet, JMP takes the approach of having the different results typically displayed in their own window.  Their location and linking to either by having them created from within a defined project, or by referencing them from the data table they were produced from.  Taking your specific issue, you might have either used the Summary Platform, or the Tabulate Platform to get the results you want.

Summary Platform

Tables=>Summary

txnelson_8-1698197312629.png

Which produces a new data table

txnelson_9-1698197365006.png

or

Analyze=>Tabulate

Which is an interactive, drag and drop application that allows you to develop a summary report

txnelson_10-1698197546238.png

 

Jim
Waferswafers
Level II

Re: How can I create a column for the statistics (means,max,min) of specific lots (specific rows) that I have in my data table?

It worked, thank you so much! appreciate the screenshots too, very helpful

txnelson
Super User

Re: How can I create a column for the statistics (means,max,min) of specific lots (specific rows) that I have in my data table?

I strongly suggest that you take the time to read the document, Discovering JMP.  It is available under the Help pull down menu in JMP.  It will give you a real overview of what JMP is all about.

Jim