vuong_test#
- superglm.vuong_test(
- model_a: SuperGLM,
- model_b: SuperGLM,
- X,
- y,
- sample_weight=None,
- offset=None,
- *,
- correction: str = 'aic',
Vuong (1989) likelihood-ratio test for non-nested model comparison.
Compares two models’ per-observation log-likelihoods. Under H0 (models are equally close to the true DGP), the test statistic is asymptotically N(0,1).
- Parameters:
- model_a, model_bSuperGLM
Two fitted SuperGLM models.
- Xpandas or eager Polars DataFrame
Design matrix (same for both models).
- yarray-like
Observed response values.
- sample_weightarray-like or None
Observation weights, read under the contract both models declare. Under
"frequency"integer values are exactly equivalent to row replication; under"prior"they enter each density throughphi_i = phi / w_ior the equivalent scaling of the family’s own parameters. A weighted comparison of two models that declare different contracts is rejected, because a single vector cannot represent both.- offsetarray-like or None
Optional offset.
- correctionstr
Complexity correction:
"none","aic", or"bic".
- Returns:
- VuongTestResult