Skip to contents

This function uses gratia::derivatives to compute derivatives of estimated smooth via finite differences. See gratia::derivatives() for details. When object is not of class galamm, it is forwarded to gratia::derivatives().

Usage

# S3 method for class 'galamm'
derivatives(object, ...)

Arguments

object

An object of class galamm returned from galamm.

...

Other arguments passed on to gratia::derivatives().

Value

A tibble.

Examples

dat <- subset(cognition, domain == 1 & item == "11")
dat$y <- dat$y[, 1]
mod <- galamm(y ~ s(x) + (1 | id), data = dat)

dd <- derivatives(mod)
draw(dd)