Why Initialization Matters in a Two-Class Fit
A two-class NLME model must estimate both the population parameters within each latent class and the probability that an individual belongs to each class. Because class membership is unobserved, the likelihood combines contributions from both classes rather than assigning each individual permanently to one group. The resulting objective can be difficult to optimize: a poor starting point may lead to slow progress, implausible parameter values, or a converged solution that depends strongly on the initial values.
Initialization is not a substitute for likelihood-based estimation. Its purpose is to give the optimizer plausible starting values in a region where both classes are represented and their clearance distributions can be distinguished. Stratifying a noisy clearance proxy can help create such starts, provided that the proxy is treated as a guide rather than as a definitive classification.
Model Components to Initialize
For a simple two-class model, let \(k\in\{1,2\}\) index the latent classes and let \(i\) index individuals. A useful parameterization for clearance is
Here \(CL_k\) is the typical clearance in class \(k\), and \(\omega_k^2\) is the variance of the individual random effect on log clearance. The exponential ensures positive individual clearance. This expression describes a possible class-specific random-effect model; if the intended model shares a variance across classes, initialize one shared \(\omega^2\) instead of two separate variances.
Write \(\pi_{ik}\) for the probability that individual \(i\) belongs to class \(k\), with \(\pi_{i1}+\pi_{i2}=1\). If membership has no covariates, then \(\pi_{i1}=\pi\) and \(\pi_{i2}=1-\pi\). If membership depends on covariates, the probability model specified for that analysis supplies these probabilities; stratified class counts can inform a starting prevalence but do not replace that model.
In this expression, \(y_i\) denotes individual \(i\)'s observations, \(f\) is their conditional data density under class \(k\), \(\theta\) collects the model parameters, and \(\phi\) is the normal density for the random effect. The individual likelihood sums over the possible classes and integrates over the random effect. The starting values discussed here are supplied for parameters in this likelihood; they are not estimates obtained by assigning each person to a class and then fitting two unrelated models.
A practical stratified initialization has three parts: use approximate group sizes to start prevalence, use the proxy values within each group to start \(CL_k\), and use within-group spread on the log scale to start \(\omega_k^2\). The assumptions are modest but important: clearance proxies should be positive and sufficiently informative to suggest two groups, and the planned model should use the same clearance scale and random-effect structure as the starting calculations. Proxy-based group assignment is not assumed to be error-free.
Constructing Stratified Starts
For a positive individual clearance proxy \(q_i\), the log scale is natural because the model expresses clearance multiplicatively. If a provisional stratum \(k\) contains \(n_k\) proxies, a simple starting value for typical clearance is their geometric mean:
The superscript \((0)\) indicates an initial value. A provisional variance start can be calculated as the sample variance of the log proxies within that stratum:
This variance is only a rough guide. It combines true individual variability with measurement error, uncertainty in the proxy, and any misspecification in the proxy calculation. It should not be interpreted as a final estimate of random-effect variance. When a stratum is small, or its proxy values are nearly identical, the empirical variance may be unstable or zero; use a scientifically defensible positive starting value or a shared variance start rather than asking the optimizer to begin at a boundary.
Worked Example: Starting Prevalence From Provisional Strata
Suppose a hypothetical dataset of 10 individuals has been divided provisionally into two strata using a clearance proxy: six individuals in stratum A and four in stratum B. For a model with constant class prevalence, use the observed fractions as starting probabilities.
The initial probability for class A is \(\pi^{(0)}=6/10=0.600\); the corresponding probability for class B is \(1-\pi^{(0)}=4/10=0.400\). If the model uses a logit intercept \(\gamma_0\) for class A, then
Thus one possible starting point is prevalence 0.600 for class A and 0.400 for class B, or an intercept of 0.4055 under the stated logit parameterization. These are initial values, not a claim that the true class prevalence equals the observed fraction in the proxy strata. If membership includes covariates, this intercept is only a simple baseline start; the covariate coefficients need starts appropriate to their specified model and scale.
Worked Example: Clearance and Variance Starts From Proxy Values
Consider hypothetical clearance proxies in litres per hour. A low-proxy stratum contains \(10,10,12,12\), and a higher-proxy stratum contains \(20,20,24,24\). Use each stratum to calculate a typical-clearance start and a log-scale variance start.
For the first stratum, the geometric mean is
The two distinct log values differ by \(\log(12)-\log(10)=\log(1.2)=0.1823\). Their mean lies halfway between them, so the four deviations from the log mean are \(-0.09116,-0.09116,0.09116,0.09116\). The sum of squared deviations is \(4(0.09116^2)=0.03324\), giving
For the second stratum, multiplying every proxy by two adds \(\log(2)\) to every log value, so it doubles the geometric mean but does not change the log-scale variance. Therefore \(CL_2^{(0)}=2\sqrt{120}=21.91\ \text{L/h}\), and \(\omega_2^{2(0)}=0.01108\). The variance is dimensionless because it is on the log-clearance scale. These small, equal variances reflect the constructed proxy values; they should be checked against the model, proxy uncertainty, and plausible population variability before use.
Why These Calculations Are Reasonable
The geometric mean follows directly from the log-clearance parameterization. If a stratum has log proxies \(z_i=\log(q_i)\), their arithmetic mean \(\bar z\) corresponds to a typical clearance \(\exp(\bar z)\). Exponentiating the mean log is exactly the geometric mean of the original positive proxies. Thus the initialization is on the same multiplicative scale as \(CL_k\exp(\eta_{ik})\).
Similarly, the sample variance of the \(z_i\) values measures their observed dispersion on the scale where the random effect is additive. It is not automatically equal to \(\omega_k^2\): the proxies are not the latent random effects, and their variation may include other sources. The calculation is justified as a practical starting heuristic, not as an estimator with guaranteed accuracy.
For constant prevalence, the logit transformation also has a direct justification. The logit parameter \(\gamma_0\) satisfies \(\pi=\exp(\gamma_0)/(1+\exp(\gamma_0))\). Solving for \(\gamma_0\) gives \(\gamma_0=\log\{\pi/(1-\pi)\}\), which is why a provisional fraction can be translated into an intercept start.
Use a positive, scientifically interpretable clearance proxy, such as a dose- and exposure-based approximation. Inspect whether the proposed groups have enough individuals to support starting values; do not treat the strata as known membership.
Use group fractions for a prevalence start and geometric means of proxy clearance for class-specific typical-clearance starts. Check units and parameter constraints.
Use within-stratum log spread as a guide, apply positive lower bounds consistent with the software and model, and fit from several plausible starting configurations.
Review convergence diagnostics, objective values, and key parameter estimates across runs. Investigate material differences rather than selecting a run solely because it finished.
Assessing Whether Starts Reach Comparable Solutions
A run that reports convergence has passed the software's stopping rules; that alone does not establish that it found a satisfactory or reproducible solution. Compare runs made with the same model, data, estimation settings, and likelihood approximation. Examine at least the objective value (or log likelihood), convergence and gradient information, class prevalence, class-specific typical clearances, random-effect variances, and any boundary or covariance warnings.
Comparable solutions should have objective values that agree to a practically negligible tolerance and parameter estimates that are close enough for the scientific interpretation. The tolerance is context- and software-dependent; it should be chosen before reviewing results where possible and assessed relative to numerical precision and the size of scientifically important differences. A tiny objective difference does not make substantially different parameter estimates harmless: that pattern can signal a flat likelihood or weak information. Conversely, small numerical differences in parameters may be unimportant when the objective and predictions are stable.
Worked Example: Comparing Three Alternative Starts
Suppose three hypothetical fits of the same model produce the following summaries. All values below are illustrative; the log likelihood is to be maximized.
| Run | Log likelihood | Class A prevalence | Typical clearances (L/h) | Variance starts/fits | Optimizer status |
|---|---|---|---|---|---|
| 1 | -184.62 | 0.59 | 11.0, 21.8 | 0.10, 0.12 | Converged; no warning |
| 2 | -184.65 | 0.60 | 10.9, 22.0 | 0.11, 0.12 | Converged; no warning |
| 3 | -188.10 | 0.78 | 13.5, 19.0 | 0.01, 0.35 | Converged; large gradient warning |
Runs 1 and 2 differ in log likelihood by \(|-184.62-(-184.65)|=0.03\). Their prevalence estimates differ by \(0.01\), their clearance estimates differ by \(0.1\) and \(0.2\) L/h, and their variance estimates are also close. Given the stated warning-free diagnostics, these two runs support a stable numerical solution, subject to checking the chosen practical tolerances and other model diagnostics.
Run 3 has a lower log likelihood by \( |-188.10-(-184.62)|=3.48\) relative to run 1, markedly different parameter estimates, and a large-gradient warning. It should not be treated as an equally satisfactory fit merely because the optimizer returned a convergence message. Refit from revised plausible starts, inspect constraints and gradients, and assess whether the model is weakly informed or poorly conditioned. This comparison diagnoses sensitivity to initialization; it does not by itself establish which scientific model is correct.
Diagnostics, Alternatives, and Limitations
Stratified starts are especially useful when an observed proxy provides a plausible separation of the classes. They are not the only option. One alternative is to use several deliberately varied, scientifically plausible starts for prevalence, clearances, and variances without assigning individuals to proxy strata. Another is to use a simpler preliminary fit to obtain scale information, then construct mixture starts from that information. These approaches can be combined: use proxy strata for one run and perturbed or dispersed starts for additional runs. The essential comparison is among fits of the same final model, not among different preliminary models.
Warning signs include an estimated prevalence close to zero or one, a variance at or near its lower bound, a class clearance moving to an implausible range, large gradients, or estimates that change materially across starts. Also inspect whether provisional strata are driven by a few extreme proxies or have very small counts. If two classes are not well separated in the available data, initialization may be difficult regardless of the strategy; changing starts cannot create information absent from the observations.
Avoid interpreting the proxy strata as observed biological categories. Proxy error can place individuals in the wrong provisional group, and the mixture likelihood is intended to account for uncertain membership. Likewise, avoid setting a random-effect variance to zero simply because proxy values within a stratum happen to be similar. Such a start may put the optimizer at a boundary and can conceal meaningful uncertainty. Use a positive, defensible value and examine sensitivity to reasonable alternatives.
Check Your Understanding
Answer each question, then compare with the brief solutions below.
- A hypothetical proxy analysis gives 7 individuals in one stratum and 13 in the other. What constant-prevalence start and logit-intercept start correspond to the first stratum?
- Why is the geometric mean of positive clearance proxies a natural start for typical clearance in a log-random-effect model?
- Within a stratum, log proxies have zero observed spread. Should the fitted random-effect variance necessarily be initialized at zero? Explain.
- Two runs have very similar objective values but substantially different class-specific clearances. What should be checked before calling the fit stable?
Solutions. (1) The prevalence start is \(7/20=0.350\); the logit intercept is \(\log(0.350/0.650)=\log(7/13)=-0.6190\). (2) The model is additive on log clearance: averaging log proxies and exponentiating gives their geometric mean, on the same positive scale as typical clearance. (3) No. A finite proxy sample can have no observed spread while the population random-effect variance remains positive; a zero start may also land on a boundary. Use a defensible positive start or a shared variance start and assess sensitivity. (4) Check gradients, convergence warnings, boundaries, parameter constraints, estimation settings, and whether the likelihood is flat or weakly informative in those parameters. Similar objective values alone do not establish stable parameter estimates.