File: test-model_parameters.cpglmm.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 (20 lines) | stat: -rw-r--r-- 587 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
unloadNamespace("BayesFactor")

test_that("model_parameters.cpglmm", {
  skip_if_not_installed("cplm")
  loadNamespace("cplm")

  data("FineRoot", package = "cplm")
  cpglmm <- cplm::cpglmm

  model <- cpglmm(RLD ~ Stock + Spacing + (1 | Plant), data = FineRoot)

  params <- model_parameters(model, effects = "fixed")
  expect_equal(params$SE, c(0.1308, 0.2514, 0.2, 0.1921), tolerance = 1e-3)
  expect_equal(
    colnames(params),
    c("Parameter", "Coefficient", "SE", "CI", "CI_low", "CI_high", "t", "df_error", "p", "Effects")
  )

  unloadNamespace("cplm")
})