Tutorials › Population Pharmacokinetics › Estimating Interoccasion Variability With Unequal Occasion Counts

Random-Effect Structure and Error Models · Tutorial 143 of 599

Estimating Interoccasion Variability With Unequal Occasion Counts

Use a likelihood for within-subject occasion contrasts to estimate interoccasion variance and understand what unequal occasion counts do—and do not—change.

Intermediate 12 min read

What You'll Learn

  • Define the contrast-based model and its assumptions for estimating interoccasion variance.
  • Derive the likelihood and constrained maximum-likelihood estimate when residual variance is known.
  • Calculate how each subject’s number of occasions contributes degrees of freedom.
  • Compare balanced and unbalanced allocations with worked numerical examples.
  • Identify boundary cases, limits of the simplified likelihood, and practical diagnostics.

Why Occasion Counts Matter

Interoccasion variability (IOV) describes variation in a model parameter from one occasion to another for the same subject. Estimating it requires repeated occasions: a subject observed on only one occasion cannot directly show how that subject’s parameter changes across occasions. When subjects have unequal numbers of occasions, each contributes a different amount of within-subject information. The total number of observations alone therefore does not describe the information available for IOV.

A useful way to make this precise is to study within-subject contrasts. The likelihood in this tutorial is a deliberately simplified, exact variance-component calculation: it assumes a known residual variance and occasion-level observations on a common scale. A full population PK analysis may instead fit the structural and observation models jointly. The contrast calculation nevertheless makes the role of unequal occasion counts clear.

Definition: Let \(Y_{ij}\) be a subject-level quantity on occasion \(j\) for subject \(i\), measured on a common scale, and let \(m_i\) be the number of occasions observed for subject \(i\). Suppose \(Y_{ij}=a_i+\eta_{ij}+\epsilon_{ij}\), where \(a_i\) is constant across that subject’s occasions, \(\eta_{ij}\sim N(0,\theta)\) is an independent occasion effect, and \(\epsilon_{ij}\sim N(0,r^2)\) is independent residual error. Here \(\theta\geq 0\) is the IOV variance to estimate, and the residual variance \(r^2\geq 0\) is treated as known. All occasion effects and residual errors are mutually independent. The within-subject contrast variance is \(v=\theta+r^2\).

The constant \(a_i\) can include a population level and a subject-specific level that does not change between occasions. It disappears when observations are centered within subject. Define \(\bar{Y}_i=m_i^{-1}\sum_{j=1}^{m_i}Y_{ij}\), and let \(Q=\sum_i\sum_{j=1}^{m_i}(Y_{ij}-\bar{Y}_i)^2\). Subject \(i\) contributes \(m_i-1\) independent contrast degrees of freedom, so the total is \(\nu=\sum_i(m_i-1)\). A subject with one occasion contributes zero.

Likelihood and the Constrained Estimate

After centering within subject, the contrast sum of squares has the distribution \(Q/v\sim\chi^2_\nu\), provided \(\nu>0\) and the model assumptions hold. Thus, apart from factors that do not depend on \(v\), the likelihood is

$$ L(v)\propto v^{-\nu/2}\exp\left(-\frac{Q}{2v}\right), \qquad v\geq r^2. $$

The constraint \(v\geq r^2\) follows from \(v=\theta+r^2\) and \(\theta\geq0\). Taking the log likelihood and differentiating gives

$$ \ell(v)=-\frac{\nu}{2}\log(v)-\frac{Q}{2v}+C, \qquad \frac{d\ell}{dv}=\frac{Q-\nu v}{2v^2}, $$

where \(C\) does not depend on \(v\). When \(Q>0\), the derivative is positive for \(v<Q/\nu\) and negative for \(v>Q/\nu\). Therefore the unconstrained maximum is \(Q/\nu\). Applying the lower bound \(r^2\) gives the constrained estimates

$$ \hat{v}=\max\left(r^2,\frac{Q}{\nu}\right), \qquad \hat{\theta}=\hat{v}-r^2 =\max\left(0,\frac{Q}{\nu}-r^2\right). $$

This formula applies when \(Q>0\) or \(r^2>0\). The zero case needs care: if \(Q=0\), the likelihood is proportional to \(v^{-\nu/2}\). If \(r^2>0\), it is maximized at the allowed boundary \(v=r^2\), giving \(\hat{\theta}=0\). If \(Q=r^2=0\), the likelihood grows without bound as \(v\) decreases toward zero. There is then no finite, attained maximum-likelihood estimate. In particular, it is not correct to call \(Q/\nu=0\) an attained unconstrained maximum in this case.

Key result: Under this model, the occasion counts enter the likelihood through \(\nu=\sum_i(m_i-1)\), while the observed within-subject contrasts enter through \(Q\). More occasions add contrast degrees of freedom; a single-occasion subject adds none. The estimate is a variance, so its units are the square of the units used for \(Y_{ij}\).

Worked Likelihood Comparisons

Worked Example: Balanced Occasion Counts

Suppose four hypothetical subjects each have three occasions. The within-subject sums of squares are \(Q_i=3,\ 4,\ 5,\) and \(6\), in squared log-parameter units. Assume the known residual variance is \(r^2=1\) in those squared units.

Each subject contributes \(3-1=2\) degrees of freedom, so \(\nu=4(2)=8\). The total is \(Q=3+4+5+6=18\). The unconstrained total-variance estimate is \(Q/\nu=18/8=2.25\), which exceeds the lower bound \(r^2=1\). Therefore

\(\hat{\theta}=18/8-1=1.25\) squared log-parameter units.

For a sense of uncertainty, a 95% confidence interval for \(v\), before enforcing its parameter-space bound, follows by inverting \(Q/v\sim\chi^2_8\). Using the 2.5th and 97.5th percentiles \(2.180\) and \(17.535\), respectively, gives \(18/17.535=1.027\) to \(18/2.180=8.257\). Subtracting \(r^2=1\) and restricting to \(\theta\geq0\) gives approximately \(0.027\) to \(7.257\) squared log-parameter units. This wide interval indicates that a positive point estimate need not imply a precisely estimated variance.

Worked Example: Unequal Occasion Counts

Now consider four hypothetical subjects with occasion counts \(4,\ 3,\ 2,\) and \(1\). Their within-subject sums of squares are \(6,\ 4,\ 5,\) and \(0\), respectively, and \(r^2=1\) squared log-parameter units.

The degrees of freedom are \((4-1)+(3-1)+(2-1)+(1-1)=3+2+1+0=6\). The single-occasion subject contributes no within-subject contrast. The total contrast sum of squares is \(Q=6+4+5+0=15\), so \(Q/\nu=15/6=2.5\). Hence \(\hat{\theta}=2.5-1=1.5\) squared log-parameter units.

Using the \(\chi^2_6\) percentiles \(1.237\) and \(14.449\), a corresponding 95% interval for \(v\) is \(15/14.449=1.038\) to \(15/1.237=12.126\). Transforming to \(\theta\) and respecting its nonnegative constraint gives approximately \(0.038\) to \(11.126\) squared log-parameter units. The point estimate is higher than in the balanced example, but the interval is also broad. The different estimate reflects the particular observed \(Q/\nu\), not a general rule that imbalance raises IOV.

Worked Example: Same Degrees of Freedom, Different Allocation

Compare two hypothetical allocations with eight total occasions and \(\nu=5\). In allocation A, three subjects have \(3,\ 3,\) and \(2\) occasions, with within-subject sums of squares \(2,\ 4,\) and \(4\). In allocation B, subjects have \(6,\ 1,\) and \(1\) occasions, with sums of squares \(10,\ 0,\) and \(0\). Let \(r^2=1\) squared units in both cases.

For A, \(\nu=(3-1)+(3-1)+(2-1)=5\), \(Q=2+4+4=10\), and \(\hat{\theta}=10/5-1=1\) squared units. For B, \(\nu=(6-1)+(1-1)+(1-1)=5\), \(Q=10\), and the estimate is again \(\hat{\theta}=1\) squared units. Under the stated likelihood, both allocations have the same likelihood for every \(v\), since both have the same \(Q\) and \(\nu\).

That equality is specific to this model and these summaries. Allocation B concentrates all contrast information in one subject; it therefore offers fewer subjects with repeated observations for checking whether the model is a reasonable description across subjects. Equal likelihood information in this calculation does not mean the allocations are equally useful for every modeling or diagnostic purpose.

What Unequal Counts Change in Practice

For a fixed number of subjects, an additional occasion on a subject with repeated observations adds one contrast degree of freedom. If an occasion count is \(m_i\), its direct contribution is \(m_i-1\); counts should not be averaged first and treated as if every subject had the average number. Subjects with only one occasion may inform other parts of a population model, but they do not contribute to this within-subject variance likelihood.

In the simplified model, two designs with the same \(\nu\) and \(Q\) have the same likelihood for \(\theta\), even if their occasion counts are allocated differently. In actual PK data, however, occasion-level information can vary with sampling times, dose histories, missingness, and the precision of the structural-model predictions. The variance may then need to be estimated in a joint likelihood rather than by pooling raw within-subject contrasts. Unequal counts can also leave few subjects with repeated observations, make a result sensitive to one subject, or coincide with informative missingness. The contrast formula alone cannot address those issues.

Assumptions, Diagnostics, and Alternatives

The calculation requires independent, normally distributed occasion effects with a common variance; independent normal residual errors with known common variance \(r^2\); a stable subject-specific level across occasions; and comparable measurements on a common scale. It also assumes the occasions being compared are exchangeable with respect to the modeled occasion effect. If the measurement scale changes by subject, occasion, or sampling design, a common-variance contrast likelihood may not be appropriate. In particular, estimated residual variance cannot simply be treated as known without accounting for its uncertainty.

Useful checks include inspecting each subject’s contribution \(Q_i=\sum_j(Y_{ij}-\bar{Y}_i)^2\), looking for an estimate at \(\hat{\theta}=0\), and checking whether a small number of subjects dominates \(Q\). A boundary estimate means the data do not support a positive IOV variance beyond the assumed residual variance under this model; it does not prove that biological occasion variability is absent. A large contribution from one subject may point to unusual observations or a model mismatch and should be investigated rather than automatically discarded. A likelihood profile or an interval is more informative about precision than reporting the point estimate alone.

The contrast likelihood is attractive because it yields a transparent calculation and removes a constant subject-level effect. A method-of-moments estimate uses the same ratio \(Q/\nu\) for total contrast variance, but the likelihood makes the nonnegative variance constraint and boundary behavior explicit. A joint nonlinear mixed-effects likelihood is preferable when occasion-level information must be derived from concentration data, residual variance is estimated, or the structural model needs to be fitted simultaneously. Such a fit uses more of the PK data structure but depends on its own modeling and computational assumptions. Neither approach compensates for a design with too few repeated occasions to identify IOV well.

Common mistake: Counting every concentration or every occasion as an independent contribution to IOV overstates the repeated-measures information. The relevant contrast degrees of freedom are \(\sum_i(m_i-1)\); a subject observed once contributes zero. A second mistake is to treat a zero contrast sum of squares as an ordinary estimate of zero variance in every case. When both \(Q=0\) and \(r^2=0\), the likelihood is unbounded at zero and has no finite attained MLE.
1
Tabulate occasion counts.
Record each subject’s \(m_i\); subjects with one occasion contribute no within-subject contrasts.
2
Calculate the contrast summaries.
Compute \(\nu=\sum_i(m_i-1)\) and \(Q=\sum_i\sum_j(Y_{ij}-\bar{Y}_i)^2\).
3
Estimate and assess uncertainty.
Use the constrained likelihood estimate, then examine a profile or interval and the subject-level contributions.

Check Your Understanding

Answer each question using the contrast model above. Solutions follow the questions.

  1. Five subjects each have two occasions. What is \(\nu\), and how many contrast degrees of freedom does each subject provide?
  2. Suppose \(\nu=4\), \(Q=6\), and \(r^2=1\) squared units. Calculate \(\hat{\theta}\).
  3. With \(\nu>0\), \(Q=0\), and \(r^2=2\), what is the constrained estimate, and why?
  4. With \(\nu>0\), \(Q=r^2=0\), is there an attained finite MLE? Explain.
  5. Two allocations have the same \(Q\) and \(\nu\), but in one allocation most contrasts come from one subject. What does the simplified likelihood imply, and what practical concern remains?

Solutions. (1) \(\nu=5(2-1)=5\); each subject provides one contrast degree of freedom. (2) \(\hat{\theta}=\max(0,6/4-1)=0.5\) squared units. (3) \(\hat{\theta}=0\), because the likelihood decreases as \(v\) increases from the lower bound \(r^2=2\) when \(Q=0\). (4) No. The likelihood is unbounded as \(v\) approaches zero, so there is no attained finite maximum. (5) The simplified likelihood is identical for the two allocations because it depends on \(Q\) and \(\nu\). In practice, concentration of contrasts in one subject means fewer subjects provide repeated-occasion information, so the adequacy of the model and the broader population interpretation deserve scrutiny.

Clinical Biostats