A logistic regression fitted to ungrouped Bernoulli observations has residual deviance . Comparing it automatically with is generally invalid: the saturated dimension grows with , with one observation per fitted probability. If the true model has only an intercept and success probability , then , whereas . Fixed-dimensional nested-model likelihood-ratio tests can still use Wilks theorem under regularity. For absolute fit, use meaningful grouping, residual diagnostics, or a fitted-model parametric bootstrap.
Kolmogorov-Smirnov test 2026-10-14
The one-sample Kolmogorov-Smirnov test checks goodness of fit by comparing an empirical distribution function with a specified cumulative distribution function . Its Kolmogorov-Smirnov statistic is the largest vertical gap anywhere between the two curves. Every threshold asks the same concrete question: what proportion of the observations are at or below it, and what probability does the proposed probability distribution assign there? A large discrepancy supplies evidence against the null hypothesis.
For example, four stipulated observations compared with the uniform distribution on give . Just before , only two observations have been counted, so the empirical distribution function approaches , while approaches . The Kolmogorov-Smirnov statistic section calculates every jump-side gap. These are exact illustrative numbers, not experimental measurements or a claim of statistical significance.
The ordinary one-sample calibration assumes independent and identically distributed real observations and a simple hypothesis , with a continuous function fixed before inspecting these observations. All statistical parameters of must be specified.[ref] Under that null hypothesis, the probability integral transform gives with the uniform distribution on , retaining independence. Consequently the sampling distribution of depends on the sample size , but not on the particular continuous . This is the useful sense in which the calibration is distribution-free.
For the exponential distribution of rate one, for . Take for the four stipulated above. The probability integral transform changes the horizontal coordinates but preserves both the order statistics and their cumulative heights, so the same Kolmogorov-Smirnov statistic appears on both scales. More generally, for continuous , the jump-side formulas depend only on . Strict increase everywhere is unnecessary: intervals on which is constant have probability zero under the null hypothesis. This explains the invariance without assuming a strictly positive probability density function.
Figure 1.
The probability integral transform preserves the Kolmogorov-Smirnov gap on exponential and uniform scales
. The same four stipulated points are shown as on the left and on the right. Open circles indicate left limits of the empirical distribution function, filled circles its values. The gap is approached from below the third observation on both scales. Details.
The observed Kolmogorov-Smirnov statistic is a discrepancy, whereas its p-value is a tail probability under the null hypothesis:
Here is computed from a fresh sample of the same sample size. Choose a significance level before the test and reject when the calibrated p-value is at most . The value alone supplies neither a p-value nor a rejection decision. Failure to reject does not establish that the null hypothesis is true. A finite-sample calibration and the asymptotic Kolmogorov-Smirnov theorem are distinct; a cutoff for must be rescaled before use with .[ref]
Fitting statistical parameters on the tested observations replaces by the random . The resulting transformed observations need not be independent and identically distributed uniforms, so the ordinary reference law fails. The Lilliefors test addresses a particular fitted normal distribution. More general parametric bootstrap calibration must simulate from the fitted statistical model and repeat the fitting in every replicate; holding the fitted statistical parameters fixed during those comparisons calibrates a different procedure. Such a parametric bootstrap requires its own validity justification rather than inheriting exactness from the simple-null test.
For a discrete probability distribution, is generally not uniform. Equal observations also arise from rounding, so tied data require a calibration that accounts for the discrete probability distribution or the rounding rule. The discrepancy remains meaningful, but continuous-null p-values are not automatically valid. Statistical dependence likewise changes the reference law. The two-sample Kolmogorov-Smirnov test compares two empirical distribution functions and has a different calibration.[ref]
For logistic regression, set and . Its Bernoulli log-likelihood, score function and Fisher information are
where . Solve by Fisher scoring or iteratively reweighted least squares. One scoring step is
Equivalently regress the working response on using weights . Iterate until the likelihood and coefficients stabilize, with rank and convergence checks. Separation in logistic regression can prevent a finite maximum: if a predictor direction strictly separates the zeros and ones, moving indefinitely along it improves the likelihood rather than producing a finite root.
Under the unrestricted model, each individual probability is estimated independently as . Every observed binary outcome then has probability one, so, using boundary limits,
The resulting residual deviance is . It is a legitimate likelihood contrast and can be used to compare fitted models. However, individual Bernoulli deviance need not have a chi-squared calibration: the saturated model has one boundary-valued parameter for each single observation, and its dimension grows with . The fixed-dimensional regularity behind Wilks theorem does not justify a reference here.
For a concrete demonstration, let the true model contain only an intercept and have success probability . Its fitted probability is , and
whereas a variable divided by converges to one. Thus treating the raw Bernoulli residual deviance as an ordinary absolute goodness-of-fit statistic can reject a correct model systematically. In contrast, deviance differences between fixed-dimensional nested logistic models have their usual asymptotic chi-squared reference under the relevant regularity assumptions. For absolute fit use meaningful replicated covariate groups and grouped-binomial logistic regression, or assess residual patterns and prediction on held-out data; a model-specific parametric bootstrap can calibrate a chosen statistic.
Use for the expected accident count, not for the accident rate. With a design row consisting of an intercept, seven non-reference site indicators and the after-treatment indicator,
Here is a known generalized linear model offset, with coefficient fixed at one. Differentiating the Poisson regression log-likelihood gives the score function equations
These nine equations estimate the intercept, seven site contrasts and one treatment contrast, with the stated reference-level constraints.
The Fisher information is , where . A Fisher scoring update adds to the current coefficient vector. In iteratively reweighted least squares, the working response is ; regress on the design with weights . Thus the reported four iterations solve the likelihood equations while accounting for unequal exposure periods.
The common adjusted rate ratio is obtained by exponentiating the after coefficient:
This estimates a lower accident rate after the intervention, conditional on the additive site model. The standard error gives normal Wald statistic , two-sided , and an approximate confidence interval for the rate ratio
The label t value is again a normal-reference Wald ratio under fixed Poisson dispersion, rather than an exact Student statistic.
The intercept gives the before rate at reference site one: accidents per year. The seven site coefficients are log baseline-rate ratios relative to that site. In site order two through eight, their exponentials are about . The third site has the largest estimated rate and a nominal Wald ratio about against the reference. These are adjusted baseline comparisons, not differences in absolute accident counts. The overall unadjusted before/after rate ratio is , and it differs from because site risks and their relative exposure weights differ.
An independent way to solve the fit is the profile likelihood for a common Poisson rate ratio with unequal exposures. Put and . For fixed , the site score gives . The remaining equation is
Its positive root reproduces the reported treatment estimate. Comparing the same site model with to the fitted model gives a deviance improvement about on one degree of freedom, with nominal likelihood-ratio .
There are count observations and fitted mean parameters, leaving residual degrees of freedom. The null deviance on degrees of freedom is for the intercept-only rate model, still including the exposure offset. The residual Poisson deviance is on degrees of freedom. A chi-squared comparison gives approximately , suggesting potential lack of fit of a single common treatment ratio; the extreme deviance residuals near and also deserve inspection. Several after-cell expected counts are below one or near two, so this absolute-fit calibration is only approximate. Site-specific treatment effects, overdispersion or temporal dependence are possible explanations to investigate, with a parametric bootstrap available to calibrate the sparse-count fit statistic. A before/after association alone does not isolate a causal effect from secular changes or regression to the mean at selected sites.
The first fit is a Bernoulli logistic-regression model for the probability of a positive response. Its fitted linear predictor is
and its fitted probability is . There are eight coefficients. The null degrees of freedom identify , and the residual degrees of freedom are .
Each slope is a change in the log odds per unit of its covariate, holding the others fixed. Exponentiating gives conditional odds ratios; for example a ten-unit glucose increase multiplies fitted odds by , and a ten-year age increase by . These are changes in odds, not multiplicative changes in probability, and the observational associations are not automatically causal effects. The intercept corresponds to all numerical covariates being zero, generally an extrapolation beyond meaningful subjects.
The standard errors come from the inverse Fisher information matrix of the logistic regression. With binomial dispersion parameter fixed at one, the displayed t ratios are asymptotic normal Wald statistics. In the full fit, glucose and the pedigree measure have clear individual evidence of nonzero slopes, with two-sided and . The body-mass and age terms are borderline, with and ; pregnancy count is weaker, . Blood pressure and skinfold have little individual evidence after adjustment. These labels should not be converted into a claim that the weaker predictors have no effect, or used as automatic model-selection rules.
A deviance residual here is
Its square is the observation's contribution to binomial deviance, so the squared residuals sum to the printed residual deviance. The five-number summaries describe the distribution of these signed residuals. The null deviance belongs to an intercept-only logistic regression; the full fitted deviance is . Four Fisher scoring iterations record convergence of the numerical likelihood fit.
The second model uses only glucose:
Its two coefficients leave residual degrees of freedom. A ten-unit glucose increase multiplies its fitted odds by . This differs from the adjusted multiplier , because the models condition on different covariates; both adjustment and noncollapsibility of the odds ratio can change logistic coefficients. The glucose-only model has deviance , so its maximized log-likelihood is lower than the full model's.
For these fixed-dimensional nested models, analysis of deviance and Wilks theorem give
Thus the additional six predictors collectively improve the glucose-only model, even though several individual Wald tests are not significant. These comparisons assume independent subjects, an appropriate logistic mean structure, full rank, and regular finite parameter estimates without separation.
It would be incorrect to infer that absolute fit is good merely because . Individual Bernoulli deviance need not have a chi-squared calibration: there is just one binary observation per saturated probability, and the saturated dimension increases with sample size. A simple counterexample is an intercept-only model with true probability , for which , not one. For absolute adequacy, inspect residual patterns and predicted-risk calibration, use meaningful grouped comparisons when appropriate, or calibrate a chosen fit statistic by parametric bootstrap. The regular nested-model tests above are not subject to that saturated-model dimensionality problem. Only the displayed summaries and a few example rows are supplied, so patient-level diagnostics or complete numerical refitting cannot be reconstructed from this page alone.
Use for the intercept, to avoid confusing it with the observation means. Let be the fitted Poisson regression mean. Apart from constants, its log-likelihood is
At a finite interior maximum-likelihood estimate, the intercept score equation gives the Poisson regression margin-matching score equations:
The statistical saturated model fits each mean to , taking the boundary mean zero if . Subtracting fitted from saturated log-likelihood gives the Poisson deviance
The intercept balance cancels the sum of linear terms. Consequently
The unsimplified formula makes nonnegativity transparent; individual terms in the simplified formula need not each be positive.
For the deviance goodness-of-fit test, if the fitted design has rank , compare a suitably calibrated with , rejecting for large values. This approximation applies in a regular large-count regime, such as a fixed set of cells with increasing exposure and positive fitted proportions. It is not automatically accurate for many sparse Poisson observations. Check residual patterns and overdispersion; where the approximation is doubtful, simulate independent Poisson random variables with fitted means, refit each sample, and use a parametric bootstrap distribution of the same statistic. A large p-value means no detected lack of fit, not proof of the model. If a finite interior estimate fails to exist, the score proof needs a boundary-limit interpretation; for example all-zero data give a supremum with every fitted mean tending to zero and limiting deviance zero.
For , independence and the uniform distribution give . Consequently, for fixed and ,
For the survival probability is one. Thus the scaled endpoint gap converges in distribution to a unit-rate exponential law; it is not exactly exponential at finite .
The plug-in estimator principle replaces the unknown sampling distribution by its empirical distribution and evaluates its population functional at that fitted distribution. Here the fitted support endpoint is , also the maximum-likelihood estimate: the likelihood is and decreases over its allowed support. For an empirical bootstrap sample , the corresponding gap is
Almost surely the original maximum is unique. The bootstrap gap equals zero precisely when this observation is selected at least once, so
The true limiting exponential distribution has no atom at zero. This nonvanishing discrepancy proves bootstrap failure for a uniform endpoint: the bootstrap distribution cannot converge to the correct limit, even though the endpoint estimate itself is consistent. It fails to recreate the unsampled population tail beyond the observed maximum. A parametric bootstrap drawing from , rather than from the discrete empirical sample, reproduces the scaled-gap law here.
For a fully specified continuous null distribution , compare the empirical distribution function with . The probability integral transform makes iid uniform under the null, giving distribution-free calibration. Three common discrepancies are
These define the Kolmogorov-Smirnov test, Cramér–von Mises criterion and Anderson–Darling test, respectively. Reject for large values. The supremum detects the largest discrepancy, the unweighted integral combines discrepancies throughout the distribution, and the reciprocal weight emphasizes the tails.
The Donsker theorem for empirical distribution functions gives for a Brownian bridge , with covariance . Consequently the standard continuous-null limits are , , and for , respectively; the weighted last limit also requires control near the endpoints. Exact finite-sample or asymptotic null quantiles provide critical values.
If parameters in are estimated from the same observations, these fully specified-null critical values generally fail. A first-order expansion is
so the estimated parameter changes the limiting process. One must use the fitted-model null law, adjusted asymptotic theory, or a parametric bootstrap that re-estimates the parameters in each replicate.
Index city by and age group by , with the youngest group the reference level. For each of the 15 observed cells, the grouped-binomial logistic regression assumes
with independent cell counts. The response supplied to R is , and the weights specify the binomial numbers of trials . They are not 15 arbitrary precision weights: the conditional variance of the proportion is . The logit link models log odds, and the two sets of factor coefficients use corner-point constraints.
There are nine parameters: one intercept, seven age contrasts and one city contrast. Hence the residual degrees of freedom are , not the total population minus nine. The null model has only an intercept and residual degrees of freedom. Adding age uses seven more parameters and reduces the binomial deviance from to , a drop of . Adding city then uses one parameter and reduces it by to . These are sequential likelihood-ratio tests, asymptotically compared with chi-squared distributions on seven and one degrees of freedom. Both provide extremely strong evidence of an effect; the printed age p-value is rounding, not an exactly zero probability. Because the table is incomplete, sequential main-effect sums need not be invariant to the order of fitting.
The intercept estimate is the log odds for the youngest Minneapolis–Saint Paul group. It implies baseline odds and a fitted probability about . Its standard error is ; its reported Wald test tests log odds zero, or probability , rather than a scientifically interesting comparison of groups.
The age coefficients are log odds ratios relative to the youngest group within the same city. Their exponentials are approximately , , , , , and as age increases through the seven other groups. All these comparisons have large positive Wald statistics and small p-values. Thus the fitted probabilities are much higher in the older groups than in the youngest group. The slightly smaller coefficient in the oldest group than in the preceding group does not itself prove a real decline: that claim needs a contrast and its standard error, including the covariance of the two estimates.
The city coefficient is the log odds ratio for Fort Worth relative to Minneapolis–Saint Paul, adjusted for age. Its standard error gives , so the null city effect is strongly rejected by the Wald test, consistent with the sequential likelihood-ratio test. The fitted constant-over-age city odds ratio and an approximate 95% confidence interval are
This is an odds ratio, not generally a probability ratio. The probabilities here are sufficiently small that the two ratios are close. The absence of an age-by-city interaction is an assumption of the fitted additive log-odds model.
The final binomial deviance is on six degrees of freedom; its approximate upper-tail p-value is . It gives no indication of substantial lack of fit against the saturated observed-cell model. The deviance residuals range from to , with median zero and no conspicuously large value in the five-number summary. Neither statement proves that every model assumption holds. In particular, the small case counts motivate checking the accuracy of the chi-squared asymptotic approximation, for example by a fitted-model parametric bootstrap.
The dispersion is fixed at one by the binomial distribution; it was not estimated as a free scale parameter. Four Fisher scoring iterations describe the numerical optimization, not four additional parameters. Residual and cellwise observed-versus-fitted comparisons would help assess adequacy and potential overdispersion.
Center time at 2008 by setting , and initially ignore the explanatory covariates. A Poisson generalized linear mixed model addressing both heterogeneity questions is
Here describes between-village variation of log rates in 2008, while describes heterogeneity of annual log-rate changes. The latent 2008 rate has median , mean and coefficient of variation . A central 95% interval for latent village rates is ; the corresponding interval for village-specific annual rate ratios is . These describe heterogeneity, not confidence intervals for estimated fixed effects.
Fit an intercept-only random-effects model and then add a correlated random slope. Compare them with a parametric bootstrap of the likelihood improvement: the null slope variance is on the boundary, so an ordinary fixed-effect chi-squared reference is not automatically valid. Inspect uncertainty in both variance components, shrinkage of village-specific estimates, residual overdispersion and remaining serial correlation. A negative-binomial conditional model can distinguish additional within-village count variation from persistent village differences when the data support it.
By the marginal mean of a Poisson random-slope model, the marginal log rate is , so marginal curvature can arise even when each village has a straight conditional log trend. Numerical variance estimates and evidence of heterogeneous slopes cannot be obtained for 32 villages from two displayed trajectories.
Use the population as exposure regardless of whether a population-size category is also a covariate. Define a demographic factor with levels for at most 20%, for %, and above 30%; define if following the suggested population dichotomy. Treat village-size codes as a categorical variable, not equally spaced areas.
A candidate multivariate Poisson generalized linear mixed model retains the random intercept and slope from part (c) and uses
This specifies the suggested village-size-by-population interaction while keeping its main effects. One may add selected time-by-covariate interactions to explain slope heterogeneity, provided information from 32 clusters supports them. Compare continuous demographic and population formulations as a sensitivity analysis: categorization loses information, and the coefficient of a size category measures association beyond the already included exposure effect.
Fit models with the same likelihood convention and conditional distribution when comparing Akaike information criteria; use joint fixed-effect likelihood-ratio tests, boundary-aware parametric bootstrap tests for random effects, residual diagnostics and village-level cross-validation to justify a parsimonious final model. Preserve interactions' main effects and report interval estimates from the final multivariate model, rather than interpreting separate univariate fits. For example, the adjusted inland-versus-coastal rate ratio is , while a medium-versus-small village ratio is ; a Wald interval for that contrast uses the full coefficient covariance matrix. Conditional time effects and standardized marginal predictions should be distinguished.
The displayed rows cannot identify this final model: population exceeds 250 in every displayed village-year, no large village is shown, and inland status is confounded with the identity of the two displayed villages. The complete 160-row file is needed for fitted effects, model selection, all-village plots and uncertainty. No numerical best model or evidence of the specified covariate associations can honestly be reported from this excerpt.
Finally, even a significant adjusted association with young-male percentage would not show that young males were involved in most incidents. This is the ecological fallacy, specifically that aggregate composition does not identify offender composition: the same village counts can be assigned to different individual age and sex groups without changing any observed aggregate predictor. Individual incident-level age, sex and involvement records are required to answer that last question. The aggregate dataset cannot establish the claimed majority involvement.
The saturated model estimates each Poisson mean separately as , permitting the boundary value zero when . Subtracting fitted from saturated log-likelihood gives the Poisson deviance
with . A zero observation contributes . If the model includes an intercept, the score equation gives , so the summed linear terms cancel; the unsimplified expression applies generally.
For goodness of fit, the null hypothesis is that the specified independent Poisson mean model is correct; the alternative is an unrestricted collection of means. When a quadratic likelihood approximation is valid, for example with fixed and large expected counts, has approximately a chi-squared distribution with statistical degrees of freedom. Reject for a large upper-tail deviance. Merely increasing the number of sparse observations does not make this saturated-model reference reliable: the alternative dimension also increases. With small fitted means, replication-based checks or a parametric bootstrap are more defensible. This qualification concerns the absolute goodness-of-fit deviance; a fixed-dimensional nested likelihood-ratio comparison can have a better chi-squared approximation.
A Poisson model assumes independent counts between rats conditional on time, a common mean at a given time, and conditional variance equal to that mean. Comparable observation units and consistent counting are needed; unexplained rat-to-rat heterogeneity is excluded by this simple specification. The quadratic Poisson regression is
The printed nested analysis of deviance tests against . Its likelihood-ratio statistic is , approximately under the null hypothesis and regular Poisson asymptotics. The reported gives borderline rejection of the log-linear time effect at 5%, conditional on the Poisson assumptions. This is curvature of the log mean, rather than an ordinary quadratic model for the count itself.
There are only three distinct time values, so the intercept, linear term, and quadratic term span every possible set of three log means. This is Poisson mean saturation at three distinct times: the quadratic fit is saturated for the time-group means, which are , , and . A grouped deviance comparison against unrestricted time-group means has zero statistical degrees of freedom: the quadratic functional form cannot be tested at these three times. The individual-observation deviance 24.515 still describes within-group departure from the Poisson distribution, but small means and zeros make the naive goodness-of-fit calibration doubtful. Poisson variation itself can be checked using the replicates, preferably by a parametric bootstrap; it is not rendered untestable by the saturated mean specification.
Overdispersion means conditional variance exceeding the variance assumed by the Poisson mean model. For example, rats may have different latent susceptibility, so if , the law of total variance gives . A quasi-Poisson model instead uses . The Pearson-residual dispersion estimate is , using .
For the conventional quasi-likelihood comparison with estimated dispersion, use
Its upper-tail probability is about 0.096, so the evidence for curvature no longer reaches 5%. The F-distribution is an approximate calibration, not an exact small-sample result for arbitrary overdispersed counts; quasi-likelihood does not supply a full Poisson likelihood. With known dispersion one would instead compare approximately with . The displayed dispersion code uses the undefined name acf.glm2; its fitted values must be those of aom.glm2 for the stated calculation.
Allow each subject to have a separate baseline and slope through a correlated random-intercept and random-slope model:
The subject random effects are independent of all measurement errors, and subjects are independent. The within-person covariance between times is , with an additional when the same reading is used twice.
Prefer the model with a random slope. The maximum likelihood estimation refits improve twice the log-likelihood by while adding two covariance statistical parameters. Both the Akaike information criterion ( to ) and Bayesian information criterion ( to ) strongly favour it. The printed nominal likelihood-ratio test is overwhelming. The usual reference chi-squared distribution with two statistical degrees of freedom is not an exact regular calibration, since zero slope variance is a boundary and the intercept–slope correlation is then unidentified; a design-specific parametric bootstrap could calibrate it. This qualification does not undermine the substantial descriptive improvement shown by both information criteria.
The preferred fit estimates population mean baseline strength kg and weekly gain kg/week. The between-person baseline standard deviation is kg, and the between-person slope standard deviation is kg/week. Their estimated correlation is weakly positive, giving random-effect covariance about kg/week; its uncertainty is not supplied. The measurement-error standard deviation is kg. The printed instead describes the correlation between the estimated fixed effects, not between the subject random effects. These statistical parameter estimates come from restricted maximum likelihood; the model comparison uses the separate maximum likelihood estimation fits.
The population mean fitted trajectory is kg. Hence
Using the reported slope standard error, an approximate 95% confidence interval for the population mean gain is kg; a Student t confidence interval with 499 statistical degrees of freedom is almost identical.
Successful individuals can improve far more than the average. Their latent ten-week gains have fitted normal distribution
A clear estimate for an upper-performing group uses a between-person slope quantile: the 95th percentile is kg, and the 97.5th percentile is about kg. The upper 5% of fitted underlying gains begin around 73 kg. These are person-to-person performance quantiles, not confidence intervals for the population mean. Identifying the best observed trainee would require that person's data or fitted subject random effects; the aggregate output cannot identify a literal maximum. If performance means the observed difference of endpoint readings, add the measurement-error variance to the latent gain variance.
The comparison removes the random slope and tests against , while retaining the same fixed intercept and slope. A variance cannot be negative, so zero is a boundary point of the parameter space. The regular Wilks theorem assumptions behind an ordinary likelihood-ratio test fail. Consequently the default chi-squared p-value from anova is not reliably calibrated for this variance-component likelihood-ratio test at a boundary. This is different from the fixed-slope test in part (c). The reference to strength_model1 means the earlier object strength_model; no separate model 1 object was defined.
A useful alternative is a parametric bootstrap. Fit the null random-intercept model, then simulate data on the actual predictor values and furnace grouping by generating null intercept effects and observation errors from its fitted Gaussian distribution. Refit null and alternative models to each simulated dataset using the same likelihood method and compute the same likelihood-ratio statistic. If is the observed statistic, estimate its upper-tail probability by
This incorporates the zero-variance boundary and the actual small group count. It is a fitted-null simulation approximation because nuisance parameters are estimated, not a universally exact test. Since both models have the same fixed-effect space, a similarly calibrated restricted-likelihood statistic is also possible. Under suitable asymptotics for a single identifiable added variance component the familiar limiting law is , but using the bootstrap avoids relying on that approximation with only three groups. There is no supplied statistic or calibrated bootstrap result here from which to decide whether the slope variance is required.
Let have columns , and let have one column per incubator, with entry in the column for observation 's incubator and zeros elsewhere. Integrating the Gaussian random effects gives
Consequently its marginal log-likelihood is
The likelihood-ratio test of against uses
For each covariance, the optimizing coefficients are the generalized least squares estimator . Both fits should use the same marginal likelihood convention, for example fitting the alternative with update(fly.model, REML=FALSE) and the null as a Gaussian linear model. The displayed alternative REML criterion alone cannot supply .
The variance component is constrained to be nonnegative, and zero lies on the boundary. Thus the interior-parameter hypothesis of Wilks theorem fails; the usual approximation is inappropriate. A limit sometimes applies to a single variance component under additional asymptotic conditions, but four incubators do not give a persuasive large-number-of-groups approximation.
Use a parametric bootstrap under the null: estimate there; simulate independent Gaussian errors with that fitted variance at exactly the observed times and grouping labels; refit both models by maximum likelihood for each simulated sample; and calculate . The upper-tail proportion, conventionally , estimates the p-value. Boundary fits with estimated must remain in the simulation distribution. A restricted-likelihood ratio and a correspondingly calibrated bootstrap are another option when the fixed-effect design is identical, but one must not mix ordinary and restricted likelihoods in a single statistic.
The usual residual-deviance chi-squared calibration is unreliable because random effects are estimated and integrated out, changing both the effective degrees of freedom and the null distribution. Use a parametric bootstrap: fit the reported GLMM; compute an observed dispersion statistic such as the Pearson statistic or its ratio to nominal residual degrees of freedom; for each bootstrap replicate draw ten player effects from , simulate all 60 Poisson responses from the fitted conditional means, refit the same GLMM, and recompute the statistic. With replicates, estimate the upper-tail p-value by
Reject at when , equivalently when exceeds the empirical th percentile of the bootstrap null distribution.
Model "lme2" replaces by a random intercept and random PTHK slope:
with a fitted bivariate normal covariance matrix for . This adds a random-slope variance and an intercept-slope covariance.
The likelihood-ratio statistic is
An ordinary chi-squared reference is unreliable because the null random-slope variance is on the boundary and its correlation is unidentified there; the reported correlation of one also signals a nearly singular fit. A valid practical test is a parametric bootstrap: simulate many datasets from fitted "lme1", refit both models by maximum likelihood to each, recompute the likelihood-ratio statistic, and estimate the p-value by the fraction at least . The AIC favors "lme2" slightly, whereas its BIC is larger, so the descriptive criteria do not agree.
The Quasi-Poisson standard errors are trustworthy only if observations are independent, the log-linear mean is correct, and the variance is proportional to the mean with one common dispersion. Dependence, zero inflation, or covariate-dependent dispersion can invalidate this covariance formula.
A parametric bootstrap under model 1 proceeds as follows. Fit the Poisson model once and retain and the fitted means . For bootstrap repetition , independently draw
refit the same Poisson regression to , and save its gender estimate . The sample standard deviation of these estimates over many repetitions estimates the model-1 standard error. This bootstrap deliberately measures uncertainty under the fitted Poisson model; it does not repair real overdispersion unless the resampling model is enlarged to represent its cause.