Learn R Programming

gratia (version 0.9.0)

fixef.gam: Extract fixed effects estimates from a fitted GAM

Description

Extract fixed effects estimates from a fitted GAM

Usage

# S3 method for gam
fixef(object, ...)

# S3 method for gamm fixef(object, ...)

# S3 method for lm fixef(object, ...)

# S3 method for glm fixef(object, ...)

fixed_effects(object, ...)

# S3 method for default fixed_effects(object, ...)

Arguments

object

a fitted GAM

...

arguments passed to other methods

Examples

Run this code
load_mgcv()

# run example if lme4 is available
if (require("lme4")) {
  data(sleepstudy, package = "lme4")
  m <- gam(
    Reaction ~ Days + s(Subject, bs = "re") +
      s(Days, Subject, bs = "re"),
    data = sleepstudy, method = "REML"
  )
  fixef(m)
}

Run the code above in your browser using DataLab