22# '
33# ' @description These functions provide information about the reliability of
44# ' group-level estimates (i.e., random effects) in mixed models. They are useful
5- # ' to assess whether there the predictors yield consistent group-level
6- # ' variability. "Group-level" can refer, for instance, to different participants
7- # ' in a study, and the predictors to the effect of some experimental condition.
5+ # ' to assess whether the predictors yield consistent group-level variability.
6+ # ' "Group-level" can refer, for instance, to different participants in a study,
7+ # ' and the predictors to the effect of some experimental condition.
88# '
99# ' The conceptually related functions are implemented,
1010# ' `performance_reliability()`, based on Rouder & Mehrvarz (2024) that uses
@@ -144,11 +144,7 @@ performance_reliability.default <- function(x, ...) {
144144 random <- lapply(insight :: get_random(x ), function (z ) min(table(z )))
145145 v <- insight :: get_variance(x ) # Extract variance components
146146
147- original_params <- parameters :: parameters(
148- x ,
149- effects = " random" ,
150- group_level = TRUE
151- )
147+ original_params <- parameters :: parameters(x , effects = " grouplevel" , verbose = FALSE )
152148 params <- as.data.frame(original_params )
153149
154150 # bayesian model? if yes, copy clean parameter names
@@ -169,7 +165,6 @@ performance_reliability.default <- function(x, ...) {
169165 Parameter = param
170166 )
171167
172-
173168 # Based on Rouder's (2024) paper https://journals.sagepub.com/doi/10.1177/09637214231220923
174169 # "What part of reliability is invariant to trial size? Consider the ratio
175170 # sigma_B^2 / sigma_W^2. This is a signal-to-noise variance ratio - it is
@@ -204,12 +199,8 @@ performance_reliability.default <- function(x, ...) {
204199 }
205200 }
206201
207- # clean for brms
208- if (inherits(x , " brmsfit" )) {
209- reliability <- reliability [! is.na(reliability $ Reliability ), ]
210- }
211-
212- reliability
202+ # clean
203+ reliability [! is.na(reliability $ Reliability ), ]
213204}
214205
215206
0 commit comments