Tutorials › Generalized Linear Models › Working Weights in Quasi-Score Equations

Quasi-Likelihood Theory · Tutorial 679 of 981

Working Weights in Quasi-Score Equations

Learn to distinguish quasi-score residual coefficients from working weights, derive both from the link and variance function, and calculate them in common models.

Advanced 12 min read

What You'll Learn

  • Write a regression quasi-score as a weighted sum of response residuals.
  • Derive the working weight from the link derivative and variance function.
  • Distinguish residual-score coefficients from IRLS working weights.
  • Relate the working response to the quasi-score and a Fisher-scoring update.
  • Calculate weights for Poisson, Bernoulli, and Gaussian models.
  • Identify how a noncanonical link changes the weights.

Why Working Weights Matter

A regression quasi-score combines residuals with information about how the response mean changes with the predictors and how variable the response is at that mean. The resulting observation-specific weights are not arbitrary: they are determined by the link derivative and the specified mean–variance relationship. Understanding that construction clarifies both the score equation and the weighted least-squares calculations used to update regression estimates.

There are two related quantities to keep distinct. The coefficient multiplying an ordinary response residual in the quasi-score is \(D_i/(\phi V(\mu_i))\). The working weight is \(D_i^2/V(\mu_i)\), where \(D_i\) is the derivative of the mean with respect to the linear predictor. The working weight appears when the residual is expressed on the linear-predictor scale, and it determines the local weighted least-squares geometry.

Definition: For independent responses \(Y_1,\ldots,Y_n\), suppose \(E[Y_i]=\mu_i\) and \(\operatorname{Var}(Y_i)=\phi V(\mu_i)\), where \(\phi>0\) is common and \(V(\mu_i)>0\). Let \(g\) be a differentiable link, \(g(\mu_i)=\eta_i=x_i^T\beta\), and suppose the relation can be locally inverted to give \(\mu_i\) as a differentiable function of \(\eta_i\). Define \(D_i=d\mu_i/d\eta_i=1/g'(\mu_i)\). The working weight is \(w_i=D_i^2/V(\mu_i)\).

Here \(x_i\) is a fixed \(p\)-vector of predictors and \(\beta\) is the \(p\)-vector of regression coefficients. We assume the means lie in a region where \(D_i\) is finite and nonzero. The quasi-score for \(\beta\) is

$$ U(\beta)=\sum_{i=1}^n x_i\frac{(Y_i-\mu_i)D_i}{\phi V(\mu_i)}. $$

The formula shows how a response residual \(Y_i-\mu_i\) enters the score. Its coefficient depends on both the sensitivity \(D_i\) of the mean to the linear predictor and the variance \(V(\mu_i)\). To see the working weight, put the residual on the scale of the linear predictor: locally, a mean change \(Y_i-\mu_i\) corresponds to a predictor-scale change \((Y_i-\mu_i)/D_i\). Multiplying that change by \(w_i/\phi\) recovers the original score contribution.

Key identity: Define the working response \(z_i=\eta_i+(Y_i-\mu_i)/D_i\). Then \(w_i(z_i-\eta_i)=D_i(Y_i-\mu_i)/V(\mu_i)\), and consequently \(U(\beta)=\phi^{-1}\sum_i x_iw_i(z_i-\eta_i)\).

Deriving the Weighted-Residual Form

The identity follows directly from the definitions, but it is useful to track each factor: one factor of \(D_i\) converts the response residual to the linear-predictor scale, and the other enters the working weight.

1
Move the residual to predictor scale.
Set \(z_i-\eta_i=(Y_i-\mu_i)/D_i\). This is a local, observation-specific adjustment, evaluated at the current fitted mean.
2
Multiply by the working weight.
Using \(w_i=D_i^2/V(\mu_i)\), obtain \(w_i(z_i-\eta_i)=\{D_i^2/V(\mu_i)\}\{(Y_i-\mu_i)/D_i\}=D_i(Y_i-\mu_i)/V(\mu_i)\).
3
Recover the quasi-score.
Multiply by \(x_i/\phi\) and sum over observations. The result is exactly \(U(\beta)=\phi^{-1}\sum_i x_iw_i(z_i-\eta_i)\).

In matrix notation, let \(X\) have rows \(x_i^T\), let \(W\) be diagonal with entries \(w_i\), and let \(z\) and \(\eta\) be the vectors of working responses and linear predictors. Then

$$ U(\beta)=\frac{1}{\phi}X^TW(z-\eta). $$

This is a weighted residual sum on the working-response scale: the residual is \(z_i-\eta_i\), not \(Y_i-\mu_i\). In contrast, writing the score directly in terms of response residuals gives coefficient \(D_i/\{\phi V(\mu_i)\}\). Calling that coefficient the working weight would lose a factor of \(D_i\) and confuse two different residual scales.

Why These Weights Govern a Scoring Update

The same weights arise from the expected sensitivity of the quasi-score to changes in \(\beta\). The result below requires differentiability of \(V\) and \(D_i\) as functions of \(\eta_i\) in the region considered, along with finite means so that \(E[Y_i-\mu_i]=0\). It identifies the Fisher-scoring information matrix; it does not say that the observed derivative of the score equals this matrix.

Result: Under the conditions above, the negative expected derivative of the quasi-score is \(A(\beta)=\phi^{-1}\sum_i x_i x_i^T w_i=\phi^{-1}X^TWX\). If \(X^TWX\) is nonsingular, the Fisher-scoring increment \(\delta\), defined by \(A(\beta)\delta=U(\beta)\), satisfies \(X^TWX\delta=X^TW(z-\eta)\).

Proof. Write \(r_i=Y_i-\mu_i\) and \(a_i=D_i/\{\phi V(\mu_i)\}\), so the \(i\)th score contribution is \(x_i a_i r_i\). Since \(\eta_i=x_i^T\beta\), differentiation with respect to \(\beta\) gives

$$ \frac{\partial (x_i a_i r_i)}{\partial\beta^T} =x_i\left(\frac{da_i}{d\eta_i}r_i-a_iD_i\right)x_i^T. $$

In this derivative, \(dr_i/d\eta_i=-d\mu_i/d\eta_i=-D_i\); the term involving \(da_i/d\eta_i\) remains multiplied by the residual. Taking expectations at the specified mean model makes that term zero because \(E[r_i]=0\). Therefore

$$ -E\left[\frac{\partial U(\beta)}{\partial\beta^T}\right] =\sum_i x_i x_i^T a_iD_i =\frac{1}{\phi}\sum_i x_i x_i^T\frac{D_i^2}{V(\mu_i)} =\frac{1}{\phi}X^TWX. $$

By definition, the Fisher-scoring increment solves \(A(\beta)\delta=U(\beta)\). Substituting this expression for \(A(\beta)\), and the working-response identity for \(U(\beta)\), gives \((X^TWX/\phi)\delta=X^TW(z-\eta)/\phi\). Since \(\phi>0\), multiplying by \(\phi\) yields the stated weighted least-squares equation. If \(X^TWX\) is nonsingular, this equation has a unique solution for \(\delta\). \(\square\)

For the matrix to be positive definite, a sufficient condition is that \(X\) has full column rank and every \(w_i>0\). In fact, for any nonzero vector \(b\), \(b^TX^TWXb=\sum_i w_i(x_i^Tb)^2>0\) under those conditions. If the design is rank deficient, the update may not be unique, even though the score identity still holds.

Worked Models

The examples below calculate both the response-residual score contribution and its working-response representation. They use \(\phi\) explicitly: when it is common across observations, it scales the full score and scoring information but is not part of the definition of \(w_i\).

Worked Example: Poisson Regression With a Log Link

Let \(Y_i\) have mean \(\mu_i>0\), variance \(\phi\mu_i\), and log link \(\eta_i=\log(\mu_i)\). Thus \(V(\mu_i)=\mu_i\), and \(D_i=d\mu_i/d\eta_i=\mu_i\). The working weight is \(w_i=D_i^2/V(\mu_i)=\mu_i^2/\mu_i=\mu_i\).

For one observation, take \(x_i=1\), current fitted mean \(\mu_i=2\), and observed count \(Y_i=3\). The quasi-score contribution is \(x_i(Y_i-\mu_i)D_i/\{\phi V(\mu_i)\}=1(3-2)2/(2\phi)=1/\phi\). The working response is \(z_i=\log(2)+(3-2)/2=\log(2)+1/2\), so \(z_i-\eta_i=1/2\). Its weighted form gives \(x_iw_i(z_i-\eta_i)/\phi=1(2)(1/2)/\phi=1/\phi\), as required.

Worked Example: Bernoulli Regression With a Logit Link

For a Bernoulli response, let \(\mu_i=p_i\), \(V(\mu_i)=\mu_i(1-\mu_i)\), and \(\eta_i=\log\{\mu_i/(1-\mu_i)\}\). Differentiation gives \(D_i=d\mu_i/d\eta_i=\mu_i(1-\mu_i)\), so \(w_i=D_i^2/V(\mu_i)=\mu_i(1-\mu_i)\).

At \(\mu_i=0.6\), the logit is \(\eta_i=\log(0.6/0.4)=\log(1.5)\), \(D_i=0.6(0.4)=0.24\), and \(w_i=0.24\). Let \(Y_i=1\) and \(x_i=2\). The score contribution is \(2(1-0.6)(0.24)/\{\phi(0.24)\}=0.8/\phi\). The working-response residual is \((Y_i-\mu_i)/D_i=0.4/0.24=5/3\). Thus the weighted form is \(2(0.24)(5/3)/\phi=0.8/\phi\). Both expressions agree.

Worked Example: Gaussian Regression With an Identity Link

Suppose \(\mu_i=\eta_i\), \(D_i=1\), and \(V(\mu_i)=1\), so that \(\operatorname{Var}(Y_i)=\phi\). Then \(w_i=1\) for every observation, and \(z_i=\eta_i+(Y_i-\mu_i)=Y_i\).

Take two observations with predictor vectors \(x_1^T=(1,0)\) and \(x_2^T=(1,1)\), current predictors \(\eta_1=1,\eta_2=3\), and observations \(Y_1=2,Y_2=4\). The response residuals are both 1. The quasi-score is \(U(\beta)=\{(1,0)^T+(1,1)^T\}/\phi=(2,1)^T/\phi\). Because \(z_i-\eta_i=1\) and both working weights equal 1, the weighted form is also \(X^TW(z-\eta)/\phi=\{(1,0)^T+(1,1)^T\}/\phi=(2,1)^T/\phi\). Here the working response is the observed response itself.

Worked Example: Poisson Regression With an Identity Link

A different link changes the weights even when the variance function is unchanged. For a Poisson mean with identity link, \(\eta_i=\mu_i\), so \(D_i=1\) and \(V(\mu_i)=\mu_i\). On the admissible region \(\mu_i>0\), the working weight is \(w_i=1/\mu_i\), rather than \(\mu_i\) as with a log link.

At \(\mu_i=4\), let \(Y_i=6\) and \(x_i=1\). The score contribution is \(1(6-4)/\{\phi(4)\}=0.5/\phi\). The working response is \(z_i=4+(6-4)=6\), so \(z_i-\eta_i=2\). The weighted representation gives \(1(1/4)(2)/\phi=0.5/\phi\). This identity-link calculation is local to means in the positive region; a regression fit must respect the requirement that its Poisson means be positive.

Interpreting and Checking the Weights

A working weight is large when a change in the linear predictor produces a substantial change in the mean relative to the response variance. Its numerator \(D_i^2\) measures mean sensitivity on the predictor scale, while its denominator \(V(\mu_i)\) accounts for the mean-dependent variance. Thus neither the link nor the variance function alone determines the weight: both matter.

The common dispersion \(\phi\) is deliberately outside \(w_i\) here. Including it in each weight as \(D_i^2/\{\phi V(\mu_i)\}\) is an alternative convention, but then the score and information formulas must be written consistently. In the convention used here, the factor \(1/\phi\) multiplies the full score and information matrix, and cancels from the Fisher-scoring increment.

  • Do not confuse scales. The score coefficient for \(Y_i-\mu_i\) is \(D_i/\{\phi V(\mu_i)\}\); the working weight for \(z_i-\eta_i\) is \(D_i^2/V(\mu_i)\).
  • Do not treat weights as fixed across iterations. In general, \(\mu_i\), \(D_i\), and therefore \(w_i\) change when the fitted coefficients change.
  • Do not claim an exact Newton step. The weighted least-squares equation derived here uses the negative expected score derivative. The observed score derivative can contain additional residual-dependent terms.
Key takeaway: Given \(\operatorname{Var}(Y_i)=\phi V(\mu_i)\) and \(\eta_i=g(\mu_i)\), compute \(D_i=d\mu_i/d\eta_i\), then \(w_i=D_i^2/V(\mu_i)\). With \(z_i=\eta_i+(Y_i-\mu_i)/D_i\), the quasi-score is \(X^TW(z-\eta)/\phi\).

Check Your Understanding

For each question, keep the response-residual scale separate from the working-response scale.

  1. For a model with \(D_i=3\) and \(V(\mu_i)=9\), calculate \(w_i\). If \(Y_i-\mu_i=2\), calculate \(z_i-\eta_i\).
  2. Explain why a common dispersion factor \(\phi\) is outside the working weight under the convention used here.
  3. For a Poisson mean with identity link, derive \(D_i\) and \(w_i\) as functions of \(\mu_i\), and state the restriction on the mean.
  4. Under what conditions is \(X^TWX\) positive definite? Why does that matter for a scoring increment?
  5. Why is the Fisher-scoring weighted least-squares equation not generally the exact Newton equation?
Clinical Biostats