Skip to main content

models.f_test()

The F test of a GLM within a larger one that contains it, as R’s

Usage

models.f_test(
    small,
    big,
)

anova(small, big, test = "F"): F = (D_small - D_big) / (q phi_big) on F(q, n - p_big) (CAS Monograph 5, section 6.2.1). For a family whose dispersion is estimated.

The models are not checked to be nested: small’s columns must lie in the span of big’s, on the same rows, family and weights.

Parameters

small: GlmFit
big: GlmFit

Returns

dict
statistic, df (q), df_resid, deviance_drop and p_value.

Raises

ValueError
If the models differ in rows or big has no more coefficients.