I'm using SPSS for binary logistic regression but one of my independent variables is non-dichotomous and categorical (genotype - there are 5 gene combinations possible). I'm trying to see if a particular genotype is associated with the presence of anxiety as well as if there is a sex-specific effect (i.e. males with a particular genotype are more likely to have anxiety).

Independent variables:

  • Sex (male/female),
  • Genotype (5 combinations)

Dependent variable:

  • presence of anxiety (yes/no)

I coded

  • male=0 and female=1, and
  • no=0 and yes=1,

but I don't know how to code the genotypes for this analysis? I would greatly appreciate any help!

  • $\begingroup$ See this site search. $\endgroup$ – whuber Jan 28 at 15:34
  • $\begingroup$ For genetics specifically, there are a few other possibilities. For instance, if you have one very common and one uncommon allele in a SNP, then you could encode the number of uncommon alleles a participant carries as a numerical predictor with values 0, 1 or 2. $\endgroup$ – Stephan Kolassa Jan 28 at 15:36
  • $\begingroup$ @StephanKolassa I tried that and I encoded 0,1,2 for how many alleles each patient had for a certain "risk" gene. Would it be correct to then assign this as a categorical variable on SPSS and assign 0 as the reference group? Then run the binary regression? $\endgroup$ – user309569 Jan 28 at 15:43
  • $\begingroup$ No, then you would just encode it as numerical. The idea is that two alleles would be modeled as having twice the effect of a single one, and a numerical predictor does exactly that. This linearity doesn't always work out, of course. So you need to consult what the literature says before setting up the model. $\endgroup$ – Stephan Kolassa Jan 28 at 15:47