cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
SignAntelope698
New Member

Multiple selection answers each seperated by column, how to isolate one answer?

Hello! I have a dataset with columns Q2_1 to Q2_7, each representing different demographic categories. Each row corresponds to a participant's selection of answers. For example, Q2_1 might represent White/Caucasian, Q2_2 might represent Black or African American, and so on. I need to create a new column that indicates if a specific demographic (e.g., White) was selected but another demographic (e.g., Black) was not. How can I accomplish this in my data analysis?

I have been trying this one, but it doesnt work: 

Screenshot 2024-11-18 at 11.47.54 AM.png

6 REPLIES 6
jthi
Super User

Re: Multiple selection answers each seperated by column, how to isolate one answer?

What goes wrong with your implementation? Are your Q columns numeric or character? You are comparing to characters which would indicate that they are character columns. Can you provide small subset of your data?

-Jarmo
SignAntelope698
New Member

Re: Multiple selection answers each seperated by column, how to isolate one answer?

What is depicted in the picture the recoded columns. They've been recoded as binary values:
0 means the participant did not select that demographic
1 means the participant did select that demographic.
I also have the original columns which contain the full demographic labels as text (e.g., 'White/Caucasian', 'Black or African American').

jthi
Super User

Re: Multiple selection answers each seperated by column, how to isolate one answer?

Are they numbers or strings? As in are you comparing numbers to strings which would make your comparisons to always fail

-Jarmo
hogi
Level XII

Re: Multiple selection answers each seperated by column, how to isolate one answer?

To find it out, please open the column manager and check the data type:

hogi_2-1731960657744.png

 



hogi_1-1731960643820.png

for numeric columns, you have to compare with numbers - without the "  "

SignAntelope698
New Member

Re: Multiple selection answers each seperated by column, how to isolate one answer?

Thank you, I tried taking those out since they're numeric but it didn't work.

txnelson
Super User

Re: Multiple selection answers each seperated by column, how to isolate one answer?

Would you please attach a sample data table.  That will really help.

Jim