cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP 19 is here! See the new features at jmp.com/new.
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
Choose Language Hide Translation Bar

Counting how many IDs have a certain variable

I'm fairly new to JMP so apologies if this is a basic question. I am working on a research project where we are trying to determine how exposure to certain metals affects cognition. I am trying to figure out how many people have data for both of our variables of interest, because some participants only have metal exposure data while others only have cognitive data. Is there a way to get a count for how many people have both variables? I'm using JMP 17 for reference. 

4 REPLIES 4
txnelson
Super User

Re: Counting how many IDs have a certain variable

Here is an example using the Big Class sample data table.

txnelson_0-1739917240902.png

If one wants to find all of the individuals that are Female and have a Height of 61 inches all that has to be done is to select an example and then select all matching records.

Start by selecting the sample.

Row 2 is a Female with the Height of 61. So first click on the Sex cell for row 2.

txnelson_1-1739917470428.png

Next, the Height cell for the same row needs to be selected.  Since just clicking on the cell will clear the already selected Sex cell, one needs to hold the CNTL key down to indicate that the selection is to be added to the selected cells

txnelson_2-1739917634409.png

Finally, move the cursor to the RowState column and right click on row 2 and select, Select Matching Cells

txnelson_3-1739917781712.png

All of the rows that are matched will be selected and the total number of selected rows is specified in the Row Panel area of the display

txnelson_4-1739917931950.png

 

Jim

Re: Counting how many IDs have a certain variable

Hi! This is helpful, but it is not quite what I'm looking for. I'm not trying to find a specific value (e.g., females that are 61 inches tall), but I'm looking to see how many people have any data for these variables (anyone who has gender and height). 

txnelson
Super User

Re: Counting how many IDs have a certain variable

Here is a very simple script that will accomplish what you want

current data table() << select where( !isMissing(:sex) & !isMissing(:height))
Jim
jthi
Super User

Re: Counting how many IDs have a certain variable

Other good option is to create summary table

jthi_0-1739942466380.png

-Jarmo

Recommended Articles