Why the Interval Must Match the Estimand
A GLMM can produce estimates on several scales. A conditional coefficient describes a relationship on the model’s link scale, while a marginal mean averages predicted responses over a specified target population and the random-effects distribution. A confidence interval for one of these quantities is not automatically an interval for another. In particular, transforming a coefficient interval does not generally produce a confidence interval for a standardized marginal effect.
This tutorial concerns intervals for three response-scale quantities: a marginal mean, a difference between marginal means, and a ratio of marginal means. For binary outcomes, these include a marginal probability, a risk difference, and a risk ratio. For count outcomes, a ratio may compare marginal expected counts or rates. The estimand, target population, and scale should be settled before calculating an interval.
For example, empirical standardization may calculate each condition’s predicted response for the same observed covariate records, then average those predictions. The resulting interval is conditional on treating those records as the target population unless the procedure also accounts for uncertainty in how that population was sampled. Marginalization over the random-effects distribution is part of the estimand; substituting estimated cluster effects for that integration would instead target a different quantity.
Delta-Method Intervals for Marginal Effects
Write the estimated marginal quantity as \(T(\hat{\theta})\), where \(\hat{\theta}\) contains the estimated fixed effects and any estimated covariance parameters needed for marginalization. If the target covariate records are treated as fixed, they enter the function \(T\), but are not random in the uncertainty calculation. Suppose \(\hat{\theta}\) is approximately multivariate normal with estimated covariance matrix \(\widehat V\), and \(T\) is differentiable near the true parameter. The delta method uses the gradient of \(T\) to approximate its variance.
For a vector of marginal means, let \(\hat{\boldsymbol{\mu}}\) be the estimates and let \(\widehat\Sigma\) be their estimated covariance matrix. A difference uses the covariance between the two means, not merely their separate standard errors:
A basic Wald interval for an unrestricted response-scale estimand is the estimate plus or minus \(z_{1-\alpha/2}\) times its estimated standard error. Here \(z_{1-\alpha/2}\) is the corresponding standard normal quantile; for a 95% interval it is approximately 1.96. This construction is useful when the sampling distribution is adequately approximated by a normal distribution and the interval’s endpoints are meaningful on the estimand’s scale.
For an estimand restricted to a range, a direct Wald interval may extend beyond that range. A common remedy for a marginal probability is to form an interval on the logit scale and transform its endpoints back. For a positive ratio, a log-scale interval is natural because the logarithm of the ratio is unrestricted. These transformations preserve the estimand while making the interval’s endpoints conform to the parameter space. They do not, however, guarantee good coverage when the estimate is unstable or the normal approximation is poor.
Worked Example: A Marginal Probability Interval
Suppose a hypothetical GLMM analysis estimates a standardized response probability as \(\hat{\mu}=0.300\), with delta-method \(SE=0.0300\). Assume the estimator is approximately normal on the logit scale and the variance estimate is reliable. Construct a 95% interval constrained to probabilities between 0 and 1.
The logit is \(h(\mu)=\log\{\mu/(1-\mu)\}\). Its derivative is \(h'(\mu)=1/\{\mu(1-\mu)\}\). Thus the estimated logit is \(\log(0.300/0.700)=-0.8473\), and its standard error is approximately \(0.0300/\{0.300(0.700)\}=0.1429\).
The logit-scale interval is \[ -0.8473\pm1.96(0.1429) =-0.8473\pm0.2800 =(-1.1273,-0.5673). \] Applying the inverse-logit \(q\mapsto1/(1+\exp(-q))\) to both endpoints gives approximately \((0.245,0.362)\).
Under the model and approximation used, this is a 95% confidence interval for the target population’s marginal response probability: from about 24.5% to 36.2%. It is not a statement that the fixed probability has a 95% chance of lying in this particular calculated interval.
Differences: Preserve the Dependence Between Predictions
A risk difference is measured in probability points; a count-mean difference is measured in expected counts, or in rate units if the estimand is a rate. Its interval should use the uncertainty in both marginal means and their covariance. The covariance can be substantial because both predictions are calculated from the same fitted model and often the same target covariate records. Ignoring it can give an incorrect standard error in either direction.
Worked Example: A Risk-Difference Interval
In a hypothetical analysis, two standardized marginal probabilities are \(\hat{\mu}_0=0.300\) and \(\hat{\mu}_1=0.420\). Their estimated variances are \(0.000900\) and \(0.001600\), and their estimated covariance is \(0.000600\). Assume these joint estimates have an adequate normal approximation and the covariance matrix is valid. Calculate a 95% Wald interval for the risk difference \(\Delta=\mu_1-\mu_0\).
The estimated difference is \(0.420-0.300=0.120\), or 12.0 percentage points. The standard error is \[ SE(\hat{\Delta})=\sqrt{0.001600+0.000900-2(0.000600)} =\sqrt{0.001300}=0.03606. \]
Therefore, the interval is \[ 0.120\pm1.96(0.03606) =0.120\pm0.07068 =(0.0493,0.1907). \]
The estimated risk difference is 12.0 percentage points, with a 95% interval from about 4.93 to 19.1 percentage points. Under the assumptions, the interval excludes zero, so it is inconsistent with a zero risk difference at the corresponding two-sided 5% level. This is an associational comparison unless the design and assumptions support a causal interpretation.
This interval happens to stay within the possible range \([-1,1]\) for a difference between probabilities. Wald intervals are not constrained to do so, however. If a difference interval has implausible endpoints, or if the estimated contrast is near a boundary with a skewed sampling distribution, use a method that better reflects the sampling distribution, such as a suitable simulation-based interval. Do not apply a logit transformation directly to a risk difference: the difference can be zero or negative.
Ratios: Work on the Log Scale
A ratio of positive marginal means is positive, while its logarithm can range over the real line. For \(R=\mu_1/\mu_0\), the log ratio is \(\log(R)=\log(\mu_1)-\log(\mu_0)\). The delta-method gradient with respect to the two means is \((-1/\mu_0,1/\mu_1)\). Applying this gradient to their joint covariance matrix yields an estimated standard error for the log ratio. A confidence interval is then calculated on the log scale and exponentiated at both endpoints.
Worked Example: A Marginal Rate-Ratio Interval
Suppose a hypothetical analysis estimates standardized marginal rates of \(\hat{\mu}_0=2.40\) and \(\hat{\mu}_1=3.00\) events per person-year. The estimated variances are \(0.0400\) and \(0.0625\), and their covariance is \(0.0300\). Assume both rates are positive, the joint covariance estimate is valid, and the log-ratio estimator is approximately normal. Calculate a 95% interval for \(R=\mu_1/\mu_0\).
The estimated ratio is \(3.00/2.40=1.25\), and its log is \(\log(1.25)=0.2231\). Its estimated log-scale variance is \[ \frac{0.0400}{2.40^2} +\frac{0.0625}{3.00^2} -\frac{2(0.0300)}{(2.40)(3.00)} =0.006944+0.006944-0.008333 =0.005556. \] The standard error is \(\sqrt{0.005556}=0.07454\).
The log-scale interval is \(0.2231\pm1.96(0.07454)=(0.0770,0.3692)\). Exponentiating gives the ratio interval \((\exp(0.0770),\exp(0.3692))\), or approximately \((1.080,1.447)\).
The estimated marginal rate is 1.25 times as large in condition 1 as in condition 0; the 95% interval ranges from about 1.08 to 1.45. The ratio is dimensionless because the rate units cancel. This interval excludes 1, the null value for equality of the two positive rates.
Simulation-Based Intervals and Assumptions
The delta method is not the only way to quantify uncertainty. A simulation-based procedure can propagate uncertainty through the entire calculation of the marginal estimand. For example, one may draw parameter vectors from an approximate sampling distribution based on \(\hat{\theta}\) and \(\widehat V\), calculate the marginal means for each draw, and then calculate the desired difference or ratio for that same draw. Alternatively, a parametric bootstrap simulates data under the fitted model and refits the model in each replicate. Percentiles of the resulting estimand values can form an interval. The simulated quantity must be the marginal estimand itself, not just a conditional coefficient.
These approaches still require assumptions. The GLMM must adequately describe the outcome distribution, link, random-effects distribution, and relevant dependence; the marginalization and target-population definition must match the scientific question; and the fitted model must be estimable. A parametric bootstrap relies on the fitted model being a useful generator for the data. Simulation from an asymptotic parameter distribution relies on that approximation being reasonable. Neither method repairs a misspecified model or an unclear estimand.
Name the target population, the conditions being compared, and whether the desired result is a mean, difference, or ratio.
Retain covariance among predictions or calculate uncertainty from the full fitted parameter vector. Do not treat predictions from the same fit as independent without justification.
Use a response-scale interval when its approximation and endpoints are appropriate; consider a logit scale for probabilities and a log scale for positive ratios.
Verify endpoints, units, and the estimand’s allowed range, and assess whether sparse data, boundary estimates, or unstable fits undermine the approximation.
When the target covariates represent a sample from a wider population rather than a fixed standardization set, there can be additional uncertainty from sampling that covariate distribution. The uncertainty procedure should reflect that target. For example, resampling independent clusters may be appropriate when clusters are the sampling units and the target includes variation across clusters. Resampling individual rows as if they were independent can be inappropriate when within-cluster dependence matters. The choice follows the sampling design and estimand, not just computational convenience.
Diagnostics, Alternatives, and Limitations
Inspect whether the fitted model converged, whether variance components are near boundaries, and whether the covariance matrix used in the calculation is numerically stable. Sparse outcomes or few clusters can make normal approximations unreliable, especially for probabilities near zero or one and ratios with a small denominator. For simulation-based intervals, inspect the distribution of simulated marginal effects: strong skewness, failed fits, or extreme ratios signal that a symmetric Wald interval may be a poor summary and that even simulation may be unstable.
The main choices have different strengths. A direct Wald interval is simple and can be effective for a well-estimated, approximately symmetric unrestricted contrast. A transformed interval respects the range of a probability or the positivity of a ratio, but remains dependent on an approximate normal distribution on the transformed scale. Simulation-based intervals can capture asymmetry and nonlinear transformations more directly, but cost more computation and depend on the simulation scheme and model. No interval method removes uncertainty about model specification, target-population choice, or the interpretation of the estimand.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A standardized marginal probability is 0.10 with standard error 0.02. Why might a direct 95% Wald interval be undesirable, and what transformation can help?
- Two estimated marginal means have variances 0.010 and 0.016 and covariance 0.006. What is the estimated variance of their difference?
- A positive marginal ratio has estimated value 0.80. What is its null value for equality, and on what scale is a symmetric interval commonly constructed?
- Why does resampling individual observations independently risk understating uncertainty in clustered data?
Solutions. (1) The direct interval is \(0.10\pm1.96(0.02)=(0.0608,0.1392)\), which is in range here, but for estimates closer to zero or one it can extend outside the probability range and need not reflect skewness. A logit-scale interval can be transformed back to keep endpoints between zero and one. (2) The variance is \(0.010+0.016-2(0.006)=0.014\). (3) The null ratio is 1; construct a symmetric interval for the log ratio, then exponentiate its endpoints. (4) Observations in the same cluster are dependent. Resampling them as independent discards that dependence and can misrepresent sampling variability; the resampling unit should respect the design, often the cluster.