Tutorials › Generalized Linear Models › Observation Weights and Quasi-Dispersion

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

Observation Weights and Quasi-Dispersion

Distinguish weights that change an observation’s contribution from the common dispersion multiplier, using quasi-binomial and quasi-Poisson equations and worked calculations.

Intermediate 10 min read

What You'll Learn

  • Write the quasi-score with observation weights and a common dispersion multiplier
  • Interpret grouped-binomial trial totals as precision contributions
  • Distinguish frequency weights from inverse-variance weights
  • Calculate how weights change quasi-Poisson scores and Pearson contributions
  • Explain when a common dispersion multiplier changes uncertainty but not fitted coefficients
  • Identify why the meaning of a weight must be specified before interpreting dispersion

Why Weights and Dispersion Must Be Kept Separate

A quasi-GLM can give an observation more influence because it represents repeated records, because its response is measured with greater precision, or because it contains more binomial trials. These are different reasons for weighting, even when they produce similar-looking multipliers in a score equation. The common dispersion parameter has another role: it scales the assumed variance across observations. Keeping these roles distinct is essential for interpreting both the fitted coefficients and dispersion summaries.

Consider independent responses \(Y_i\) with means \(\mu_i\), linear predictors \(\eta_i=x_i^\mathsf{T}\beta+o_i\), and a specified variance function \(V(\mu_i)\). Here \(x_i\) is a vector of predictors, \(\beta\) is the coefficient vector, and \(o_i\) is an optional offset. We use the quasi-GLM variance convention \(\operatorname{Var}(Y_i)=\phi V(\mu_i)/a_i\), where \(a_i\) is an observation-level weight and \(\phi>0\) is the common dispersion multiplier.

Definition: Under the variance-weight convention, an observation weight \(a_i>0\) multiplies that observation’s precision: \(\operatorname{Var}(Y_i)=\phi V(\mu_i)/a_i\). The common dispersion \(\phi\) multiplies the variance for all observations. A frequency weight instead records how many identical observation-level contributions are being represented by one row. The two kinds of weights can lead to the same estimating-equation multiplier in some settings, but their interpretations and implications are not interchangeable.

Terminology varies across software and statistical fields. A “prior weight” in GLM software often enters as an inverse-variance or precision weight; “variance weight” is also used for this role. A frequency weight is typically a nonnegative integer when it literally represents replicated records. The safest practice is to state what a weight means and show how it enters the variance or estimating equation, rather than relying on its label alone.

The Weighted Quasi-Score

Let \(g(\mu_i)=\eta_i\), and write \(d\mu_i/d\eta_i\) for the derivative of the mean with respect to the linear predictor. With variance \(\phi V(\mu_i)/a_i\), the quasi-score for \(\beta\) is

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

This formula makes the roles explicit. The observation weight \(a_i\) changes that observation’s contribution relative to the others. The common \(\phi\) divides the whole score by the same positive constant. For a frequency weight, the same multiplication arises by adding the score contribution once for each represented record. For a variance weight, it arises because the observation is assigned variance \(\phi V(\mu_i)/a_i\).

For a Poisson variance function \(V(\mu)=\mu\) and a log link, \(d\mu/d\eta=\mu\), so the score simplifies to \(U(\beta)=\phi^{-1}\sum_i a_i x_i(Y_i-\mu_i)\). For grouped binomial data, if \(Y_i\) is the observed success proportion and \(m_i\) is the number of trials, then \(V(\mu_i)=\mu_i(1-\mu_i)\) and the trial total enters as \(a_i=m_i\).

Worked Example: A Trial Total in a Quasi-Binomial Score

Suppose a group has \(m=20\) trials and \(s=7\) successes. Its observed proportion is \(y=s/m=7/20=0.35\). At a proposed fitted probability \(p=0.40\), suppose the common dispersion is \(\phi=1.5\). With a logit link, \(dp/d\eta=p(1-p)\), so the group’s contribution to the score for a predictor whose group value is \(x=1\) is

$$ \frac{1}{\phi}m x\frac{p(1-p)}{p(1-p)}(y-p) =\frac{1}{1.5}(20)(0.35-0.40) =-\frac{2}{3}. $$

Equivalently, \(m(y-p)=7-20(0.40)=7-8=-1\), and dividing by \(1.5\) gives \(-2/3\). The 20 is the number of binomial trials represented by the proportion; it is not the common dispersion. The dispersion scales the contribution, while the trial total determines how much information this group supplies relative to a group with fewer trials.

Frequency Weights and Variance Weights

A frequency weight represents repeated identical rows. If a row with response \(y\) and predictor vector \(x\) occurs \(f\) times, its total score is \(f\) times the score for one such row. This follows by summing the same contribution \(f\) times. A variance weight, by contrast, says that the recorded response has a specified precision relative to the variance function. It need not mean that there were \(a_i\) independent copies of that response.

Grouped binomial trial totals offer a familiar precision interpretation: a proportion based on more trials has smaller variance, since \(\operatorname{Var}(Y_i)=\phi p_i(1-p_i)/m_i\). This resembles a variance weight \(a_i=m_i\). But the trial total also has a specific sampling meaning: it is the number of Bernoulli outcomes summarized by the proportion. It should not be confused with a frequency weight that repeats an entire group-level observation.

Worked Example: Repeated Rows With a Frequency Weight

Suppose three records have the same predictor value \(x=1\), the same observed Poisson response \(y=2\), and the same fitted mean \(\mu=1.5\). A single Poisson quasi-score contribution under the log link is \(x(y-\mu)/\phi\). Representing the three records by one row with frequency weight \(f=3\) gives

$$ U_{\text{row}}=\frac{f x(y-\mu)}{\phi} =\frac{3(1)(2-1.5)}{\phi} =\frac{1.5}{\phi}. $$

Adding the three individual contributions gives the same result: \(\{(2-1.5)+(2-1.5)+(2-1.5)\}/\phi=1.5/\phi\). The corresponding Pearson-residual numerator contribution is also tripled: \(3(2-1.5)^2/1.5=0.5\). This is literal row replication. It does not mean that the response value 2 is a count of three events, nor does it mean that the common dispersion is 3.

Worked Example: A Precision Weight in a Quasi-Poisson Fit

For one quasi-Poisson observation, let \(y=5\), \(\mu=3\), \(x=1\), and \(\phi=1.2\). Suppose a stated variance weight is \(a=4\), so that the assumed variance is \(\phi\mu/a\). Under the log link, its score contribution is

$$ \frac{a x(y-\mu)}{\phi} =\frac{4(1)(5-3)}{1.2} =\frac{20}{3}. $$

The assumed variance is \(1.2(3)/4=0.9\), compared with \(1.2(3)=3.6\) without the weight. Thus the observation’s modeled variance is one quarter as large and its score contribution is four times as large. This calculation uses the stated precision-weight interpretation; it does not establish that four independent Poisson observations were actually collected.

Two Consequences for Fitting and Dispersion

The common dispersion and the observation weights both appear in the score, but they affect fitting differently. Multiplying every score contribution by the same positive constant does not change the equation \(U(\beta)=0\). Changing the observation weights, however, generally changes the relative contributions and can change the solution. The first result is about the coefficient estimates; it does not say that dispersion is irrelevant to uncertainty.

Result: For fixed positive observation weights, multiplying the entire quasi-score by \(1/\phi\), where \(0<\phi<\infty\) is common to all observations, leaves its set of roots unchanged. If the score equation has a unique solution, its coefficient estimate is unchanged.

Proof. Define the score without the common multiplier as \(U_0(\beta)=\sum_i a_i x_i(d\mu_i/d\eta_i)(Y_i-\mu_i)/V(\mu_i)\). Then \(U(\beta)=U_0(\beta)/\phi\). Since \(\phi\) is finite and positive, \(U(\beta)=0\) if and only if \(U_0(\beta)=0\). Therefore the root sets are identical, and so are the solutions when the root is unique. \(\square\)

The same distinction appears in dispersion estimation. For variance weights \(a_i\), the Pearson statistic has the form

$$ X_P^2=\sum_{i=1}^n a_i\frac{(Y_i-\hat{\mu}_i)^2}{V(\hat{\mu}_i)}. $$

A common Pearson-based estimate divides this quantity by an appropriate residual degrees of freedom. The weights alter the observation-level terms in the numerator; they do not replace the common dispersion being estimated. For literal frequency weights, aggregating rows also represents repeated residual contributions, and the corresponding residual degrees of freedom should reflect the represented records under that interpretation. With general precision weights, simply treating the sum of weights as a sample size is not automatically justified. The intended weight meaning and the fitting convention must be clear before interpreting a dispersion estimate.

Result: For grouped binomial observations with \(m_i\) trials and observed success proportions \(y_i=s_i/m_i\), the quasi-binomial score contribution is the same as the sum of the Bernoulli quasi-score contributions from the \(m_i\) trials, provided all trials in group \(i\) share the same fitted probability and predictor vector.

Proof. Let the individual outcomes in group \(i\) be \(Z_{ij}\in\{0,1\}\), for \(j=1,\ldots,m_i\), with common fitted probability \(p_i\) and predictor vector \(x_i\). Under the logit link, the Bernoulli score contribution for outcome \(Z_{ij}\) is \(x_i(Z_{ij}-p_i)/\phi\). Summing within the group gives

$$ \frac{x_i}{\phi}\sum_{j=1}^{m_i}(Z_{ij}-p_i) =\frac{x_i}{\phi}(s_i-m_i p_i) =\frac{m_i x_i}{\phi}(y_i-p_i). $$

The grouped quasi-binomial score for the proportion \(y_i\) uses variance function \(p_i(1-p_i)\), derivative \(dp_i/d\eta_i=p_i(1-p_i)\), and trial weight \(m_i\). Its contribution is therefore \(\phi^{-1}m_i x_i(y_i-p_i)\), equal to the sum above. Thus grouping preserves this estimating-equation contribution under the stated common-probability condition. \(\square\)

Common Mistake: Treating Every Weight as Dispersion

A common error is to see a multiplier in a quasi-score and conclude that it can be absorbed into \(\phi\). That reasoning fails when the multiplier varies by observation. A common positive \(\phi\) scales every score contribution equally; changing one observation’s weight relative to another changes their balance and can change the fitted coefficients. Conversely, increasing all observation weights by the same constant can leave the score roots unchanged, just as changing a common scale can, while still changing how variance and dispersion summaries are interpreted.

Another mistake is to read a frequency weight as a dispersion estimate, or to multiply the common \(\phi\) by a trial total when the grouped-binomial variance already uses the trial total as a precision multiplier. For a proportion, the roles are explicit in \(\operatorname{Var}(Y_i)=\phi p_i(1-p_i)/m_i\): \(m_i\) describes the group’s trial count, and \(\phi\) scales the variance beyond the binomial variance convention.

Offsets and exposure terms have a separate role: they enter the linear predictor and hence determine the fitted mean, not the observation’s precision weight. A large exposure can change the mean in a quasi-Poisson model without being a frequency weight or a common dispersion multiplier.

Key takeaway: State the weight’s meaning and its equation. Frequency weights count replicated contributions; variance or prior weights encode relative precision; grouped-binomial trial totals encode the number of trials behind a proportion. The common dispersion multiplier scales variance globally, and is not a substitute for any of these observation-level roles.

Check Your Understanding

Use the variance or score equation to justify each answer.

  1. For a grouped-binomial proportion based on 40 trials, identify the trial-total multiplier and the common dispersion in its variance.
  2. Three identical Poisson rows are represented by one row with frequency weight 3. What happens to that row’s score contribution compared with one record?
  3. Why can changing one observation’s weight change fitted coefficients, while changing a common positive \(\phi\) does not change the score-equation roots?
  4. A quasi-Poisson observation has \(\mu=2\), \(\phi=1.5\), and variance weight \(a=3\). Calculate its modeled variance.
  5. Explain why a frequency weight of 4 does not, by itself, imply that the common dispersion is 4.
Clinical Biostats