Skip to content

Commit

Permalink
Specify condVar = FALSE in lme4::ranef() calls (to (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
fweber144 authored Mar 3, 2022
1 parent 06fd552 commit 343ee37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/divergence_minimizers.R
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ predict.gamm4 <- function(fit, newdata = NULL) {
random <- fit$random
gamm_struct <- model.matrix.gamm4(delete.response(terms(formula)),
random = random, data = newdata)
ranef <- lme4::ranef(fit$mer)
ranef <- lme4::ranef(fit$mer) # TODO (GAMMs): Add `, condVar = FALSE` here?
b <- gamm_struct$b
mf <- gamm_struct$mf

Expand Down
2 changes: 1 addition & 1 deletion R/methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ get_subparams.lmerMod <- function(x, ...) {
)

# Extract the group-level effects themselves:
group_ef <- unlist(lapply(lme4::ranef(x), function(ranef_df) {
group_ef <- unlist(lapply(lme4::ranef(x, condVar = FALSE), function(ranef_df) {
ranef_mat <- as.matrix(ranef_df)
setNames(
as.vector(ranef_mat),
Expand Down

0 comments on commit 343ee37

Please sign in to comment.