Skip to content

Model Inference¤

glmax.infer(...) computes inferential summaries from a fitted noun without refitting the model. The high-level philosophy is that fitting and inference are separate verbs: a fit produces parameter estimates and artifacts, and infer turns those artifacts into standard errors, test statistics, and p-values through explicit inference strategies.

glmax.infer(fitted: FittedGLM, inferrer: AbstractTest = WaldTest(), stderr: AbstractStdErrEstimator = FisherInfoError()) -> InferenceResult ¤

Compute inferential summaries from a fitted GLM without refitting.

The canonical infer grammar verb. Delegates to the chosen glmax.AbstractTest strategy, which calls the selected glmax.AbstractStdErrEstimator as needed. Inference is computed from the fitted noun only; no model refit is performed inside glmax.infer.

Arguments:

Returns:

glmax.InferenceResult carrying (params, se, stat, p).

Raises:


glmax.InferenceResult(builtins.tuple) [source] ¤

Canonical output contract for the infer(...) grammar verb.

A lightweight immutable container carrying the inferential summaries produced by a glmax.AbstractTest strategy. The tuple stores \((\hat{\theta}, \operatorname{SE}, z, p)\), where \(\hat{\theta}\) is the fitted parameter carrier, \(\operatorname{SE}\) is the per-coefficient standard error vector, \(z\) is the per-coefficient test statistic, and \(p\) is the per-coefficient two-sided p-value.

Arguments:

  • params: fitted glmax.Params carrying \((\hat{\beta}, \hat{\phi}, \hat{a})\).
  • se: standard error vector, shape (p,). May be NaN for strategies that do not compute standard errors (e.g. ScoreTest).
  • stat: test statistic vector, shape (p,).
  • p: two-sided p-value vector, shape (p,).
p = _tuplegetter(3, 'Alias for field number 3') class-attribute ¤

Alias for field number 3

params = _tuplegetter(0, 'Alias for field number 0') class-attribute ¤

Alias for field number 0

se = _tuplegetter(1, 'Alias for field number 1') class-attribute ¤

Alias for field number 1

stat = _tuplegetter(2, 'Alias for field number 2') class-attribute ¤

Alias for field number 2