summary_gamm: Summarize a GAMM

Description Usage Arguments Details Value See Also Examples

View source: R/summary_gamm.R

Description

Summarize a gam model in a clean mixed effects style.

Usage

1
summary_gamm(model, digits = 3)

Arguments

model

The mgcv model

digits

number of digits to display

Details

This displays the variance components and fixed effects from a gam model. Assumes an mgcv model of the form gam(... + s(g, bs='re')), but should work with just about any gam with a smooth term.

Value

Invisibly returns a list with the variance components via extract_vc and fixed effects parameter, labeled vc and fe respectively.

See Also

extract_vc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(mgcv)
library(lme4)

lmer_model <- lmer(Reaction ~ Days + (Days || Subject), data = sleepstudy)
ga_model <- gam(Reaction ~ Days + s(Subject, bs = "re") + s(Days, Subject, bs = "re"),
  data = sleepstudy,
  method = "REML"
)

summary(lmer_model)
summary_gamm(ga_model)

m-clark/gammit documentation built on Oct. 22, 2020, 6:53 p.m.