Skip to content

Commit 456913e

Browse files
authored
Merge pull request #20 from m-clark/issue18
issue #18
2 parents a9e58ba + ced6d28 commit 456913e

File tree

5 files changed

+27
-3
lines changed

5 files changed

+27
-3
lines changed

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Suggests:
2727
rstanarm,
2828
brms,
2929
pbkrtest,
30+
lmerTest,
3031
covr,
3132
knitr,
3233
rmarkdown

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# mixedup 0.3.8
2+
3+
* Minor bug fixes (issues #14-15), enhancements (#16-17), and other issues (e.g. #18).
4+
15
# mixedup 0.3.7
26

37
* Extend exponentiate to summarize_model, extend extract_random_effects to multivariate models, minor fixes (e.g. issue #12).

R/extract_fixed_effects.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,15 @@ extract_fixed_effects.merMod <-
7979
p_value = 'Wald'
8080
) {
8181

82+
if (class(model) == "lmerModLmerTest")
83+
stop('Only some functions work with lmerTest. This is not one of them.
84+
Rerun your model with lme4::lmer instead.')
85+
8286
if (!p_value %in% c('Wald', 'Satterthwaite', 'KR')) {
8387
warning("p_value must be one of 'Wald' or 'KR', switching to 'Wald'")
8488
p_value = 'Wald'
8589
}
8690

87-
8891
# do term now otherwise you can lose rownames if ci_level = 0
8992
fe <- data.frame(stats::coef(summary(model))) %>%
9093
dplyr::mutate(term = rownames(.)) %>%

codemeta.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"name": "R",
1717
"url": "https://r-project.org"
1818
},
19-
"runtimePlatform": "R version 4.0.2 (2020-06-22)",
19+
"runtimePlatform": "R version 4.0.3 (2020-10-10)",
2020
"author": [
2121
{
2222
"@type": "Person",
@@ -134,6 +134,18 @@
134134
},
135135
"sameAs": "https://CRAN.R-project.org/package=pbkrtest"
136136
},
137+
{
138+
"@type": "SoftwareApplication",
139+
"identifier": "lmerTest",
140+
"name": "lmerTest",
141+
"provider": {
142+
"@id": "https://cran.r-project.org",
143+
"@type": "Organization",
144+
"name": "Comprehensive R Archive Network (CRAN)",
145+
"url": "https://cran.r-project.org"
146+
},
147+
"sameAs": "https://CRAN.R-project.org/package=lmerTest"
148+
},
137149
{
138150
"@type": "SoftwareApplication",
139151
"identifier": "covr",
@@ -217,7 +229,7 @@
217229
}
218230
],
219231
"releaseNotes": "https://github.com/m-clark/mixedup/blob/master/NEWS.md",
220-
"fileSize": "40467.364KB",
232+
"fileSize": "40533.875KB",
221233
"contIntegration": "https://codecov.io/gh/m-clark/mixedup?branch=master",
222234
"developmentStatus": "https://www.tidyverse.org/lifecycle/#maturing",
223235
"keywords": [

tests/testthat/test-extract_fixed_effects.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ test_that('extract_fixed_effects.merMod is null if no covariates', {
8282
expect_null(extract_fixed_effects(lme4::lmer(Reaction ~ -1 + (1|Subject), lme4::sleepstudy)))
8383
})
8484

85+
test_that('extract_fixed_effects.merMod fails with lmerTest model', {
86+
expect_error(extract_fixed_effects(lmerTest::lmer(Reaction ~ Days + (1|Subject), lme4::sleepstudy)))
87+
})
88+
8589

8690
# Test glmmTMB ------------------------------------------------------------
8791

0 commit comments

Comments
 (0)