Page 1 of 1

Dummy coding confusion

Posted: Sat Mar 18, 2023 1:45 am
by ccheers
Hi all,
I have a large data set, and am trying to complete a 2 x 2 factorial ANOVA. One IV is gender of participant (male or female), the other is gender of a target (target male or female). The DV is how trustworthy the target is rated. Both IVs a between subjects (participants only judged a male or female target)
As such the trustworthy DV is in separate columns for the target male and female, so I'm stuck on how to create the dummy variable for the target IV. I have been able to manage to compute two new variables, using the IF function to compute new variables. One variable shows "0" if the male target. The other variable shows "1" if the female target. However, now I can't work out how to combine them.
I am also interested if there is a way to use the "IF" function using information from two variables, as then I could ask that IF the target male trustworthy column, show a value to show "0", and if the trustworthy female column shows a value, to show "1."

I hope that makes sense. Any help is greatly appreciated.

PS. I have tried to export of excel using CSV, so I could just combine using excel, however the file is too large a data was lost.

Re: Dummy coding confusion

Posted: Sat Mar 18, 2023 2:30 pm
by mcfanda@gmail.com
I'd suggest to make a small dataset to exemplify the issue, and post it as a .omv file, so we know what you did and how to solve the issue.

Re: Dummy coding confusion

Posted: Sat Mar 18, 2023 11:31 pm
by jonathon
people usually want to dummy code because they're coming from SPSS where the linear regression doesn't support factors. in jamovi, you can provide factors to the lin reg, and it will automatically dummy code them for you.

jonathon

Re: Dummy coding confusion

Posted: Sun Mar 19, 2023 4:30 am
by ccheers
Thanks for your help! I've attached an example to illustrate the data set. As you mentioned Jonathon, I am a previous SPSS user, so with a data set like this I would normally combine the two trustworthy variables into one variable, and then create a dummy coded variable to use as the IV or "factor" which would indicate whether the male or female condition was shown. The new combined trustworthy variable would become the DV. Are you suggesting I should do it as a linear regression rather than an ANOVA? Or is there a way to do the 2x2 ANOVA, however jamovi does the dummy code for you. As I'm trying to do the ANOVA and as the fixed factors need to be nominal or ordinal variables, I'm not sure how a data set like mine would work.
DataExample.omv
(3.78 KiB) Downloaded 77 times

Re: Dummy coding confusion

Posted: Sun Mar 19, 2023 5:04 am
by jonathon
let's start with your data

Screenshot 2023-03-19 at 15.53.15.png
Screenshot 2023-03-19 at 15.53.15.png (13.29 KiB) Viewed 2005 times

i'll begin by saying this data is very unusually formatted. i used a couple of computed variables to make it suitable for an ANOVA.

IFMISS(`Trustworthy Male Target`, 'Female', 'Male') <- i've just noticed i've done that backwards
IFMISS(`Trustworthy Male Target`, `Trustworthy Female Target`, `Trustworthy Male Target`)

Screenshot 2023-03-19 at 15.59.45.png
Screenshot 2023-03-19 at 15.59.45.png (59.91 KiB) Viewed 2005 times

and here is your .omv file

DataExample.omv
(4.44 KiB) Downloaded 77 times