We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb94d6c commit d15749bCopy full SHA for d15749b
2 files changed
DESCRIPTION
@@ -1,7 +1,7 @@
1
Type: Package
2
Package: insight
3
Title: Easy Access to Model Information for Various Model Objects
4
-Version: 1.2.0.9
+Version: 1.2.0.10
5
Authors@R:
6
c(person(given = "Daniel",
7
family = "Lüdecke",
tests/testthat/test-lmer.R
@@ -82,6 +82,29 @@ test_that("get_df", {
82
ignore_attr = TRUE,
83
tolerance = 1e-4
84
)
85
+
86
+ skip_if_not_installed("lmerTest")
87
+ # per observation df
88
+ data(mtcars)
89
+ mod <- lme4::lmer(am ~ hp + (1 | cyl), data = mtcars)
90
+ out1 <- get_df(mod, type = "satterthwaite", df_per_obs = TRUE, data = mtcars)
91
+ out2 <- get_df(mod, type = "satterthwaite", df_per_obs = FALSE)
92
+ expect_equal(
93
+ out1,
94
+ c(
95
+ 1.75657, 1.75657, 1.89121, 1.75657, 1.80609, 1.78946, 2.95048,
96
+ 2.31532, 1.87196, 1.69622, 1.69622, 1.84694, 1.84694, 1.84694,
97
+ 2.13913, 2.29991, 2.59236, 2.2466, 2.50664, 2.26337, 1.85365,
98
+ 1.68312, 1.68312, 2.95048, 1.80609, 2.2466, 1.91138, 1.73945,
99
+ 3.50471, 1.80609, 6.61056, 1.76271
100
+ ),
101
+ tolerance = 1e-3
102
+ )
103
104
+ out2,
105
+ c(`(Intercept)` = 3.99802, hp = 29.3951),
106
107
108
})
109
110
test_that("n_parameters", {
0 commit comments