buildbam: Uses 'buildmer' to fit big generalized additive models using...

View source: R/buildmer.r

buildbamR Documentation

Uses buildmer to fit big generalized additive models using bam from package mgcv

Description

Uses buildmer to fit big generalized additive models using bam from package mgcv

Usage

buildbam(
  formula,
  data = NULL,
  family = gaussian(),
  buildmerControl = buildmerControl()
)

Arguments

formula

See the general documentation under buildmer-package.

data

See the general documentation under buildmer-package.

family

See the general documentation under buildmer-package.

buildmerControl

Control arguments for buildmer — see the general documentation under buildmerControl.

Details

To work around an issue in bam, you must make sure that your data do not contain a variable named 'intercept'.

lme4 random effects are supported: they will be automatically converted using re2mgcv.

In the generalized case, bam only returns the correct ML/REML values as of mgcv 1.9-4.

See Also

buildmerControl

Examples



library(buildmer)
model <- buildbam(f1 ~ s(timepoint,by=following) + s(participant,by=following,bs='re') +
       s(participant,timepoint,by=following,bs='fs'),data=vowels)


buildmer documentation built on June 27, 2026, 1:06 a.m.