OffsetTerm
An offset term, e.g. offset(log_exposure).
Usage
OffsetTerm(expression)An offset is a covariate whose coefficient is fixed at exactly 1 rather than estimated — it is added directly onto the linear predictor unpenalized and unscaled. The canonical use case is modeling rates with a count-based family: for a Poisson model of event counts with varying exposure times, offset(log(exposure)) lets the model fit the rate per unit exposure while accounting for the fact that longer exposures mechanically produce more events (since log(mu) = eta + log(exposure) implies mu / exposure = exp(eta), the rate).
The expression attribute stores the raw, unparsed text found inside offset(...) in the formula string (e.g. "log(exposure)" or "log_exposure") — expression evaluation, if any, happens later when the model matrix is built.
Parameters
expression: str-
Raw expression text inside
offset(...).