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

re2mgcv

Convert lme4 random-effect terms to mgcv 're' smooths


Description

Convert lme4 random-effect terms to mgcv 're' smooths

Usage

re2mgcv(formula, data)

Arguments

formula

The lme4 formula.

data

The data.

Examples

library(buildmer)
re <- re2mgcv(temp ~ angle + (1|replicate) + (1|recipe),lme4::cake)
model <- buildgam(re$formula,re$data,family=mgcv::scat)
# note: the below does NOT work, as the dependent variable is looked up in the data by name!

re <- re2mgcv(log(Reaction) ~ Days + (Days|Subject),lme4::sleepstudy)

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.