Learn R Programming

qbrms (version 1.0.1)

qbrmb: Enhanced binomial mixed-effects modelling

Description

Fits a regularised binomial (or Bernoulli) mixed-effects model using INLA, with enhanced diagnostics, stability checks and strategy selection.

Usage

qbrmb(
  formula,
  data,
  family = "binomial",
  strategy = "auto",
  regularisation_strength = 0.1,
  use_data_augmentation = TRUE,
  min_group_size = 5,
  verbose = FALSE,
  diagnostics = FALSE,
  silent = FALSE,
  ...
)

Value

An object of class c("qbrmb_fit", "qbrms_fit", "list")

containing the fitted model, diagnostics and metadata.

Arguments

formula

Model formula with random effects in lme4-style syntax.

data

Data frame containing the variables in the model.

family

Model family (currently "binomial" or "bernoulli"; default "binomial").

strategy

Fitting strategy: "auto", "enhanced", "aggressive", or "minimal".

regularisation_strength

Regularisation strength in the interval \([0, 1]\) (default 0.1).

use_data_augmentation

Logical; if TRUE, add pseudo-observations for additional numerical stability.

min_group_size

Minimum group size before triggering diagnostic warnings.

verbose

Logical; if TRUE, show detailed progress and diagnostics while fitting.

diagnostics

Logical; if TRUE, compute and store extended diagnostics in the returned object.

silent

Logical; if TRUE, suppress printed output except errors.

...

Additional arguments passed to INLA::inla().