I am fitting a multilevel logistic regression model with several patient characteristics and cluster-specific random effects using the lme4 package in R. I know that with centered predictors I can apply the inverse logit transformation to the intercept to obtain the probability of the outcome for an average patient in an average cluster. My question is as follows: can I extract cluster-specific probabilities of the outcome within clusters by applying the inverse logit transformation to the sum of the intercept and the random effect (obtained with merTools package, namely the reSIM function which provides simulated 95% CI)?

# Multilevel logistic regression, cluster-specific probabilities

yes, i think youâre right, but i donât know how to do it in R.

Your question seems to be whether this is reasonable to do. If so, then consider that the reasonableness of frequentist procedures derives from their correspondence to more coherent Bayesian treatments, which they approximate. (See BDA3 Ch. 4, âAysmptotics and connections to non-Bayesian approachesâ for handy discussion of this idea.)

In your case, then, I would regard your lme4 parameter estimates as approximations to the parameters of the corresponding Bayesian model. To the extent that the formal structure of that Bayesian model may be âtaken seriouslyâ as a representation of reality, then the simulation you describe is reasonable.

I once had to do this sort of thing with a JAGS model that was taking 10x as long to estimate as the lme4 model. Comparing the JAGS-vs-lme4 parameter estimates in a subset of the data gave me some confidence that I could proceed using the more feasible lme4 estimates on the full data set.

i guess itâs empirical bayes ie estimate the random effects then insert them into the model to derive cluster specific estimates, estimates conditional on the estimated random effects

Thank you for your answers. With Richard McElreathâs book coming out soon and I am hoping to move towards Bayesian statistics.