Why Use a Predictive Envelope?
A residual plot or a grouped outcome table shows what happened in the observed data, but it does not by itself show how much variation a fitted GLMM would typically produce. A parametric bootstrap predictive envelope adds that reference: it displays the range of a chosen residual summary or outcome summary across data sets generated under the fitted model. An observed feature outside the envelope is evidence of a discrepancy relative to that model and simulation scheme—not, by itself, proof of which model assumption failed.
An envelope is useful when a single test statistic would hide the pattern of misfit. For example, an envelope across several fitted-value bins can show where outcome counts are unexpectedly high or low. A residual envelope can show whether an observed residual pattern is larger than the patterns produced by the fitted model. The conclusions depend on specifying the model, the replication scheme, and the summary being compared.
Model and Envelope Definitions
Suppose the observed responses are \(Y=(Y_1,\ldots,Y_n)\), with fixed covariates and cluster membership. A GLMM specifies a conditional response distribution given random effects \(b\), and a distribution for those random effects. Write its parameter vector as \(\theta\), including fixed-effect and random-effect distribution parameters. The model also specifies the link and any offsets or exposure terms. Let \(\hat{\theta}\) denote the estimate from the observed data.
For the usual parametric bootstrap, assume that the fitted GLMM is the data-generating model for the check, that its conditional response distributions and random-effects distribution are correctly specified, and that the same design and observation structure can be simulated. The procedure uses \(\hat{\theta}\) as a plug-in value. It therefore approximates sampling variation under the fitted model; it does not account for every uncertainty about whether that model is true.
The previous material on conditional versus unconditional replications distinguishes two simulation targets. Conditional replications hold estimated cluster effects fixed and simulate outcomes given them; unconditional replications also draw new random effects from the fitted random-effects distribution. These targets answer different questions. State which is used: a conditional envelope checks outcome variation given the estimated effects, while an unconditional envelope includes variation from the model’s random-effects distribution.
When summaries involve fitted values, residuals, or estimated parameters, decide whether each bootstrap data set will be refitted. The observed summary and every replicate summary must be calculated by the same rule. Refitting is usually important when the diagnostic itself depends on fitted quantities: otherwise, the bootstrap summaries can omit the fitting step that shaped the observed residuals. For a direct outcome-count envelope based on fixed groups and fitted probabilities, one may instead hold the original fitted parameters fixed, provided the target is explicitly the plug-in predictive distribution.
Constructing the Envelope
Choose the summary before examining the bootstrap results. Examples include counts in prespecified fitted-value bins, residual means by covariate group, or a maximum absolute residual. Simulate \(B\) data sets under the stated fitted model. For each replicate, apply the chosen rule, including refitting if specified, and record \(T^{(b)}=(T_1^{(b)},\ldots,T_J^{(b)})\). For a central pointwise 95% envelope, the limits for component \(j\) are the empirical 2.5th and 97.5th percentiles of its \(B\) simulated values. Compare the observed \(T_j(Y)\) with those limits.
The envelope is pointwise: each interval targets the marginal distribution of one component. It does not generally have 95% probability of covering all \(J\) observed components together. Looking at many pointwise intervals increases the chance that at least one will be crossed even when the model is adequate. A simultaneous envelope addresses that issue by calibrating a maximum deviation across components.
State the GLMM, the discrepancy vector, whether random effects are held fixed or redrawn, and whether each replicate is refitted.
Generate each bootstrap response under the chosen scheme, then calculate the same summaries using the same analysis rule as for the observed data.
Use empirical quantiles for pointwise limits, or a calibrated maximum-deviation statistic for simultaneous limits. Report the observed summaries and the simulation settings.
Justification and Simultaneous Limits
The basis of a pointwise envelope is the bootstrap distribution of a summary under the fitted model. If model parameters were known and the simulation exactly reproduced the data-generating process, the observed data and independent simulated data sets would have the same distribution. Thus their summary values would be exchangeable, and an interval covering the central 95% of that distribution would contain a new summary about 95% of the time, apart from discreteness and Monte Carlo error. With estimated parameters, the procedure is a plug-in approximation: estimating \(\theta\) can change the distribution, so this coverage is not an exact guarantee in general.
For a simultaneous envelope, first estimate a center \(m_j\) and scale \(s_j\) for each component from the bootstrap summaries, such as the bootstrap mean and standard deviation. For replicate \(b\), calculate the maximum absolute standardized deviation \(M^{(b)}=\max_j |(T_j^{(b)}-m_j)/s_j|\). Let \(c\) be the empirical 95th percentile of these maxima. Display limits \(m_j-cs_j\) and \(m_j+cs_j\). Since every component’s standardized deviation is no greater than the maximum, a simulated vector with \(M^{(b)}\le c\) lies inside all these limits. This calibration aims for 95% joint coverage under the bootstrap distribution, subject to plug-in and Monte Carlo approximation. Components with zero or extremely small simulated spread need special handling; division by zero does not define a standardized deviation.
Worked Example: Pointwise Envelope for Grouped Counts
Suppose a hypothetical Poisson random-intercept GLMM is used for event counts in five prespecified groups of observations. The conditional mean for observation \(i\) in cluster \(k\) is \(\exp(\beta_0+\beta_1x_{ik}+b_k)\), and the random intercepts are modeled as independent \(N(0,\sigma_b^2)\). Assume conditional Poisson outcomes given the random intercepts and the fitted model’s stated covariates and cluster structure. An unconditional plug-in bootstrap draws new random intercepts and outcomes in each of \(B=999\) replicates, without refitting because the target is the fitted-model distribution of the five grouped counts. The observed counts are \(4, 7, 9, 13, 18\).
Suppose the empirical pointwise 2.5th and 97.5th percentiles from the 999 replications are respectively \((2,8)\), \((4,11)\), \((6,13)\), \((8,17)\), and \((12,23)\). The observed count in group 1, \(4\), is between 2 and 8. The observed counts in groups 2–5 are also within their respective intervals: \(4\le7\le11\), \(6\le9\le13\), \(8\le13\le17\), and \(12\le18\le23\).
Thus no group count is outside its pointwise envelope. This does not establish that the model is correct, nor does it establish 95% joint coverage across all five groups. It says that each observed count is individually within the corresponding central bootstrap range for this particular unconditional, fixed-parameter simulation scheme.
Worked Example: Residual Summary With Refitting
In a hypothetical sparse binary-outcome analysis, consider a GLMM with a logit link, fixed covariates, and a normally distributed random intercept for each cluster. Assume independent binary responses conditional on the random intercept, and assume the random intercepts follow the fitted normal distribution. The diagnostic is the largest absolute Pearson residual across observations, \(T(Y)=\max_i |r_i|\), where each Pearson residual is computed using the fitted mean and variance. Use unconditional replications and refit the GLMM to every replicate before calculating \(T\). Refitting makes the simulated residual summary follow the same fitting-and-diagnostic process as the observed one.
Suppose the observed maximum is \(T(Y)=2.31\). In \(B=999\) bootstrap replicates, 37 refitted maxima are at least 2.31. The plus-one Monte Carlo estimate of the upper-tail probability is
The observed maximum is unusually large relative to this bootstrap reference: only about 3.8% of the simulated maxima were at least as large, using the plus-one estimate. This is a diagnostic tail proportion, not the probability that the model is true. It also depends on the GLMM, unconditional replication, refitting rule, and chosen maximum-residual summary.
Worked Example: Simultaneous Envelope for Residual Means
For a hypothetical clustered count analysis, define four residual summaries as mean residuals in four prespecified covariate groups. Assume the fitted GLMM’s conditional count distribution and random-effects distribution are the simulation model; generate unconditional replicates and refit each one. Suppose the 999 bootstrap residual means have centers \(m=(0.00,0.02,-0.01,0.01)\) and standard deviations \(s=(0.10,0.12,0.08,0.10)\). The observed means are \(T(Y)=(0.18,0.10,-0.13,0.05)\).
The observed standardized deviations are calculated component by component:
The observed maximum absolute standardized deviation is \(\max(1.80,0.667,1.50,0.400)=1.80\). Suppose the 95th percentile of the bootstrap maxima is \(c=2.45\). Since \(1.80<2.45\), none of the observed summaries falls outside the simultaneous envelope. For the first group, for example, the simultaneous limits are \(0.00\pm2.45(0.10)\), or \([-0.245,0.245]\); its observed mean, 0.18, is inside. The same standardized comparison applies to each of the other groups. This is a joint rather than four separate pointwise comparison.
Diagnostics, Alternatives, and Limitations
A useful envelope needs more than a plotted band. Report the GLMM and its fitted parameters or fitting method, the number of replicates, the conditional or unconditional scheme, the refitting rule, the definition of the summaries, and the quantile convention. If the envelope is estimated from few replicates, its limits can be noisy. For a 95% interval from \(B=199\), only about five simulated values are expected in each 2.5% tail; \(B=999\) gives about 25 per tail. Increasing \(B\) reduces simulation error but does not repair a misspecified model or an unsuitable diagnostic.
Check for fitting failures and implausible replicate behavior. If some simulated data sets produce convergence failures, separation, boundary estimates, or undefined summaries, the successful replicates may no longer represent the intended bootstrap distribution. Do not silently discard such replicates. Investigate whether the fitting procedure is unstable, state the failure rate, and use a principled, consistent rule for handling failures. Also check that observed and replicate summaries use identical bins, residual definitions, and covariate grouping.
The main alternatives answer related but different questions. A pointwise envelope is easy to interpret locally, but does not adjust for inspecting many summaries. A simultaneous envelope controls the joint range for a specified vector, but can be wider and depends on how that vector is defined. A single discrepancy statistic compresses the data into one number and may be easier to summarize, but can conceal where the model misses. Conditional simulations isolate outcome variation given estimated cluster effects; unconditional simulations additionally reflect random-effect variation. Neither target is universally preferable: the choice follows the diagnostic question.
A parametric bootstrap is a frequentist plug-in procedure based on a fitted model. It is not a posterior predictive check, which averages predictions over a posterior distribution of parameters. It also cannot verify the random-effects distribution or response distribution merely by generating data from them: the envelope evaluates the observed data against assumptions already built into the generator. Sparse outcomes, few clusters, weakly identified variance components, and boundary estimates can make the bootstrap approximation fragile. Interpret an outlying summary as a reason to investigate the particular pattern, not as an automatic instruction to add a specific model component.
Common Mistake
Wrong reasoning: “All observed summaries lie inside their 95% pointwise intervals, so the whole model has passed a 5% test.” This treats separate intervals as a joint 95% region and treats a diagnostic as a binary certification. With many summaries, even a well-fitting model may produce one pointwise crossing; conversely, an envelope may miss a discrepancy that the chosen summaries do not capture.
Correction: Name the target and limits precisely. For a family of summaries, use a simultaneous envelope when joint containment is the goal, and explain that its calibration is still conditional on the fitted model and bootstrap procedure. Regardless of envelope type, examine the shape and location of discrepancies and use subject-matter and design knowledge to interpret them.
Check Your Understanding
Answer each question, then compare with the solutions below.
- What is the key difference between a pointwise and a simultaneous 95% envelope?
- A residual summary depends on fitted values. Why might each bootstrap replicate need to be refitted?
- In 999 replicates, 24 summaries are at least as extreme as the observed one. Calculate the plus-one bootstrap tail proportion.
- An unconditional bootstrap draws new random effects as well as outcomes. What variation does this add compared with conditional replications?
- Does observing every point inside separate 95% pointwise intervals imply 95% joint coverage? Explain.
Solutions. (1) A pointwise envelope gives a separate marginal interval for each component; a simultaneous envelope is calibrated to cover the specified vector jointly at the target level under the bootstrap procedure. (2) Refitting reproduces the estimation step that affects the residuals and their distribution; the observed and simulated summaries should follow the same analysis rule. (3) \((1+24)/(999+1)=25/1000=0.0250\), or 2.50%. (4) It includes variation from drawing cluster effects under the fitted random-effects distribution, in addition to conditional outcome variation. (5) No. Separate 95% intervals do not generally provide 95% probability of covering all components together.