Tutorials › Generalized Linear Models › Deriving the Quasi-Score Equations

Quasi-Binomial and Quasi-Poisson · Tutorial 699 of 981

Deriving the Quasi-Score Equations

Learn how to derive each observation’s quasi-score contribution and assemble the regression-coefficient estimating equations.

Intermediate 10 min read

What You'll Learn

  • State the assumptions needed to form a regression-coefficient quasi-score.
  • Derive the quasi-score by differentiating a quasi-likelihood with respect to the coefficients.
  • Identify how the link derivative and variance function determine each observation’s contribution.
  • Calculate quasi-score contributions for a nonlinear variance function, grouped binomial data, and count data with exposure.
  • Distinguish a quasi-score estimating function from an ordinary likelihood score.

From a Mean and Variance to an Estimating Equation

A quasi-GLM specifies how the response mean depends on predictors and how its variance depends on its mean. Those two pieces are enough to construct an estimating equation for the regression coefficients; a full probability distribution is not required. The key calculation is the chain rule: a residual is scaled by its variance, then multiplied by the rate at which the mean changes with the linear predictor.

Suppose \(Y_1,\ldots,Y_n\) are independent responses, with fixed predictor vectors \(\mathbf{x}_i\in\mathbb{R}^p\). Write the linear predictor as \(\eta_i=\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta}\), and let the link satisfy \(g(\mu_i)=\eta_i\), where \(\mu_i=E[Y_i]\). Assume the variance function is specified by \(\operatorname{Var}(Y_i)=\phi V(\mu_i)\), with common dispersion parameter \(\phi>0\).

Definition: The regression-coefficient quasi-score for this model is the vector-valued estimating function $$ \mathbf{U}(\boldsymbol{\beta})=\sum_{i=1}^n \frac{Y_i-\mu_i}{\phi V(\mu_i)} \frac{d\mu_i}{d\eta_i}\mathbf{x}_i, \qquad \mu_i=g^{-1}(\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta}). $$ A quasi-score estimate solves \(\mathbf{U}(\boldsymbol{\beta})=\mathbf{0}\). This is an estimating equation; without a specified likelihood, it need not be a likelihood score.

For this expression, take the mean values to lie in an open interval on which \(V\) is positive and continuous, and assume the link is differentiable with nonzero derivative there. Assume also that the inverse link is differentiable at the fitted linear predictors. These conditions make \(d\mu_i/d\eta_i\) well defined and allow the differentiation below. The mean and variance assumptions must hold at the parameter value under consideration. Independence is a usual working assumption for the model; the algebra for the summed estimating function itself follows observation by observation.

Derivation by the Chain Rule

The quasi-likelihood for one observation is defined through its derivative with respect to the mean. For fixed observed value \(y_i\), a convenient scaled version is

$$ Q_i(\mu_i;y_i)=\int_{\mu_0}^{\mu_i} \frac{y_i-t}{\phi V(t)}\,dt, $$

where \(\mu_0\) is any fixed reference point in the allowed mean interval. The integral is defined whenever its integrand is continuous along the interval between \(\mu_0\) and \(\mu_i\). Its derivative is \((y_i-\mu_i)/\{\phi V(\mu_i)\}\), by the fundamental theorem of calculus. The reference point changes the value of \(Q_i\) by a constant independent of the regression coefficients, so it does not change the estimating equation.

Result: Under the differentiability and positivity conditions above, differentiating the sum of the observation-level quasi-likelihoods with respect to \(\boldsymbol{\beta}\) gives the quasi-score. Equivalently, each observation contributes its residual divided by its modeled variance, multiplied by the derivative of its mean with respect to the linear predictor and by its predictor vector.

To verify the result, set \(\mu_i=g^{-1}(\eta_i)\), with \(\eta_i=\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta}\). The chain rule gives

$$ \frac{\partial Q_i}{\partial\boldsymbol{\beta}} = \frac{\partial Q_i}{\partial\mu_i} \frac{\partial\mu_i}{\partial\eta_i} \frac{\partial\eta_i}{\partial\boldsymbol{\beta}} = \frac{y_i-\mu_i}{\phi V(\mu_i)} \frac{d\mu_i}{d\eta_i}\mathbf{x}_i. $$

Here \(\partial\eta_i/\partial\boldsymbol{\beta}=\mathbf{x}_i\), viewed as a column vector. Summing this identity over the finite set of observations gives \(\mathbf{U}(\boldsymbol{\beta})\) as defined above. No interchange of a limit and an integral is needed: the derivative of the integral with respect to its upper endpoint follows directly from continuity of the integrand.

Because \(\eta_i=g(\mu_i)\), implicit differentiation also yields \(d\mu_i/d\eta_i=1/g'(\mu_i)\). Thus an equivalent expression is

$$ \mathbf{U}(\boldsymbol{\beta}) = \sum_{i=1}^n \frac{Y_i-\mu_i}{\phi V(\mu_i)g'(\mu_i)} \mathbf{x}_i. $$

This form makes both ingredients visible. The variance function determines how strongly a residual is scaled, and the link derivative determines how a change in the linear predictor translates into a change in the mean. If the link derivative is large at a mean value, the mean changes relatively slowly per unit change in the linear predictor, and the factor \(1/g'(\mu_i)\) is correspondingly smaller.

Worked Examples

Worked Example: A Nonlinear Variance Function with a Log Link

For one observation, suppose \(V(\mu)=\mu(1+\mu)\), \(\phi=1.5\), the log link is used, and the fitted mean is \(\mu=2\). Let the observed response be \(y=5\) and the predictor vector be \(\mathbf{x}=(1,-1)^\mathsf{T}\). Find its quasi-score contribution.

For the log link, \(g(\mu)=\log\mu\), so \(g'(\mu)=1/\mu\) and \(d\mu/d\eta=\mu\). At \(\mu=2\), the variance-function value is \(V(2)=2(1+2)=6\), and \(d\mu/d\eta=2\). Therefore the scalar multiplier of \(\mathbf{x}\) is

$$ \frac{y-\mu}{\phi V(\mu)}\frac{d\mu}{d\eta} = \frac{5-2}{1.5(6)}(2) = \frac{6}{9} = \frac{2}{3}. $$

The observation contributes \((2/3)(1,-1)^\mathsf{T}=(2/3,-2/3)^\mathsf{T}\). The residual is positive, so the contribution points in the direction of \(\mathbf{x}\); its size reflects both the modeled variance and the log-link derivative.

Worked Example: Grouped Quasi-Binomial Data

A group contains \(m=10\) trials, with \(Y=5\) successes. Suppose the success probability is \(p=0.3\), the dispersion is \(\phi=1.4\), and the model uses the logit link, \(\operatorname{logit}(p)=\mathbf{x}^\mathsf{T}\boldsymbol{\beta}\), with \(\mathbf{x}=(1,2)^\mathsf{T}\). Find the group’s contribution to the quasi-score.

For the success count, the mean and variance are \(\mu=mp=10(0.3)=3\) and \(\phi mp(1-p)=1.4(10)(0.3)(0.7)=2.94\). Under the logit link, \(dp/d\eta=p(1-p)\), so \(d\mu/d\eta=mp(1-p)=10(0.3)(0.7)=2.1\). The contribution is therefore

$$ \frac{Y-\mu}{\phi mp(1-p)}\frac{d\mu}{d\eta}\mathbf{x} = \frac{5-3}{1.4(2.1)}(2.1) \begin{pmatrix}1\\2\end{pmatrix} = \frac{2}{1.4} \begin{pmatrix}1\\2\end{pmatrix} = \begin{pmatrix}10/7\\20/7\end{pmatrix}. $$

The calculation checks directly: the variance denominator is \(2.94\), the residual is \(2\), and multiplying \(2/2.94\) by \(2.1\) gives \(2/1.4=10/7\). The trial count enters the mean and its derivative, as well as the variance; it should not be dropped when modeling the group’s success count.

Worked Example: Quasi-Poisson Counts with Exposure

Suppose a count \(Y\) has mean \(\mu=8\) and variance \(\phi\mu\), with \(\phi=2\). A log-mean model includes an exposure offset \(o=\log 4\), so \(\eta=o+\mathbf{x}^\mathsf{T}\boldsymbol{\beta}\). For an observed count \(y=5\) and \(\mathbf{x}=(1,-0.5)^\mathsf{T}\), calculate the observation’s contribution.

Here \(V(\mu)=\mu\). The log link gives \(d\mu/d\eta=\mu=8\), while the offset is fixed and hence does not contribute to \(\partial\eta/\partial\boldsymbol{\beta}=\mathbf{x}\). The variance is \(\phi\mu=2(8)=16\). Thus

$$ \frac{y-\mu}{\phi\mu}\frac{d\mu}{d\eta}\mathbf{x} = \frac{5-8}{2(8)}(8) \begin{pmatrix}1\\-0.5\end{pmatrix} = -\frac{3}{2} \begin{pmatrix}1\\-0.5\end{pmatrix} = \begin{pmatrix}-1.5\\0.75\end{pmatrix}. $$

The negative residual produces a contribution opposite the predictor vector. The offset affects the fitted mean, and therefore the residual and variance, but the coefficient derivative still uses only \(\mathbf{x}\).

What the Equation Guarantees—and What It Does Not

At the true coefficient vector, the quasi-score has expectation zero if the specified conditional means are correct and the terms are integrable. For a fixed design, each multiplier other than \(Y_i-\mu_i\) is then nonrandom at the true parameter, and \(E[Y_i-\mu_i]=0\). Consequently,

$$ E[\mathbf{U}(\boldsymbol{\beta})] = \sum_{i=1}^n \frac{E[Y_i-\mu_i]}{\phi V(\mu_i)} \frac{d\mu_i}{d\eta_i}\mathbf{x}_i = \mathbf{0}. $$

This establishes unbiasedness of the estimating function under the mean model; it does not assert that a probability mass function has been specified. The variance model matters in determining the equation’s weights, and the link determines the derivative factor. Earlier material on quasi-likelihood theory develops the large-sample behavior and covariance of estimators obtained from such estimating equations.

If \(\phi\) is one common positive constant, it multiplies the entire quasi-score by \(1/\phi\). Thus the equation \(\mathbf{U}(\boldsymbol{\beta})=\mathbf{0}\) has the same roots as the equation with \(\phi\) omitted. This does not make dispersion irrelevant: it remains part of the variance model and matters for uncertainty calculations. Nor can this cancellation be applied observation by observation if different observations have different dispersion multipliers.

Common Mistake

A frequent error is to use only \((Y_i-\mu_i)/\{\phi V(\mu_i)\}\) as the coefficient contribution, omitting \(d\mu_i/d\eta_i\). That quantity is the derivative of quasi-likelihood with respect to the mean, not with respect to the regression coefficients. The coefficients change the linear predictor, which changes the mean; the chain rule requires the extra factor. Another error is to use \(g'(\mu_i)\) where \(d\mu_i/d\eta_i\) is required. Since \(d\eta_i/d\mu_i=g'(\mu_i)\), the needed derivative is its reciprocal, \(1/g'(\mu_i)\), when the derivative is nonzero.

Key takeaway: For each observation, start with its residual, divide by the modeled variance, multiply by the mean’s derivative with respect to the linear predictor, and then multiply by its predictor vector. The resulting terms sum to the regression-coefficient quasi-score.

Check Your Understanding

Use the mean, variance, and link to identify every factor in an observation’s quasi-score contribution.

  1. For a log link, what is \(d\mu/d\eta\), and how does it enter the quasi-score?
  2. For a differentiable link \(g\) with nonzero derivative, express \(d\mu/d\eta\) using \(g'(\mu)\).
  3. In a grouped quasi-binomial model for success counts, what are the mean and variance when there are \(m\) trials and success probability \(p\)?
  4. Why does a fixed exposure offset affect the fitted mean but not the coefficient derivative of the linear predictor?
  5. Under what condition can a common dispersion factor be removed without changing the roots of the quasi-score equation?
Clinical Biostats