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.

## Dummy coding confusion

- mcfanda@gmail.com
**Posts:**390**Joined:**Thu Mar 23, 2017 9:24 pm

### Re: Dummy coding confusion

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

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

jonathon

### Re: Dummy coding confusion

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.

### Re: Dummy coding confusion

let's start with your data

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`)

and here is your .omv file

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`)

and here is your .omv file