Why Use a Linear Model for a Binary Trait?
A binary phenotype records two outcomes, such as affected or unaffected. Coding affected as 1 and unaffected as 0 makes the mean of the phenotype a proportion: among individuals with a particular genotype, the average of their 0/1 outcomes is the observed fraction affected. This creates a direct connection between regression and absolute risk.
A linear probability model (LPM) uses ordinary least squares (OLS) to relate that binary outcome to predictors. For an additive genetic model, the genotype predictor is the number of copies of a designated effect allele: 0, 1, or 2. The key attraction is interpretability: when the model’s assumptions are suitable, the genotype slope is a change in risk, in probability units, per additional allele copy.
The model’s conditional mean must be a probability for each genotype value being considered, so it must lie between 0 and 1. The linear equation does not enforce this requirement automatically. Also, the additive assumption is substantive: it says that the risk difference from genotype 0 to 1 is the same as the difference from genotype 1 to 2. If that condition is not a reasonable description of the risks, the fitted slope is still an OLS summary, but it is not a constant per-allele risk difference across genotypes.
Fitting the Model and Interpreting Its Slope
OLS chooses the intercept and slope to minimize the sum of squared residuals, where each residual is the observed 0/1 outcome minus its fitted value. With a single dosage predictor and an intercept, the estimated slope is
The fitted value \(\hat{Y}_i=\hat{\beta}_0+\hat{\beta}_1G_i\) estimates the model’s conditional mean, and hence the model-implied probability of the trait for that genotype. A coefficient of 0.04, for example, means an estimated increase of 0.04 in risk, or 4 percentage points, per additional effect-allele copy. It does not mean a 4% increase in odds.
When there are no other predictors, the fitted line is the best-fitting linear summary of the observed outcome against dosage. If the true risks at dosages 0, 1, and 2 are exactly linear, the slope has the constant risk-difference interpretation. If the risks are not linear, the OLS slope is instead a best linear approximation whose value depends on the genotype distribution in the sample.
Worked Example: A Constant Per-Allele Risk Difference
Hypothetical data. Suppose a population-based sample contains 100 unrelated individuals at each of three genotype dosages. The trait is coded 1 for affected and 0 for unaffected. There are 10 affected individuals at dosage 0, 15 at dosage 1, and 20 at dosage 2. The observed risks are therefore 0.10, 0.15, and 0.20. Assume individuals are sampled independently and these risks adequately follow an additive linear probability model.
Because each dosage group has the same size, \(\bar{G}=(0+1+2)/3=1\) and \(\bar{Y}=(0.10+0.15+0.20)/3=0.15\). The slope can be calculated from the group means, with each group receiving equal weight:
The intercept is \(\hat{\beta}_0=0.15-(0.05)(1)=0.10\). The fitted risks are 0.10, 0.15, and 0.20 for dosages 0, 1, and 2. In this hypothetical population-based setting, the fitted slope corresponds to an estimated increase of 0.05, or 5 percentage points, in trait risk per additional effect-allele copy. The fitted probabilities are within the allowable range, and the observed group risks follow the additive pattern.
Why the Usual OLS Standard Error Needs Attention
A binary outcome does not have constant residual variance across genotype values when its conditional mean changes. If the risk at genotype \(g\) is \(p_g=P(Y=1\mid G=g)\), then \(Y\mid G=g\) has a Bernoulli distribution and
This variance generally changes with \(g\). For example, it is 0.09 when the risk is 0.10 and 0.16 when the risk is 0.20. Consequently, the conventional OLS standard error that assumes constant residual variance is not generally justified for an LPM. A heteroskedasticity-robust standard error estimates uncertainty without requiring equal residual variances. Its usual large-sample justification assumes independent observations and a suitable conditional-mean model; dependence among observations requires an approach that accounts for that dependence.
The robust standard error changes the estimated uncertainty, not the fitted OLS coefficients. In particular, it does not make a poor linear risk pattern correct, make invalid fitted probabilities valid, or remove bias from a misspecified conditional mean.
Worked Example: A Heteroskedasticity-Robust Standard Error
Use the hypothetical data from the previous example: 100 independent individuals at each dosage, with 10, 15, and 20 affected individuals at dosages 0, 1, and 2. The fitted risks equal the observed group proportions, so the residual for an affected individual in a group with risk \(p_g\) is \(1-p_g\), while the residual for an unaffected individual is \(-p_g\).
For the OLS slope in a regression with an intercept and one predictor, the HC0 robust variance estimate for the slope is \(\sum_i(G_i-\bar{G})^2\hat{\varepsilon}_i^2 / [\sum_i(G_i-\bar{G})^2]^2\). Within a genotype group, the sum of squared residuals is \(n_gp_g(1-p_g)\): the affected individuals contribute \(n_gp_g(1-p_g)^2\), and the unaffected individuals contribute \(n_g(1-p_g)p_g^2\); adding these gives \(n_gp_g(1-p_g)\).
At dosage 0, this sum is \(100(0.10)(0.90)=9\); at dosage 1, it is \(100(0.15)(0.85)=12.75\); and at dosage 2, it is \(100(0.20)(0.80)=16\). Since \(\bar{G}=1\), the squared centered genotype values are 1, 0, and 1, respectively. The dosage-1 group therefore contributes zero to the slope’s robust variance numerator. Also, \(\sum_i(G_i-\bar{G})^2=100(1)+100(0)+100(1)=200\). Hence
Using a normal approximation, an approximate 95% confidence interval for the per-copy risk difference is \(0.05\pm1.96(0.025)\), or 0.001 to 0.099. In context, this interval estimates an increase of about 0.1 to 9.9 percentage points in trait risk per additional effect-allele copy under the stated model and sampling assumptions. Its coverage interpretation concerns the procedure over repeated samples; it is not a probability statement that this particular interval contains the fixed parameter.
Limits Compared With Logistic Regression
Logistic regression also models a binary outcome, but it specifies a linear predictor for the log odds rather than the probability. For dosage \(G_i\), the model is \(\operatorname{logit}\{P(Y_i=1\mid G_i)\}=\beta_0+\beta_1G_i\), where \(\operatorname{logit}(p)=\log\{p/(1-p)\}\). Its fitted probabilities stay between 0 and 1. Under this model, \(\exp(\beta_1)\) is the odds ratio for a one-copy increase in dosage. It is not a risk difference, and the risk difference implied by a logistic model can vary with starting risk.
The two models make different assumptions about how genotype relates to risk. The LPM specifies constant risk increments across dosage. Logistic regression specifies constant increments in log odds; the corresponding risk curve is generally nonlinear. Neither model is automatically correct just because it is familiar or convenient. A sensible comparison asks whether the model’s assumed pattern fits the scientific question and the observed data, and whether its effect measure is useful for the intended interpretation.
Worked Example: A Linear Fit Can Miss a Genotype Risk Pattern
Hypothetical data. Suppose 100 independent, population-sampled individuals are observed at each dosage. The affected counts are 5, 10, and 40, giving observed risks 0.05, 0.10, and 0.40. These risks do not increase by the same amount at each dosage: the first increment is 0.05 and the second is 0.30.
The equal group sizes give \(\bar{G}=1\) and \(\bar{Y}=(0.05+0.10+0.40)/3=0.1833\). The OLS slope is
The intercept is approximately \(0.1833-0.175=0.0083\). Thus the fitted LPM risks are approximately 0.0083, 0.1833, and 0.3583. These are not the observed group risks of 0.05, 0.10, and 0.40; the line compromises across the genotype groups. The estimated slope summarizes that compromise, but it does not describe both observed genotype-to-genotype risk increments. A logistic model imposes a different pattern, while a model with separate genotype indicators can estimate the three group risks without an additive trend restriction. Which pattern is appropriate depends on the scientific model and the data, not on the binary outcome alone.
Worked Example: Recognizing an Impossible Fitted Probability
Hypothetical data. Suppose 100 independent population-sampled individuals at each dosage have affected counts 2, 20, and 90. The observed risks are 0.02, 0.20, and 0.90. For equal-sized dosage groups, the OLS slope is half the difference between the risks at dosages 2 and 0:
The fitted risk at dosage 0 is therefore \(-0.0667\), and at dosage 2 it is approximately \(-0.0667+2(0.44)=0.8133\). A negative probability has no literal interpretation. It signals that the straight line is an unsuitable description of risks over the observed genotype range, even though the OLS calculation itself is valid. Logistic fitted probabilities are bounded between 0 and 1, but that mathematical property alone does not establish that the logistic model describes the data well.
Sampling Design Matters for Risk Interpretation
A risk difference requires information about risks in the population or in a sample that represents the population with respect to outcome status. In a case-control study, researchers select individuals based on whether they are cases or controls. The fraction of sampled individuals who are cases is then set partly by the sampling design, rather than reflecting population risk. An LPM fitted to such a sample describes differences in the sampled case fractions across genotype values; it does not, without additional information and methods, estimate the population risk difference per allele.
This distinction is important because risk differences and odds ratios are different effect measures. The earlier material on case-control sampling established why logistic association slopes can preserve odds-ratio information under standard case-control sampling, while population risks generally require information about the sampling fractions or baseline risk. A linear probability slope should not be treated as a population risk difference simply because its coefficient is expressed in probability units.
Common Mistakes and Practical Checks
- Calling the slope a percentage change in odds. An LPM slope is in probability units. Multiply by 100 to express it in percentage points; it is not an odds ratio or a relative percent change.
- Using the conventional OLS standard error without checking its assumptions. Binary outcomes generally have genotype-dependent residual variance. Use a heteroskedasticity-robust standard error when its independent-observation and large-sample conditions are appropriate.
- Interpreting every fitted value as a valid risk. Check whether fitted probabilities lie between 0 and 1 across the genotype values being interpreted. Values outside that range show a limitation of the linear mean model.
- Assuming additivity because dosage is coded 0, 1, and 2. Dosage coding defines the predictor; it does not prove that risk increases by the same amount for each allele copy.
- Calling a case-control sample’s fitted case fraction a population risk. Outcome-based sampling changes the sampled fraction of cases. The LPM coefficient from that sample is not automatically a population risk difference.
Check Your Understanding
Answer each question using the model assumptions and interpretation developed above.
- If an LPM genotype slope is 0.03, what is its interpretation in probability units and in percentage points?
- Why is the conditional variance of a binary outcome generally not constant across genotype dosages?
- What does a fitted probability below zero indicate, and what does it not indicate about the true risk?
- How does the additive risk assumption differ from the linear-log-odds assumption in logistic regression?
- Why does fitting an LPM to a case-control sample not generally give a population risk difference?