Tutorials › Generalized Linear Models › Starting Coefficients for Noncanonical Links

Initialization and Numerical Stability · Tutorial 227 of 981

Starting Coefficients for Noncanonical Links

Construct a finite starting coefficient vector by smoothing plausible means, transforming them through a noncanonical link, and fitting the resulting linear predictors.

Intermediate 12 min read

What You'll Learn

  • Distinguish a noncanonical link from a canonical link
  • Choose finite, admissible target means from response information
  • Convert target means to linear-predictor targets using the link
  • Solve exactly or approximately for coefficients by least squares
  • Check whether fitted predictors give valid starting means
  • Recognize why these coefficients are initial values, not estimates

Why Build Starting Coefficients on the Link Scale?

A GLM solver needs an initial coefficient vector, but coefficients do not have a natural default value that works for every link and design matrix. Setting every coefficient to zero, for example, gives the same initial linear predictor for every observation. The resulting mean may be implausible or poorly matched to the response. For a noncanonical link, a useful alternative is to begin with plausible means, transform them to the linear-predictor scale, and find coefficients that reproduce those transformed values as closely as the design permits.

This construction is a way to provide a finite and interpretable starting point. It does not maximize the likelihood, guarantee convergence, or replace checks for boundary fits. The response-based means are provisional targets, not final fitted means.

Definition: In a GLM, observation \(i\) has mean \(\mu_i\), linear predictor \(\eta_i=x_i^\mathsf{T}\beta\), and link relation \(g(\mu_i)=\eta_i\). The link is canonical when it maps the mean to the natural parameter of the response distribution; otherwise it is noncanonical. To build starting coefficients, choose admissible target means \(m_i\), form \(t_i=g(m_i)\), and solve for \(\beta\) so that \(x_i^\mathsf{T}\beta\) approximates \(t_i\).

Constructing a Link-Scale Target

The target means must be inside the domain of the link and must correspond to valid means for the response distribution. For a Bernoulli model with a probit link, for example, \(m_i\) must lie strictly between 0 and 1: the inverse probit of either endpoint is infinite. With an identity link for Bernoulli data, fitted means must also be probabilities, so predictors that produce values outside \([0,1]\) are invalid.

A simple way to avoid using observed zeros and ones as exact Bernoulli means is to shrink each observed response toward the overall response mean. For binary responses \(y_i\in\{0,1\}\), let \(\bar y=n^{-1}\sum_i y_i\) and choose \(0<\lambda<1\). Define

$$ m_i=(1-\lambda)y_i+\lambda\bar y. $$

If \(0<\bar y<1\), every \(m_i\) is strictly between 0 and 1. This is one possible regularization of the starting targets, not a uniquely correct choice. More elaborate targets can come from grouped summaries, a simple preliminary trend, or other scientifically plausible means.

Result: The shrinkage targets preserve the overall response mean. Indeed,
$$ \frac{1}{n}\sum_{i=1}^n m_i =(1-\lambda)\frac{1}{n}\sum_{i=1}^n y_i+\lambda\bar y =(1-\lambda)\bar y+\lambda\bar y =\bar y. $$

Thus smoothing the individual targets in this way makes them finite on the link scale without changing their average. It does not imply that the eventual fitted GLM will have exactly this average; the design and link determine the fitted means.

Solving for the Coefficients

Stack the row vectors \(x_i^\mathsf{T}\) into the \(n\times p\) design matrix \(X\), and let \(t\) be the vector with entries \(t_i=g(m_i)\). If there are at least as many independent design directions as coefficients and \(X\) has full column rank, the least-squares starting vector is

$$ \hat\beta_{\mathrm{start}}=(X^\mathsf{T}X)^{-1}X^\mathsf{T}t. $$

This is the exact solution when the target vector \(t\) is in the column space of \(X\); otherwise it gives the closest fitted linear predictors in squared Euclidean distance. With chosen positive weights \(w_i\), one can instead minimize \(\sum_i w_i(t_i-x_i^\mathsf{T}\beta)^2\). These weights describe how closely to match the provisional targets; they are not automatically the GLM's likelihood or working weights.

Theorem: Let \(X\) be an \(n\times p\) real matrix with full column rank, let \(t\in\mathbb{R}^n\), and let \(W\) be diagonal with strictly positive entries. The unique minimizer of \(Q(\beta)=(t-X\beta)^\mathsf{T}W(t-X\beta)\) is \(\hat\beta=(X^\mathsf{T}WX)^{-1}X^\mathsf{T}Wt\). Its residual \(r=t-X\hat\beta\) satisfies \(X^\mathsf{T}Wr=0\).

Proof. Since \(X\) has full column rank and \(W\) has positive diagonal entries, for every nonzero \(a\in\mathbb{R}^p\),

$$ a^\mathsf{T}X^\mathsf{T}WXa=(Xa)^\mathsf{T}W(Xa)>0. $$

Here \(Xa\ne 0\) by full column rank, and a positive diagonal \(W\) makes the weighted squared length of any nonzero vector positive. Therefore \(X^\mathsf{T}WX\) is invertible. Differentiating the quadratic objective gives

$$ \nabla_\beta Q(\beta)=-2X^\mathsf{T}W(t-X\beta). $$

Setting this gradient to zero gives the normal equations \(X^\mathsf{T}WX\beta=X^\mathsf{T}Wt\), whose unique solution is the stated \(\hat\beta\). The positive definite quadratic has a unique minimum there. Substituting the solution into the normal equations gives \(X^\mathsf{T}W(t-X\hat\beta)=0\), the weighted residual orthogonality condition. \(\square\)

If \(X\) is rank deficient, the displayed inverse does not exist and the coefficients are not uniquely determined by this least-squares problem. A generalized inverse or a reduced parameterization can produce a solution, but the rank deficiency should be diagnosed rather than hidden. In an intercept-only model, the construction reduces to choosing a single transformed target; initializing intercepts from response margins is the special case where the target mean is the response mean.

Worked Examples

Worked Example: A Probit Starting Vector from Binary Responses

Suppose three binary observations have \(x=(-1,0,1)\) and responses \(y=(0,1,1)\). Use an intercept and slope, the probit link \(g(\mu)=\Phi^{-1}(\mu)\), and shrinkage with \(\lambda=1/2\).

First, \(\bar y=(0+1+1)/3=2/3\). The target means are

$$ m_1=\tfrac12(0)+\tfrac12(\tfrac23)=\tfrac13,\qquad m_2=m_3=\tfrac12(1)+\tfrac12(\tfrac23)=\tfrac56. $$

The probit-scale targets are approximately \(t=(-0.430727,0.967422,0.967422)^\mathsf{T}\). For the design rows \((1,-1),(1,0),(1,1)\), the columns are orthogonal: their cross-product is zero, the intercept column has squared length \(3\), and the \(x\) column has squared length \(2\). Consequently,

$$ \hat\beta_0=\frac{-0.430727+0.967422+0.967422}{3}=0.501372,\qquad \hat\beta_1=\frac{(-1)(-0.430727)+(1)(0.967422)}{2}=0.699075. $$

The starting predictors are approximately \((-0.197703,0.501372,1.200447)\). They are finite, so applying the inverse probit gives valid probabilities. The fitted predictors do not equal all three target values: the two-parameter linear predictor cannot match this particular transformed target vector exactly.

Worked Example: An Identity-Link Starting Vector

Use the same observations \(x=(-1,0,1)\), \(y=(0,1,1)\), and \(\lambda=1/2\), but now use the identity link \(g(\mu)=\mu\) for a Bernoulli GLM. This is a noncanonical link. The target means are again \((1/3,5/6,5/6)\), and because the link is the identity, these are also the least-squares targets on the linear-predictor scale.

The design columns are orthogonal as in the previous calculation. The intercept and slope are therefore

$$ \hat\beta_0=\frac{\tfrac13+\tfrac56+\tfrac56}{3}=\frac23,\qquad \hat\beta_1=\frac{(-1)(\tfrac13)+(1)(\tfrac56)}{2}=\frac14. $$

At \(x=-1,0,1\), the starting predictors, and hence the starting means, are \(5/12,2/3,11/12\). Each lies strictly between 0 and 1, so the starting means are admissible for Bernoulli observations. This check matters for identity links: unlike the probit inverse, the identity inverse does not automatically keep arbitrary predictors in the probability range.

Worked Example: Matching Two Predictors with a Probit Link

Suppose a model includes an intercept and two predictors \(x,z\). Use the four design rows \((1,x,z)\) with \((x,z)=(-1,-1),(-1,1),(1,-1),(1,1)\). Choose plausible target predictors \((-0.9,-0.3,-0.5,0.1)\), corresponding to target means \(\Phi(-0.9),\Phi(-0.3),\Phi(-0.5),\Phi(0.1)\), approximately \(0.1841,0.3821,0.3085,0.5398\). These targets are all valid probabilities.

By definition of the probit link, the transformed target vector is exactly \(t=(-0.9,-0.3,-0.5,0.1)^\mathsf{T}\). The four design columns are mutually orthogonal; each has squared length \(4\). Thus each coefficient is its design-column inner product with \(t\), divided by \(4\):

$$ \hat\beta_0=\frac{-0.9-0.3-0.5+0.1}{4}=-0.4,\qquad \hat\beta_x=\frac{0.9+0.3-0.5+0.1}{4}=0.2,\qquad \hat\beta_z=\frac{0.9-0.3+0.5+0.1}{4}=0.3. $$

These coefficients reproduce every target predictor exactly: \(-0.4+0.2x+0.3z\) gives \(-0.9,-0.3,-0.5,0.1\) in the specified row order. The corresponding means are precisely the four target probabilities. With a less balanced design or more observations than coefficients, the normal-equation solution would generally be an approximation rather than an exact match.

A Practical Construction and Its Limits

A disciplined workflow separates the choice of targets from the coefficient calculation. The calculation is often simple; the substantive judgment is whether the chosen targets are plausible and valid for the response distribution.

1
Choose a finite mean target.
Use response information or a simple preliminary trend, and keep every target inside the link's permitted mean domain. For binary responses, avoid treating observed zeros or ones as exact means under links that map those endpoints to infinite predictors.
2
Transform each target.
Set \(t_i=g(m_i)\). Check that the link is defined there and that the transformed values are finite.
3
Fit the transformed targets.
Solve \(X\hat\beta_{\mathrm{start}}\approx t\), using ordinary or deliberately chosen weighted least squares. Check the rank of \(X\) and the conditioning of the calculation.
4
Check the implied starting means.
Calculate \(\eta_i=x_i^\mathsf{T}\hat\beta_{\mathrm{start}}\) and \(\mu_i=g^{-1}(\eta_i)\). Confirm that these means are valid for the response distribution before passing the vector to the likelihood optimizer.

A common mistake is to transform the raw binary outcomes directly and regress \(g(y_i)\) on the predictors. For a probit link, this attempts to evaluate \(\Phi^{-1}(0)\) and \(\Phi^{-1}(1)\), which are infinite, so it does not produce finite coefficient targets. The correction is to construct interior target means first—for instance, by shrinkage toward the response mean—and only then apply the link.

Another mistake is to interpret the least-squares solution as a GLM estimate. It minimizes discrepancies between chosen transformed targets and linear predictors, not the GLM negative log-likelihood. It is useful because it supplies a reasoned initial vector; the likelihood-based fitting procedure must still determine the final coefficients. Finally, a good starting vector cannot cure separation, rank deficiency, or a likelihood with no finite maximizer. It can help the numerical routine begin in a plausible region, but it is not a substitute for diagnosing the model and the fit.

Check Your Understanding

Answer each question using the distinction between target means, transformed targets, and fitted starting predictors.

  1. Why can directly applying the probit link to a binary response produce an unusable coefficient target?
  2. For the shrinkage rule \(m_i=(1-\lambda)y_i+\lambda\bar y\), explain why the average of the targets equals \(\bar y\).
  3. What does the least-squares starting vector minimize when the transformed targets cannot all be matched exactly?
  4. Why must fitted means from a Bernoulli identity-link starting vector be checked even when all target means are valid?
  5. What does full column rank of \(X\) guarantee in the weighted least-squares construction?
Clinical Biostats