cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Ekarshalev
Level II

Counting and Using Row Identifier

Hello All,

Wanted to ask a question regarding counting of rows. I am attaching a data table which should hopefully illustrate the example. 

So I have data where the main variable is density of features. There is a unique value of the density per each ROI, per each sample (ID). In the normalized variable I am taking each density value per each ROI per each sample with unique ID and dividing by the whole population median and get a fraction. In the next column I take this fraction and evaluate if it matches my spec limits (here set at inside spec limit if variable is larger than 0.75 and smaller than 1.25).

What I would like to finally get is to count the number of inidividual ROI regions which are within the spec limit divided by the total number of ROIs per each unique ID sample (sometimes total number of ROIs are not the same between IDs)

I have tried to do this in a scripted fashion working with columns withing the original table but am having trouble. I am able to do a query which can tell me how many ROIs within and outside the spec limit there are for each unique ID but am having trouble scripting that and divinding by the total number of ROIs per given ID.

Any help is appreaciated. 

7 REPLIES 7

Re: Counting and Using Row Identifier

It looks like you are looking for group-specific proportions. If so, the easiest way I know to do this is to assign a numeric 1/0 variable, instead of "within spec" / "outside spec".

 

In this way, a simple mean of the column, grouped by other columns as needed, gives you this. Below I've shown a screenshot of your table with a 1/0 variable added, and the summary platform's preview of results when doing as I describe above. It is unclear to me exactly which grouping hierarchy you desire, but that is easily changed in the Summary platform's dialog.

 

Cheers,

Brady

 

brady_brady_0-1675713210971.png

 

Ekarshalev
Level II

Re: Counting and Using Row Identifier

Thank you Brady. I will look at this proposed solution.

Byron_JMP
Staff

Re: Counting and Using Row Identifier

instead of formulas, maybe try using the distribution platform's capability report

 

first set some specification limits via the column properties

Screen Shot 2023-02-06 at 3.42.41 PM.png

next, just do a histogram on the column, capability happens automatically, and the smallest bit at the bottom has what you might be looking for.

 

Screen Shot 2023-02-06 at 3.43.29 PM.png

JMP Systems Engineer, Health and Life Sciences (Pharma)

Re: Counting and Using Row Identifier

To add yet one more method in addition to the excellent solutions Brady and Byron proposed):

 

Use the Distribution Platform, set up like the picture below:

Jed_Campbell_0-1675719500349.png

Then, right click the Frequencies table and select "Make Combined Data Table."

Jed_Campbell_2-1675719791333.png

 

The result is a table with both the Count and the Probability (Count/Total) for each distinct ROI category.

Jed_Campbell_1-1675719677220.png

 

 

Byron_JMP
Staff

Re: Counting and Using Row Identifier

LOL!, in JMP, there are always at least 3 ways of doing the same thing.

; )

JMP Systems Engineer, Health and Life Sciences (Pharma)
Ekarshalev
Level II

Re: Counting and Using Row Identifier

Thanks Jed. This might be very close to what I need but let me give it a try and play with it.

Ekarshalev
Level II

Re: Counting and Using Row Identifier

Thank you Byron this looks good too. I will check it out