fastglm_batch: Fit multiple responses using a prepared design

View source: R/prepared.R

fastglm_batchR Documentation

Fit multiple responses using a prepared design

Description

The same design can be used for many outcomes. Gaussian identity fits share the weighted crossproduct factor. With 'firth = TRUE', Gaussian identity, Gamma log, and Poisson square-root fits share their factor and observation leverages when using automatic or LLT fitting. Changes to predictors or weights rebuild this setup; offsets and responses can vary independently. Other families and decompositions use the ordinary fitting routine. Sequential fits may use the preceding converged fit as a starting value. Independent fits can run in separate R processes.

Usage

fastglm_batch(
  design,
  y,
  family = gaussian(),
  weights = NULL,
  offset = NULL,
  method = "auto",
  tol = 1e-08,
  maxit = 100L,
  warm.start = TRUE,
  workers = 1L,
  inference = c("full", "diagonal", "none"),
  retain.data = TRUE,
  firth = NULL
)

Arguments

design

a model matrix or object from [fastglm_prepare()].

y

matrix whose columns are responses, or a list of responses.

family

common GLM family.

weights, offset

common vectors or matrices with one column per fit.

method, tol, maxit

solver and convergence controls.

warm.start

reuse coefficients from the preceding converged fit.

workers

number of independent worker processes; defaults to one.

inference

'"full"' retains covariance, '"diagonal"' retains only standard errors, and '"none"' omits inference from the result.

retain.data

retain the design and response on each model.

firth

apply mean bias reduction; ‘NULL' uses the prepared design’s default, or 'FALSE' for a matrix supplied directly.

Value

A named list of fitted models.


fastglm documentation built on Nov. 11, 2026, 5:07 p.m.