add_sizer {gratia} | R Documentation |
Add indicators of significant change after SiZeR
Description
Add indicators of significant change after SiZeR
Usage
add_sizer(object, type = c("change", "sizer"), ...)
## S3 method for class 'derivatives'
add_sizer(object, type = c("change", "sizer"), ...)
## S3 method for class 'smooth_estimates'
add_sizer(object, type = c("change", "sizer"), derivatives = NULL, ...)
Arguments
object |
an R object. Currently supported methods are for classes
|
type |
character; |
... |
arguments passed to other methods |
derivatives |
an object of class |
Examples
load_mgcv()
df <- data_sim("eg1", n = 400, dist = "normal", scale = 2, seed = 42)
m <- gam(y ~ s(x0) + s(x1) + s(x2) + s(x3), data = df, method = "REML")
## first derivatives of all smooths using central finite differences
d <- derivatives(m, type = "central") |>
add_sizer()
# default adds a .change column
names(d)
[Package gratia version 0.9.2 Index]