File: test-model_parameters.ggeffects.R

package info (click to toggle)
r-cran-parameters 0.24.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,852 kB
  • sloc: sh: 16; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
test_that("model_parameters.ggeffects", {
  skip_if_not_installed("ggeffects")
  data(iris)
  mgg <- lm(Sepal.Length ~ Petal.Width + Petal.Length * Species, data = iris)
  model <- ggeffects::ggpredict(mgg, terms = c("Petal.Length", "Species"))
  params <- model_parameters(model)

  expect_named(
    params,
    c("Petal.Length", "Predicted", "CI", "CI_low", "CI_high", "Component")
  )
  expect_snapshot(print(params))
})