Skip to contents

Scoped to models with fixed effects and IID random intercepts only. Spatial models with BYM2, SPDE, AR1, or LGCP likelihoods should use inlabru's native interface.

Usage

bru_reg(mode = "regression", family = "gaussian")

Arguments

mode

Model mode. Currently only "regression" is supported.

family

INLA family string, e.g. "gaussian", "poisson".

Value

A bru_reg model spec.

Details

The formula passed to parsnip::fit() must use inlabru component syntax. An explicit intercept is required: y ~ Intercept(1) + x1 + x2. Standard y ~ x1 + x2 formulas are not supported because inlabru does not add an intercept automatically.

IID random intercepts are supported in the fit, but predict() via the parsnip interface returns the marginal mean — only the fixed effects are included in the response-scale linear predictor. The IID random intercept is integrated over rather than conditioned on any specific group level, which matches the "new group" use case but silently ignores the random effect for held-out observations from a seen group. If you need conditional predictions, call inlabru::predict() directly with a formula that references the IID component.