With known covariance parameters, best linear unbiased prediction minimizes prediction-error variance over linear predictors that are unbiased over both observation errors and random effects, for every fixed-effect value. In a Gaussian linear mixed model, the random-effect predictor is , where generalized least squares estimates the fixed effects. Plugging in covariance estimates gives an empirical predictor; its uncertainty must also account for estimating those covariance parameters. It differs from a best linear unbiased estimator of an unknown fixed coefficient.
In a hierarchical Bayesian model, replication conditional on fitted observation-level random effects checks the sampling layer. Replication with fresh random effects drawn from their population law also checks the population mean and variation. To assess a dose-response curve, sample the global parameters from their posterior distribution, draw fresh effects for new plates at each existing dose, and compare replicated means, spreads and trend discrepancies with the observed values. Reusing the fitted plate effects can conceal a misspecified mean curve by reproducing deviations those effects already absorbed.
For , this error correlation decreases exponentially with elapsed time and permits irregular observation times. It is the stationary correlation of an Ornstein-Uhlenbeck process. Within a Gaussian linear mixed model, apply it to the errors conditional on random effects; the marginal correlation also includes those effects. nlme::corCAR1 parametrizes the same correlation by and permits separate grouped time series.
Fixed effect 2026-10-06
A fixed effect represents an unknown nonrandom coefficient in the specified mean model. In a Gaussian linear mixed model, is the population mean, while random effects are latent draws from a distribution whose parameters are estimated. Treating a group coefficient as fixed or random concerns the modelling and inferential target, not whether its estimate changes across samples.
Gaussian linear mixed model Created 2026-10-06 Updated 2026-10-14
A Gaussian linear mixed model combines fixed effects, random effects with a normal distribution, and independent Gaussian noise. For and independently, its marginal distribution is with . The random effects induce dependence among observations sharing their design columns. A random-intercept linear mixed model and a random-slope linear mixed model are special cases.
Generalized additive mixed model Created 2026-10-05 Updated 2026-10-06
A generalized additive mixed model supplements smooth population effects with latent random effects. Given these effects, responses follow a specified response family; integrating them out induces dependence between related observations.
Mixed model Created 2026-10-20 Updated 2026-10-25
A statistical model combining fixed effects with random effects. The grouping structure determines the correlations represented by the model.
Nested measurements 2026-10-18
Nested measurements are responses grouped inside larger units, with each measured object belonging to just one such unit. Three leaves within each pot give nested measurements; repeatedly reading one leaf gives another level of repetition. Either can yield clustered data. A common random effect can describe the shared influence of the containing experimental unit.
For the constructed pot example, label treatments by , pots within each group by , and leaves within each pot by . Consider the statistical model
Here is a leaf length, is its group expected value, is a pot random effect, and describes remaining variation among leaves and measurement error. Assume that all pot random effects are mutually independent, all remaining errors are mutually independent, and the two collections are independent of one another and of the randomization. These are explicit modelling assumptions, conditional on the assigned treatments; no normal distribution assumption is needed for the following variance calculation.
Two distinct leaf measurements in one pot share . Their covariance is , their individual variance is , and their intraclass correlation coefficient is
Measurements from different pots have zero covariance and are independent under the stated statistical model. Statistical independence therefore concerns the whole response structure, not just the fact that the measured leaves are different objects.
Normality (statistics) Created 2026-10-20 Updated 2026-10-25
A normality assumption specifies a normal distribution for the relevant observations, errors, or latent effects. These are different assumptions: normal latent random effects do not imply that the observed response is normal. Estimated regression residuals or fitted random effects are not independent copies of the underlying errors or effects.
For observation of bird in year , a Gaussian linear mixed model with crossed random intercepts is
where the , , and are mutually independent random variables. Here is age, is the population intercept at age zero, and is the change in conditional expected value per year of age. The capture persistent between-bird variation, the capture shared annual conditions, and the regression residuals capture remaining observation-level variation. Two observations from the same bird share covariance ; two from the same year share , with both contributions present if both group labels agree. The model also assumes the random effects are independent of the age covariate.
Conditional predictions for observed birds and years add their fitted random intercepts to the fixed part of the Gaussian linear mixed model:
These are predicted expected values, so they need not be integers. The first is likely more reliable: age three is within the displayed age range, whereas age seven requires extrapolation beyond ages one to six. A quantitative comparison would need the prediction intervals, including uncertainty in both fixed coefficients and random effects; the displayed coefficients alone do not supply them.
A frailty model represents unobserved individual heterogeneity by a random effect in the hazard function. In a proportional frailty model, an individual with frailty random variable has hazard . The normalization identifies the scale of the baseline hazard: without it, multiplying all frailties by a constant and dividing by that constant would leave all individual hazards unchanged.
Let . Conditional survival follows by integrating the hazard function:
Taking the expectation over the frailty law yields
This is the Laplace transform of the frailty density evaluated at the cumulative hazard. More generally, the same calculation integrates against a probability measure, allowing atoms. It averages conditional survival rather than substituting into its exponent. Indeed, the frailty distribution among survivors is proportional to , giving population hazard
Survival progressively selects smaller frailties, so the population hazard need not be the baseline or even retain the individual's proportional structure.
For the cure model, first take . The necessary mean-one frailty law and baseline hazard are
Then . A cured person's conditional hazard is zero, while a susceptible person's conditional hazard is . Taking to be zero or one while leaving would instead have mean frailty and violate the required normalization.
The frailty law is the measure
where the terms are Dirac measures. This is not an ordinary Lebesgue density; the cure construction requires permitting a discrete frailty law. Its Laplace transform is
Writing , we have , and therefore
If , the susceptible class eventually experiences the event and . If , the limiting survival is larger than because some susceptible subjects also never experience the event. At , everyone is cured: set and, for example, to retain mean one, giving without using the singular formula .
Model the count relative to exposure, for example
Here is a measured exposure such as patient-days, contains hospital predictors, and is a random effect. This Poisson regression separates hospital size from rate variation and supplies partial pooling. Use proper, scale-appropriate priors on coefficients and variation; add regional or temporal effects if the data demand them. A gamma mixing law with an estimated shape is another way to allow more flexible overdispersion. Compare the fitted model's counts and dispersion through posterior predictive checks.
Model B replaces independent tree parameters by multivariate normal random effects. It permits correlated asymptote, timing and slope variation and supplies partial pooling, a useful improvement if the five trees can be regarded as exchangeable.
The Wishart distribution prior is on the precision matrix , not the covariance matrix. In the WinBUGS convention, dimension three and degrees of freedom three give a proper but very dispersed prior. The induced inverse-Wishart distribution has no finite mean at those degrees of freedom. Thus this is not a neutral choice of covariance prior, and estimating six covariance components from only five trees is weakly informed. The broad mean priors and possible negative growth slopes also remain. Check prior-predictive curves and sensitivity, and consider separate, interpretable scale and correlation priors.
The resulting posterior means of the second and third parameters are quite similar across trees, motivating a simpler shared-shape model; their uncertainty means this similarity is evidence to explore, rather than a proof of exact equality.
Keep a tree-specific log asymptote with a normal population distribution, but use one shared location and one shared positive growth coefficient . For example, with fixed prior constants chosen on meaningful scales:
mean.a ~ dnorm(m.a, precision.a.prior)
sd.a ~ dnorm(0, precision.sd.a) T(0,)
precision.a <- 1 / pow(sd.a, 2)
b ~ dnorm(m.b, precision.b.prior)
k ~ dnorm(m.k, precision.k.prior) T(0,)
sigma ~ dnorm(0, precision.sigma.prior) T(0,)
precision.y <- 1 / pow(sigma, 2)
for (i in 1:5) {
    a[i] ~ dnorm(mean.a, precision.a)
    for (j in 1:7) {
        fitted[i,j] <- exp(a[i]) / (1 + exp(-b - k*t[j]))
        Y[i,j] ~ dnorm(fitted[i,j], precision.y)
    }
}
Here the transformed days t[j] are supplied as data. This is Model C: only the log asymptote is a random effect, while location and growth rate are shared. The prior constants are fixed inputs, and the truncations give positive standard deviations and an increasing growth curve. One can retain the original error-precision prior for a comparison matching the supplied fits; the code above illustrates a more interpretable positive-scale alternative.
Let . The Poisson-lognormal random-effect model assigns each plate a random intensity . Conditional on that intensity its Poisson distribution has mean and variance both , but marginalizing over the normal distribution of the random effect gives
The law of total variance yields
This exceeds the mean whenever . The independent plate effects supply additional heterogeneity without inducing dependence between plates conditional on the global parameters. Also is the median random intensity, not its marginal mean; the factor matters for population predictions.
Delete the plate random effects from the linear predictor and remove their stochastic nodes and the unused scale/precision nodes. The observation layer then remains a Poisson distribution with
For example the essential WinBUGS observation block can be written as
for (i in 1:doses) {
for (j in 1:plates) {
y[i,j] ~ dpois(mu[i,j])
log(mu[i,j]) <- alpha + beta*log(x[i]+10) + gamma*x[i]
}
}
Retain the coefficient priors. This is the sampling model implemented directly; attempting to keep 1/(tau*tau) while fixing tau to zero would divide by zero.
Under the common observation-level Bayesian deviance convention, DIC is , with the effective parameter count in DIC defined by . The no-random-effect model's effective count is near three, corresponding to its three fitted regression coefficients. With plate random effects, the effective count rises to : the local effects add flexibility, but their partial pooling means they do not count as eighteen fully independent unrestricted fitted parameters. The effective count need not be an integer or equal the raw parameter count; the scale parameter controls that shrinkage.
Adding the plate effects reduces the average Bayesian deviance by at an effective-complexity cost of . Therefore its DIC is lower by
The reported criterion favours the overdispersed model. This is a fit-complexity comparison, not a posterior probability or Bayes factor. In a hierarchical Bayesian model, the interpretation depends on whether deviance is conditional on local effects or has marginalized them out; these figures use the supplied observation-level convention.
For each plate use its conditional fitted intensity, including the fitted random effect. At a posterior draw form the Pearson residual
A simpler plot uses in this expression, but posterior draws also display uncertainty in the fitted values. Look for residuals centred around zero, unexpectedly large tails or isolated outliers, and patterns with dose, fitted intensity or plate grouping. For known conditional parameters the Poisson distribution gives mean zero and variance one for this residual; approximate normality is reasonable only at adequate count sizes. Fitting the same data and estimating latent effects changes its calibration, so compare the diagnostics with residuals from conditional posterior predictive checks, rather than treating them as independent exact standard normals.
This checks the plate-level Poisson sampling layer given the effects and can reveal remaining unmodelled variation. It does not by itself establish the population dose-response curve: fitted plate effects can absorb departures from that curve.
The moment-based approach specifies marginal means, variances, and within-student covariances, without supplying a joint probability distribution for each count profile. It is a quasi-likelihood or generalized estimating equation strategy. The parameter interpreted as a structural-zero fraction is not automatically an actual probability of a structural-zero component merely because it appears in the moment formulas. A valid positive-definite working covariance and parameter identifiability must also be checked.
The printed covariance specification is not admissible for all the stated parameter values. For example, take , , and all three component means equal to 10. It gives diagonal variance 80 and off-diagonal covariance 100, so . A covariance matrix cannot have a negative variance in any direction. Thus the moment approach requires additional admissibility restrictions or a valid working covariance; the parameter ranges alone do not define a valid model. This does not alter the hierarchical model, whose covariance derived below is positive semidefinite.
The alternative gives a full hierarchical mixture distribution, specifically a shared zero-inflated Gamma-Poisson count model: a common student random effect is zero with probability , and otherwise has a Gamma distribution with mean 1 and variance . Conditional on this effect, the three counts are independent Poisson random variables. Integrating it out induces both excess zeros and positive within-student dependence. Zero inflation is shared for the whole student, rather than independently reselected in each term. This full distribution supports likelihood-based inference but is more sensitive to the distributional assumptions.
The marginal mean in the hierarchical model has the same form as the proposed moment mean. Its marginal covariance does not, in general, equal the printed working covariance; the law of total covariance calculation below makes the distinction explicit. At the Gamma component is interpreted as its point-mass-at-one limit. At all counts are zero, and the log-mean parameterization and regression effects are not identifiable.