Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

buildbam

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


Description

Use 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

...

Additional options to be passed to bam; for backward-compatibility reasons, will also accept buildmer control parameters, although those specified in buildmerControl will take precedence

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.

As bam uses PQL, only crit='deviance' is supported for non-Gaussian errors.

See Also

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

Stepwise Elimination and Term Reordering for Mixed-Effects Regression

v1.9
FreeBSD
Authors
Cesko C. Voeten [aut, cre] (<https://orcid.org/0000-0003-4687-9973>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.