From a Logistic Coefficient to a Genotype Comparison
A logistic-regression coefficient is measured on the log-odds scale, while genetic association results are often presented as odds ratios. Turning one into the other is straightforward only after the comparison is made explicit: which genotype is being compared with which, and which allele does the genotype count represent? The same coefficient can imply different genotype comparisons under additive and categorical coding.
Let \(Y=1\) indicate the binary outcome of interest and \(Y=0\) its absence. For a biallelic variant, code genotype \(G\) as the number of copies of a specified effect allele, so \(G\) is 0, 1, or 2. The two homozygote groups are \(G=0\) and \(G=2\), and the heterozygote group is \(G=1\). All odds comparisons below are conditional on any covariates in the model being held at the same values.
The logistic model writes the log odds as a linear predictor. For a genotype association analysis with covariates \(\mathbf{Z}\), a general form is
For the coefficient-to-odds-ratio calculations, the key condition is that the two genotypes being compared have the same covariate values. The model then gives a difference in log odds, and exponentiating that difference gives the odds ratio. These interpretations presume the stated logistic model is the one used for the analysis, with the outcome and genotype coded as specified. They do not by themselves establish that an association is causal.
Additive Genotype Coding
In an additive logistic model, genotype enters as the allele count:
Here \(\beta_G\) is the change in log odds for each additional copy of the effect allele, at fixed covariate values. The model constrains the change from \(G=0\) to \(G=1\) to equal the change from \(G=1\) to \(G=2\) on the log-odds scale. It does not require equal changes in probability or risk.
The direction of a comparison matters. Reversing numerator and denominator takes the reciprocal of the odds ratio. For example, if the odds ratio for \(G=1\) versus \(G=0\) is \(\exp(\beta_G)\), then the odds ratio for \(G=0\) versus \(G=1\) is \(\exp(-\beta_G)=1/\exp(\beta_G)\).
Worked Example: Additive Model and Both Homozygote Comparisons
Suppose a hypothetical analysis codes the effect allele as \(A\), so \(G=0,1,2\) counts copies of \(A\). At the same fixed covariate values, the fitted additive model has \(\hat{\beta}_G=0.35\). Calculate the odds ratios for the heterozygote and the \(A/A\) homozygote relative to the \(G=0\) homozygote, and compare the heterozygote directly with \(A/A\).
For \(G=1\) versus \(G=0\), the genotype-count difference is 1:
The fitted odds are 1.419 times as high for heterozygotes as for \(G=0\) homozygotes, conditional on the same covariate values. For \(G=2\) versus \(G=0\), the difference is 2:
For the heterozygote versus the \(G=2\) homozygote, the difference is \(1-2=-1\):
Thus the fitted outcome odds for heterozygotes are about 0.705 times the odds for \(A/A\) homozygotes, or, in the reverse direction, the \(A/A\) odds are \(1/0.7047=1.419\) times the heterozygote odds. These are odds comparisons, not statements that outcome probability changes by the same percentages.
Categorical Genotype Coding
An additive model imposes a particular pattern across the three genotypes. A categorical, or genotypic, model instead gives each genotype its own log-odds level relative to a reference genotype. With \(G=0\) as the reference, write
where \(I(G=k)\) equals 1 when \(G=k\) and 0 otherwise. The coefficient \(\beta_1\) is the difference in log odds for \(G=1\) versus \(G=0\), and \(\beta_2\) is that for \(G=2\) versus \(G=0\). Exponentiating each coefficient gives the corresponding odds ratio. To compare \(G=1\) directly with \(G=2\), subtract their linear predictors: the intercept and covariate terms cancel, leaving \(\beta_1-\beta_2\).
Worked Example: Three Genotypes in a Categorical Model
In a hypothetical study, use \(G=0\) as the reference and fit the categorical model at common covariate values. Suppose the fitted genotype coefficients are \(\hat{\beta}_1=0.50\) for \(G=1\) and \(\hat{\beta}_2=0.20\) for \(G=2\). Calculate the odds ratios for both nonreference genotypes relative to \(G=0\), then compare the two nonreference genotypes.
For the heterozygote versus \(G=0\), exponentiate \(\hat{\beta}_1\):
For \(G=2\) versus \(G=0\), exponentiate \(\hat{\beta}_2\):
For heterozygotes versus \(G=2\), the log-odds contrast is the difference between the coefficients:
At the same covariate values, the fitted outcome odds for heterozygotes are 1.350 times the odds for \(G=2\) homozygotes. Notice that this comparison is not obtained by exponentiating either coefficient alone: each coefficient is relative to \(G=0\), so their difference gives the direct comparison.
Changing the Reference Genotype
A categorical model can use a different reference genotype without changing the fitted genotype contrasts. The coefficient values change because each coefficient is defined relative to the chosen reference. To obtain a comparison between any two groups, subtract their fitted log odds, or equivalently subtract their coefficients after accounting for the reference. This rule is useful for interpreting software output that uses a reference group other than \(G=0\).
Worked Example: Reading Coefficients With \(G=2\) as Reference
Consider a hypothetical categorical model that uses \(G=2\) as the reference. At fixed covariate values, its fitted genotype contribution is \(-0.30\) for \(G=0\), \(0.40\) for \(G=1\), and 0 for \(G=2\). Equivalently, the model has coefficients \(-0.30\) for \(I(G=0)\) and \(0.40\) for \(I(G=1)\). Find the heterozygote odds ratio against each homozygote group, and compare the two homozygote groups.
For \(G=1\) versus \(G=2\), the log-odds difference is \(0.40-0\):
For \(G=1\) versus \(G=0\), subtract the \(G=0\) contribution from the \(G=1\) contribution:
Finally, for \(G=0\) versus \(G=2\):
The odds ratio for \(G=2\) versus \(G=0\) is the reciprocal, \(1/0.7408=1.350\). The reference choice changes the printed coefficients, but direct contrasts recover the comparisons of interest.
Why the Model Choice Matters
Under additive coding, one coefficient summarizes a specified per-allele change in log odds. It consequently determines all three pairwise genotype comparisons. Under categorical coding, two coefficients allow the \(G=1\) and \(G=2\) groups to differ from \(G=0\) without requiring equal successive log-odds increments. The additive pattern is a restriction within the broader categorical description: it requires \(\beta_1=\beta_G\) and \(\beta_2=2\beta_G\) when \(G=0\) is the reference.
The choice of coding therefore affects what a coefficient means, not the definition of an odds ratio. Always state the effect allele for allele-count coding, the reference genotype for indicator coding, and the direction of the comparison. Also keep the outcome coding clear: if \(Y=1\) is changed to represent the opposite outcome, the log-odds signs reverse and the odds ratios are reciprocated.
Common Mistakes
- Exponentiating the wrong coefficient. In a categorical model with \(G=0\) as reference, \(\exp(\beta_1)\) compares \(G=1\) with \(G=0\), not \(G=1\) with \(G=2\). For the latter, use \(\exp(\beta_1-\beta_2)\).
- Ignoring comparison direction. An odds ratio of 1.4 for \(G=1\) versus \(G=0\) means the reverse comparison is \(1/1.4\), not 1.4.
- Calling an odds ratio a risk ratio. An odds ratio compares \(P(Y=1)/P(Y=0)\), not probabilities directly. It should not be described as a proportional change in outcome risk.
- Treating an additive coefficient as a risk-scale effect. The additive assumption is linearity in log odds per allele. It does not imply a constant probability difference per allele.
- Leaving out the allele or reference group. A per-allele odds ratio is uninterpretable unless the counted allele is named, and a categorical coefficient is uninterpretable without its reference genotype.
Check Your Understanding
For each question, specify the genotype comparison and keep covariate values fixed where relevant.
- An additive logistic model has an effect-allele coefficient of \(-0.20\). What is the odds ratio for \(G=2\) versus \(G=0\), and what does its direction mean?
- With \(G=0\) as reference, a categorical model has \(\beta_1=0.30\) and \(\beta_2=-0.10\). Write the formula for the \(G=1\) versus \(G=2\) odds ratio.
- Why is the heterozygote-versus-\(G=2\) odds ratio not generally \(\exp(\beta_1)\) in a categorical model using \(G=0\) as the reference?
- If an odds ratio for \(G=1\) versus \(G=0\) is 0.80, what is the odds ratio for \(G=0\) versus \(G=1\)?
- In one sentence, distinguish the additive-model assumption from a claim of equal risk differences across genotypes.