Skip to main content

Crate glmm

Crate glmm 

Source
Expand description

glmm — standalone f64 GLMM fit kernels (OLS → GLM → LMM → GLMM).

Two public surfaces:

  • fit + ModelSpec: the stable, semver-covered friendly API.
  • mcpower (cargo feature, off by default): the unstable scratch-explicit hot-path surface MCPower’s simulation layer binds to. NO semver guarantees.

Modules§

consts
Scratch-bounding capacity constants. glmm owns these; they size the solver’s stack buffers, so they are HARD ceilings. MCPower’s engine-contract re-exports MAX_PRIMARY_Q / MAX_EXTRA_GROUPINGS for its validate() invariants — single source, no drift.
linalg
Linear-algebra primitives shared by the sim and fit layers.
simd_transcendental
Restricted-domain SIMD transcendentals for the GLM/GLMM fit path — a single compiled-in, full-precision exp/log1p that vectorizes across the PIRLS row loop (the scalar libm exp/ln_1p are extern calls the compiler cannot vectorize; profiling put them at ~51% of the no-extras GLMM fit).

Structs§

Fit
Result of fit. Fixed-effect estimates cover all p predictors; SE and tau2 have the ranges below. Non-target SE slots are NaN.
FitOptions
Options for fit.
Grouping
An extra grouping factor. Mirror of engine_contract::GroupingSpec.
ModelSpec
The kernels’ model-spec input. Exactly the fields the fit side reads.
SlopeTerm
One random slope. Mirror of engine_contract::SlopeTerm.

Enums§

Estimator
Estimator class. Mirror of engine_contract::EstimatorSpec.
GroupingRelation
Sizing
Cluster sizing regime. Mirror of engine_contract::ClusterSizing.
WaldSe
GLMM fixed-effect Wald-SE denominator. Mirror of engine_contract::WaldSe.

Functions§

fit
Thin friendly adapter: own all scratch, dispatch on model.estimator, return a Fit.

Type Aliases§

ColumnId
Predictor column index (mirrors engine_contract::ColumnId’s underlying type).