Tutorials › Generalized Linear Models › Deriving the Quasi-Score

Quasi-Likelihood Theory · Tutorial 676 of 981

Deriving the Quasi-Score

Learn how a prescribed variance function determines the scalar quasi-score and how differentiating through a regression mean model produces a parameter score.

Advanced 12 min read

What You'll Learn

  • State conditions under which the scalar quasi-score has a differentiable quasi-likelihood primitive
  • Derive the quasi-score from a specified mean–variance relationship
  • Work out scalar quasi-scores for Poisson and grouped binomial responses
  • Apply the chain rule through a link function and regression predictor
  • Identify common errors involving regularity and missing chain-rule factors

From a Mean–Variance Specification to a Score

In a likelihood model, differentiating the log-likelihood with respect to a mean parameter produces a score. Quasi-likelihood starts from a different piece of information: a prescribed relationship between the mean and variance of the response. That relationship determines a natural score-like function without requiring a complete probability distribution. To use ordinary differentiation and then apply the chain rule, however, we must ensure that this prescribed function really is the derivative of a quasi-likelihood contribution.

Suppose a response \(Y\) has mean \(\mu\) in an open interval \(I\), and its variance is specified as \(\operatorname{Var}(Y)=\phi V(\mu)\), where \(\phi>0\) is a dispersion factor and \(V\) is the variance function. The scalar quasi-score is proportional to the residual \(y-\mu\), with its size adjusted by the prescribed variance. The exact factor of \(\phi\) matters for the score itself, even though a common positive factor does not change the roots of an estimating equation.

Definition: Let \(I\) be an open interval, let \(\phi>0\), and suppose \(V:I\to(0,\infty)\) is continuous. For an observed response value \(y\), the scalar quasi-score for the mean is $$ U_\mu(y;\mu)=\frac{y-\mu}{\phi V(\mu)},\qquad \mu\in I. $$ A quasi-likelihood contribution \(Q(y;\mu)\) is a differentiable function of \(\mu\) whose derivative is this quasi-score.

Continuity and positivity of \(V\) are useful conditions with distinct roles. Positivity makes the denominator nonzero. Continuity ensures that the prescribed score is continuous in \(\mu\), so it has a differentiable primitive on the interval. The following result makes that connection precise.

Result: Under the conditions in the definition, fix any \(\mu_0\in I\) and define $$ Q(y;\mu)=\int_{\mu_0}^{\mu}\frac{y-t}{\phi V(t)}\,dt. $$ Then \(Q(y;\mu)\) is differentiable in \(\mu\), and \(\partial Q(y;\mu)/\partial\mu=U_\mu(y;\mu)\).

Proof. For fixed \(y\), the integrand \(h(t)=(y-t)/\{\phi V(t)\}\) is continuous on \(I\): its numerator is continuous, and its denominator is continuous and strictly positive. For each \(\mu\in I\), the segment between \(\mu_0\) and \(\mu\) lies in \(I\), so the integral is well-defined. The fundamental theorem of calculus for a continuous integrand gives $$ \frac{\partial Q(y;\mu)}{\partial\mu}=h(\mu)=\frac{y-\mu}{\phi V(\mu)}. $$ Thus the prescribed scalar function is the derivative of the displayed quasi-likelihood contribution. \(\square\)

The choice of \(\mu_0\) only fixes an additive constant: changing the lower limit changes \(Q\) by a term that does not depend on \(\mu\). It therefore leaves the scalar quasi-score unchanged. The regularity condition is not merely cosmetic. Positivity alone does not guarantee that a function prescribed as a derivative can be integrated to a differentiable function; derivatives have the Darboux property, whereas a discontinuous prescribed function can fail that property.

Worked Scalar Derivations

Worked Example: Poisson Mean

Let \(Y\sim\operatorname{Poisson}(\mu)\), so \(E[Y]=\mu\) and \(\operatorname{Var}(Y)=\mu\). Here \(I=(0,\infty)\), \(\phi=1\), and \(V(\mu)=\mu\), which is continuous and positive on \(I\). For an observed count \(y=4\), the scalar quasi-score is $$ U_\mu(4;\mu)=\frac{4-\mu}{\mu}=\frac{4}{\mu}-1. $$

To exhibit a primitive, use \(\mu_0=1\): $$ Q(4;\mu)=\int_1^\mu\left(\frac{4}{t}-1\right)dt =4\log\mu-(\mu-1). $$ Differentiating verifies the result: $$ \frac{\partial Q(4;\mu)}{\partial\mu}=\frac{4}{\mu}-1. $$ At \(\mu=2\), the score is \(4/2-1=1\). This agrees with the defining expression \((4-2)/2=1\).

Worked Example: Grouped Binomial Mean

Suppose \(Y\sim\operatorname{Binomial}(5,p)\), and write its mean as \(\mu=5p\). Then \(0<\mu<5\), and $$ \operatorname{Var}(Y)=5p(1-p)=\mu\left(1-\frac{\mu}{5}\right). $$ Thus \(\phi=1\) and \(V(\mu)=\mu(1-\mu/5)\), a continuous positive function on \(I=(0,5)\). If \(y=3\), the score is $$ U_\mu(3;\mu)=\frac{3-\mu}{\mu(1-\mu/5)} =\frac{5(3-\mu)}{\mu(5-\mu)}. $$

For the primitive, decompose the last fraction: $$ \frac{5(3-\mu)}{\mu(5-\mu)} =\frac{3}{\mu}-\frac{2}{5-\mu}. $$ Integrating gives a quasi-likelihood contribution, up to an additive constant, $$ Q(3;\mu)=3\log\mu+2\log(5-\mu). $$ Indeed, its derivative is \(3/\mu-2/(5-\mu)\), the required score. At \(\mu=2\), the score is $$ \frac{3-2}{2(1-2/5)}=\frac{1}{6/5}=\frac{5}{6}. $$ The decomposed expression gives \(3/2-2/3=5/6\), as a check.

Applying the Chain Rule to a Regression Mean

Now suppose observations \(y_1,\ldots,y_n\) have fitted means \(\mu_i\) determined by regression parameters \(\beta\). Let \(x_i\) be a fixed predictor vector, let \(\eta_i=x_i^{\mathsf T}\beta\), and let \(g\) be a link function satisfying \(g(\mu_i)=\eta_i\). Assume \(g\) is continuously differentiable on \(I\), with \(g'(\mu)\ne 0\) there, so its inverse is differentiable on the relevant predictor range. Also assume each \(\mu_i\) is in \(I\), and use the same \(\phi\) and continuous positive \(V\) for all observations.

The sum \(Q(\beta)=\sum_{i=1}^n Q(y_i;\mu_i(\beta))\) is a differentiable objective. For a component \(\beta_j\), the chain rule first differentiates each contribution with respect to its own mean, then differentiates that mean with respect to \(\beta_j\). Since \(\mu_i=g^{-1}(\eta_i)\), $$ \frac{\partial\mu_i}{\partial\beta_j} =\frac{d\mu_i}{d\eta_i}\frac{\partial\eta_i}{\partial\beta_j} =\frac{1}{g'(\mu_i)}x_{ij}. $$ The resulting gradient is the regression quasi-score.

Result: Under the stated conditions, the gradient of the summed quasi-likelihood contribution is $$ \nabla_\beta Q(\beta) =\sum_{i=1}^n \frac{y_i-\mu_i}{\phi V(\mu_i)} \frac{d\mu_i}{d\eta_i}x_i =\sum_{i=1}^n \frac{y_i-\mu_i}{\phi V(\mu_i)g'(\mu_i)}x_i. $$ Here \(x_i\) is a column vector, so the result is a column vector with one component per regression parameter.

Proof. The scalar result establishes that each \(Q(y_i;\mu_i)\) is differentiable in \(\mu_i\), and the link assumptions establish that \(\mu_i\) is differentiable in \(\beta\). For each \(j\), the ordinary chain rule and \(\partial\eta_i/\partial\beta_j=x_{ij}\) give $$ \frac{\partial Q(\beta)}{\partial\beta_j} =\sum_{i=1}^n \frac{\partial Q(y_i;\mu_i)}{\partial\mu_i} \frac{\partial\mu_i}{\partial\eta_i} \frac{\partial\eta_i}{\partial\beta_j} =\sum_{i=1}^n \frac{y_i-\mu_i}{\phi V(\mu_i)} \frac{x_{ij}}{g'(\mu_i)}. $$ Collecting these components for \(j=1,\ldots,p\) gives the stated vector formula. \(\square\)

Worked Example: Poisson Regression With a Log Link

Let \(Y_1,Y_2\) be independent Poisson observations with means \(\mu_i=\exp(\beta_0+\beta_1x_i)\). Take \(x_1=0\), \(x_2=1\), \(y_1=2\), and \(y_2=1\). The Poisson variance function is \(V(\mu)=\mu\), with \(\phi=1\), and the log link is \(g(\mu)=\log\mu\), so \(g'(\mu)=1/\mu\).

Evaluate the score at \(\beta_0=\log 2\) and \(\beta_1=0\). Both fitted means are $$ \mu_1=\exp(\log 2)=2,\qquad \mu_2=\exp(\log 2+0)=2. $$ For a Poisson log link, the factor from the chain rule simplifies to $$ \frac{1}{V(\mu_i)g'(\mu_i)} =\frac{1}{\mu_i(1/\mu_i)}=1. $$ Therefore the \(i\)th contribution to the vector score is \((y_i-\mu_i)x_i\), with \(x_i=(1,x_i)^{\mathsf T}\). The first contribution is \((2-2)(1,0)^{\mathsf T}=(0,0)^{\mathsf T}\); the second is \((1-2)(1,1)^{\mathsf T}=(-1,-1)^{\mathsf T}\). Hence $$ \nabla_\beta Q(\beta)= \begin{pmatrix}-1\\-1\end{pmatrix}. $$ The intercept component sums both residuals, \(0+(-1)=-1\). The slope component weights each residual by its predictor, \(0\cdot0+(-1)\cdot1=-1\). This calculation shows why the predictor vector must remain in the chain-rule expression.

Interpreting the Formula and Avoiding Pitfalls

The regression expression is obtained by differentiating through two layers: the quasi-likelihood contribution depends on the mean, and the mean depends on the linear predictor and parameters. The factor \((y_i-\mu_i)/\{\phi V(\mu_i)\}\) comes from the scalar mean–variance specification. The factor \(d\mu_i/d\eta_i\) comes from the link, while \(x_i\) comes from differentiating the linear predictor. None of these factors is optional in a general link model.

For a common, fixed \(\phi>0\), multiplying the entire score by \(\phi\) does not alter the parameter values that solve the score equation, because it multiplies every component by the same nonzero constant. It does alter the numerical score and should not be silently dropped when stating the derivative. If dispersion varies across observations, it cannot in general be removed as one common factor.

  • Omitting the link derivative. Writing only a sum of residuals divided by the variance function treats differentiation with respect to the mean as though it were differentiation with respect to a regression parameter. The correction is to multiply by \(d\mu_i/d\eta_i\) and by \(x_i\).
  • Using a variance function without checking regularity. Positivity ensures a nonzero denominator, but it does not by itself ensure the prescribed function is a derivative. Assuming \(V\) is continuous and positive on the mean interval supplies a simple sufficient condition for the primitive used here.
  • Confusing a score with a probability model. A mean and variance specification defines the quasi-score used in this derivation; it does not, by itself, specify a full distribution for the response.

This derivation identifies the estimating function and its dependence on the mean model. By itself, it does not establish sampling properties such as unbiasedness or consistency; those require additional arguments and assumptions. Its immediate practical value is to make explicit how the variance specification and link jointly determine the direction and scale of the regression score.

Check Your Understanding

Use the definitions and chain-rule derivation above to answer these questions.

  1. For which regularity assumptions on \(V\) does the stated integral provide a differentiable quasi-likelihood contribution?
  2. If \(V(\mu)=1\) and \(\phi=4\), what is the scalar quasi-score for an observed value \(y\)?
  3. For a log link, what is \(d\mu_i/d\eta_i\), and how does it combine with a Poisson variance function \(V(\mu_i)=\mu_i\)?
  4. In the regression score, what role does the predictor vector \(x_i\) play?
  5. Why is it not enough to assume that \(V\) is positive when claiming the prescribed scalar score is the derivative of a quasi-likelihood?
Clinical Biostats