extract_fixed: Extract the fixed effects from a GAMM

Description Usage Arguments Details Value See Also Examples

View source: R/extract_fixed.R

Description

When using a GAM for mixed models, we may have specific interest in the fixed effect parameters.

Usage

1
extract_fixed(model, ci_level = 0.95, digits = 3, ...)

Arguments

model

A gam or bam model

ci_level

Level for the confidence interval. Must be between 0 and 1.

digits

Rounding for the output.

...

Passed to summary.gam, e.g. to set re.test = FALSE.

Details

This essentially reproduces the 'parametric' output from summary.gam.

Value

A data.frame with the coefficients, standard error, and upper and lower bounds.

See Also

fixef

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"
)

fixef(lmer_model)
extract_fixed(ga_model)

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