I am using the glm function in R to ascertain the risk of individual alleles to a disease; it is a case-control study. When I run the glm function, R automatically takes the allele with the lowest digit or in alphabetical order as the reference allele. I need to change this according to the each gene and the most neutral allele (i.e. the allele which has an even distribution among the cases and controls). How do I do this. The code I use currently is;
modelA <- (glm(trait ~ sex + A, data=Almon, family = binomial(link = 'logit')))