Research Workflow
Check Whether a Likelihood-Ratio Comparison Is Valid
Define the two models
A likelihood-ratio comparison typically contrasts a restricted model with a more general model that contains it as a special case. The models must use compatible likelihoods and the same observed data for the usual comparison. A different sample caused by missing covariates can invalidate an otherwise familiar calculation.
The statsmodels likelihood-ratio comparison reference documents the statistic and cautions about assumptions. Use it as a computational reference, while checking whether the intended model pair satisfies the conditions for the proposed reference distribution.
Check nesting explicitly
Write the parameter restriction that turns the larger model into the smaller one. Adding a predictor can produce nesting, but changing outcome transformations, estimation objectives or analysis populations may not. Boundary parameters and other nonregular cases can require a different reference distribution from the usual chi-square approximation.
Compare row identifiers and outcome values used in each fit. A more complex model fitted to fewer complete cases should not be compared with a simpler model fitted to all available cases merely because both report log likelihoods.
Calculate a hypothetical statistic
Suppose the restricted model has log likelihood −100 and the larger nested model has log likelihood −96 on the same data. The likelihood-ratio statistic is 2×[−96 − (−100)] = 8. If the larger model adds two identifiable parameters and regularity conditions support the usual approximation, the reference degrees of freedom are two.
The calculation alone does not establish those conditions. If the larger model adds a variance component constrained to be nonnegative, testing its zero boundary can change the reference distribution. Record that distinction before obtaining a p-value from a generic chi-square function.
Keep model choice connected to purpose
A statistically detectable improvement does not establish useful prediction, causal validity or adequate absolute fit. Inspect diagnostics and consider the scientific role of the added terms. If repeated comparisons guide model development, account for that selection process in validation and interpretation.
Report both model definitions, common sample size, likelihood values, parameter difference and inferential method. Preserve convergence checks for both fits. The final comparison should show why these models can legitimately be compared and what the result says about their relative fit, without turning a single likelihood-ratio p-value into a certificate of model quality.
Source verification: 6 November 2026. Examples are hypothetical.