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: glmax.FittedGLM, inferrer: glmax.AbstractTest = glmax.WaldTest(), stderr: glmax.AbstractStdErrEstimator = glmax.FisherInfoError()) -> glmax.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:
fitted: fittedglmax.FittedGLMnoun produced byglmax.fit.inferrer:glmax.AbstractTeststrategy. Defaults toglmax.WaldTest.stderr:glmax.AbstractStdErrEstimatorforwarded to the inferrer. Defaults toglmax.FisherInfoError.
Returns:
glmax.InferenceResult carrying (params, se, stat, p).
Raises:
TypeError: iffittedis not aglmax.FittedGLM,inferreris not aglmax.AbstractTest, orstderris not aglmax.AbstractStdErrEstimator.
glmax.InferenceResult(tuple)
¤
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: fittedglmax.Paramscarrying \((\hat{\beta}, \hat{\phi}, \hat{a})\).se: standard error vector, shape(p,). May beNaNfor strategies that do not compute standard errors (e.g.ScoreTest).stat: test statistic vector, shape(p,).p: two-sided p-value vector, shape(p,).