merge 3 dichotomous variables into one nominal

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
Quotation9914
Posts: 3
Joined: Mon Sep 23, 2024 12:31 pm

merge 3 dichotomous variables into one nominal

Post by Quotation9914 »

Hi,
sorry if my Question has been answered elsewhere. I may lack the wording for my problem and could not find a solution so far.

My survey system exports answers to nominal variables into seperate dichotomous variables, so e.g. option 1 becomes PD_JOB_1, option 2: PD_JOB_2, option 3: PD_JOB_3 and so on. They can either be single choice or multiple choice (as in this case). PD_JOB_4 in the screenshot can be ignored, it was an addon field used to input the workload in percentage in addition to checking PD_JOB_3.
I'm looking for a way to transform them into a nominal containing all options e.g. PD_JOB with values 1,2,3 for both single and multiple choice items.
I appreciate your help.
Attachments
Bildschirmfoto 2024-09-26 um 08.30.23.png
Bildschirmfoto 2024-09-26 um 08.30.23.png (118.15 KiB) Viewed 14967 times
User avatar
jonathon
Posts: 2828
Joined: Fri Jan 27, 2017 10:04 am

Re: merge 3 dichotomous variables into one nominal

Post by jonathon »

something like this?
Screenshot 2024-09-26 at 17.17.23.png
Screenshot 2024-09-26 at 17.17.23.png (506.86 KiB) Viewed 14962 times
Quotation9914
Posts: 3
Joined: Mon Sep 23, 2024 12:31 pm

Re: merge 3 dichotomous variables into one nominal

Post by Quotation9914 »

Thanks, Jonathan. I added a handmade example to clarify what I try to achieve. However with compute I'm missing AND/OR and with transform, I'm not able to change $source. Any ideas?
(The first row is an edge case, I'd be interested in a single choice solution as well in which only one of the three would contain a '1')
Attachments
Bildschirmfoto 2024-09-26 um 11.17.02.png
Bildschirmfoto 2024-09-26 um 11.17.02.png (15.93 KiB) Viewed 14938 times
User avatar
jonathon
Posts: 2828
Joined: Fri Jan 27, 2017 10:04 am

Re: merge 3 dichotomous variables into one nominal

Post by jonathon »

for 'and' and 'or', you can simply use 'and' and 'or'. i am still guessing as the computation you're trying to achieve ...
Screenshot 2024-09-26 at 19.27.37.png
Screenshot 2024-09-26 at 19.27.37.png (585.12 KiB) Viewed 14936 times
Quotation9914
Posts: 3
Joined: Mon Sep 23, 2024 12:31 pm

Re: merge 3 dichotomous variables into one nominal

Post by Quotation9914 »

Awesome - thanks a lot for your work. That solved my problem.
Post Reply