Why Estimate Variant Weights Jointly?
A polygenic score is a weighted sum of genotype values. Its predictive performance depends not only on which variants are included, but also on how their weights are estimated. With individual-level data, joint regression estimates each variant’s weight while accounting for the other variants in the model. This matters when genotypes are correlated through linkage disequilibrium (LD): a variant’s marginal association can partly reflect the effects of correlated variants.
The lasso and elastic net are penalized regression methods for estimating these joint weights. Both shrink fitted effects; the lasso can set some weights exactly to zero, while the elastic net combines that selection pressure with a penalty that also shrinks weights toward one another when predictors are correlated. The resulting coefficients are useful as score weights, but they are predictive estimates, not proof that a selected variant has a causal effect.
Penalized Regression for Joint Weights
Suppose \(y_i\) is a quantitative phenotype for individual \(i\), and \(x_{ij}\) is that individual’s genotype at variant \(j\), coded for a consistently chosen effect allele. For a simple presentation, take \(y_i\) to be centered and each genotype column to be centered and scaled so that \(\sum_{i=1}^n x_{ij}^2/n=1\). The coefficients \(b_j\) are then effects per one standard deviation of the coded genotype. An intercept or other prespecified covariates can be included without penalizing their coefficients; the examples below use centered data with no additional covariates.
For a candidate vector of weights \(b=(b_1,\ldots,b_p)\), the fitted value is \(\hat y_i=\sum_{j=1}^p x_{ij}b_j\). A polygenic score for a new individual, using the same genotype coding and scaling, is the corresponding weighted sum \(S_i=\sum_{j=1}^p x_{ij}b_j\). If the phenotype was centered but not standardized, the weights and score are in the phenotype’s units.
The squared-error term measures lack of fit, and the penalty discourages large weights. Increasing \(\lambda\) gives the penalty greater influence relative to fit. The mixing parameter determines how that penalty is divided: \(\rho\) controls the absolute-value, or \(L_1\), part, and \(1-\rho\) controls the squared, or \(L_2\), part. The \(L_1\) term creates a corner at zero, which allows a fitted coefficient to be exactly zero. The \(L_2\) term is smooth and shrinks coefficients, but by itself does not generally set them exactly to zero.
Soft Thresholding: A Short Derivation
The roles of \(\lambda\) and \(\rho\) can be seen most clearly when the standardized genotype columns are mutually orthogonal: \(\sum_i x_{ij}x_{ik}/n=0\) for \(j\ne k\). Define \(z_j=\sum_i x_{ij}y_i/n\), the unpenalized regression coefficient for variant \(j\) under this orthogonality condition. Ignoring terms that do not depend on \(b_j\), the objective for that coefficient is
If \(b_j>0\), differentiating gives \(b_j-z_j+\lambda\rho+\lambda(1-\rho)b_j=0\). If \(b_j<0\), the derivative of \(|b_j|\) is \(-1\), giving \(b_j-z_j-\lambda\rho+\lambda(1-\rho)b_j=0\). At zero, the absolute-value term has subgradient ranging from \(-1\) to \(1\); zero minimizes the objective whenever \(|z_j|\leq\lambda\rho\). Combining these cases gives the solution below, where \(S(a,t)=\mathrm{sign}(a)\max(|a|-t,0)\) is the soft-thresholding function.
Thus the \(L_1\) component sets a threshold, while the \(L_2\) component adds a further denominator that shrinks any surviving coefficient. In particular, for lasso the solution is \(S(z_j,\lambda)\); for ridge it is \(z_j/(1+\lambda)\). With correlated columns, the coefficients are not separable in this way: the fitted weights depend jointly on the correlations among variants.
Worked Example: Lasso Thresholding and a Score
Suppose four hypothetical standardized genotype columns are orthogonal, and their unpenalized coefficients are \(z=(0.42,\,0.18,\,-0.31,\,0.07)\) outcome units per genotype standard deviation. Use a lasso penalty with \(\lambda=0.20\), so \(\rho=1\). Find the fitted weights and the score for an individual with standardized genotypes \((1,0,-1,2)\).
For lasso, \(\hat b_j=S(z_j,0.20)\). Applying the threshold separately gives
The second and fourth coefficients are zero because their unpenalized magnitudes do not exceed \(0.20\). The individual’s score is
The score is \(0.33\) outcome units relative to the centered reference under this fitted model. It is a model-based prediction component, not a statement that changing this individual’s genotype would cause the phenotype to change by that amount.
How the Mixing Parameter Changes the Weights
A lasso fit can be sparse because its \(L_1\) threshold can eliminate coefficients. An elastic-net fit retains this threshold, but also shrinks surviving coefficients through the \(L_2\) term. For a fixed \(\lambda\), reducing \(\rho\) lowers the threshold \(\lambda\rho\) while increasing the additional shrinkage in the denominator. Consequently, changing \(\rho\) does not simply make every weight larger or smaller: it changes both the chance of exact zeros and the amount of shrinkage for nonzero weights.
Worked Example: Elastic-Net Weights for Orthogonal Variants
Use the same hypothetical orthogonal data, \(z=(0.42,\,0.18,\,-0.31,\,0.07)\), but set \(\lambda=0.10\) and \(\rho=0.50\). The threshold is \(\lambda\rho=0.05\), and the denominator is \(1+\lambda(1-\rho)=1.05\). Therefore,
All four coefficients remain nonzero because each \(|z_j|\) exceeds \(0.05\). Each is nevertheless shrunk: for example, the first weight is \(0.3524\), smaller in magnitude than its unpenalized value \(0.42\). In this example, the smaller \(L_1\) threshold than in the preceding lasso example permits more coefficients to remain nonzero; the \(L_2\) part continues to shrink them. A different \(\lambda\) or \(\rho\) could yield a different balance.
Correlated Variants and Joint Weight Estimates
With LD, predictors are correlated, so the coefficient for one variant depends on which other variants are in the model and on their relationships with it. The lasso may choose one variant from a group of highly correlated variants, or may assign different weights to several of them. If small changes in the data or sample alter which correlated variant is selected, the selected variant’s identity and coefficient can be unstable even when the group’s combined predictive contribution changes little. An elastic-net penalty’s \(L_2\) component can reduce this instability by discouraging extreme weights, but it does not make correlated variants statistically independent or identify a causal variant.
Worked Example: Two Correlated Variants
Consider two hypothetical standardized genotype columns with correlation \(0.90\). Suppose their unpenalized joint least-squares coefficient vector is \(z=(0.50,\,0.48)\). The genotype cross-product matrix divided by \(n\) is
First consider lasso with \(\lambda=0.20\). If both fitted coefficients are positive, the lasso stationarity equations are \(G\hat b=z-(0.20,0.20)\), or
Solving gives \(\hat b_1=(0.30-0.90(0.28))/(1-0.90^2)=0.2526\) and \(\hat b_2=(0.28-0.90(0.30))/(1-0.90^2)=0.05263\). Both are positive, so the assumed signs satisfy the stationarity equations. These are joint weights: neither is obtained by thresholding its marginal association in isolation.
Now use elastic net with the same \(\lambda=0.20\) and \(\rho=0.50\). Under the same positive-sign solution, the \(L_1\) subtraction is \(0.10\) per coefficient and the \(L_2\) term adds \(0.10\) to each diagonal entry. Thus,
Both weights are positive and satisfy the assumed signs. The two fitted vectors differ because the objectives differ, not because either variant’s genotype changed. In a real analysis, the weights are conditional on the included variants, their coding and scaling, and the fitting sample.
Fitting Choices and Interpretation
The penalty strength \(\lambda\) and mixing parameter \(\rho\) have distinct roles, so they should not be conflated. At \(\lambda=0\), neither penalty contributes and the estimate is ordinary least squares when that estimate is defined. At larger \(\lambda\), the penalty has more influence and weights are more strongly constrained. At \(\rho=1\), the penalty is entirely \(L_1\); at \(\rho=0\), it is entirely \(L_2\). Intermediate values combine the two. The numerical size of \(\lambda\) is meaningful only relative to the objective’s scaling, including the \(1/(2n)\) loss factor and the scaling of genotypes and phenotype.
After fitting, the joint coefficients can be used as weights in a polygenic score, provided that genotype coding, allele orientation, and scaling at scoring time match those used in fitting. A coefficient is the fitted change in the model’s predicted phenotype for a one-unit increase in that variant’s coded, scaled genotype, holding the other included genotypes fixed. Because LD can make such conditional effects difficult to distinguish, individual weights should not automatically be interpreted as stable biological effects.
The methods also rely on choices that should be made explicit. Genotype columns need compatible scaling because the penalty acts on coefficient magnitudes; otherwise, differences in scale affect how strongly variants are penalized. Alleles must be harmonized so that a weight’s sign corresponds to the intended allele. The squared-error objective described here targets a quantitative phenotype; other outcome types require a suitable loss function, and the same displayed solution need not apply. Finally, tuning choices and reported predictive performance require careful validation; fitting the penalized objective alone does not establish how well a score predicts in new individuals.
Check Your Understanding
Use the definitions and examples above to check your understanding.
- In the stated objective, what happens to the penalty when \(\rho=1\), and what role does \(\lambda\) play?
- For orthogonal standardized predictors with \(z_j=0.12\), \(\lambda=0.10\), and \(\rho=1\), calculate the lasso coefficient.
- For \(\lambda=0.20\) and \(\rho=0.50\), find the \(L_1\) threshold and the denominator in the orthogonal elastic-net formula.
- Why can a lasso model assign a zero weight to one of two highly correlated variants without showing that its biological effect is zero?
- What genotype-coding and scaling conditions should be consistent between weight fitting and score calculation?