Skip to content

Commit e6e853b

Browse files
committed
minor
1 parent c77fe1e commit e6e853b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: parameters
33
Title: Processing of Model Parameters
4-
Version: 0.24.2.17
4+
Version: 0.24.2.18
55
Authors@R:
66
c(person(given = "Daniel",
77
family = "Lüdecke",

R/group_level_total.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,16 @@
108108
random_slopes <- insight::find_random_slopes(x)
109109
params <- NULL
110110

111+
# extract coefficients - only once, not in the loop
112+
model_coefficients <- stats::coef(x, summary = FALSE)
113+
111114
# create full data frame of all random effects retrieved from coef()
112115
params <- do.call(
113116
rbind,
114117
lapply(group_factors, function(i) {
115118
# we want the posterior distribution from coef(), so we can
116119
# use bayestestR
117-
ranef <- stats::coef(x, summary = FALSE)[[i]]
120+
ranef <- model_coefficients[[i]]
118121
parameter_names <- dimnames(ranef)[[3]]
119122
out <- lapply(
120123
parameter_names,

0 commit comments

Comments
 (0)