skip_if_not_installed("marginaleffects")
skip_if_not_installed("mgcv")
skip_on_cran()
test_that("summary.estimate_slopes", {
set.seed(333)
model <- mgcv::gam(Sepal.Width ~ s(Petal.Length, by = Species), data = iris)
slopes <- estimate_slopes(model,
trend = "Petal.Length",
by = c("Petal.Length", "Species"), length = 20
)
expect_snapshot(summary(slopes))
set.seed(333)
model <- mgcv::gam(Sepal.Width ~ s(Petal.Length, by = Species), data = iris)
slopes <- estimate_slopes(model,
trend = "Petal.Length",
by = c("Petal.Length", "Species"), length = 100
)
expect_snapshot(summary(slopes))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.