vdorie / blme

Bayesian Linear Mixed Effect Models
40 stars 8 forks source link

bootMer compatibility? #11

Open AndrewLawrence opened 4 years ago

AndrewLawrence commented 4 years ago

Hey, thanks for your work on this really useful software!

I was wondering if blme models are compatible with lme4::bootMer?

Thanks in advance!

vdorie commented 4 years ago

I'm not entirely sure - I've only briefly reviewed the code for bootMer - but from my understanding the function works for blme objects but understates uncertainty by simulating responses conditioned on the estimates of the model parameters. If your perspective on the use of priors is to regularize the estimates, then this is fine. However, if you're looking for a fully Bayesian approach the correct thing to do would be to simulate from the posterior predictive distribution. This would would require a full Bayes solution, like MCMCglmm or rstanarm.

A little bit of extra uncertainty can be added for the parameters by conditioning on the covariances of the random effects. That would require rewriting lme4:::.simulateFun. The truly hard bit is simulating for the random effects themselves.

AndrewLawrence commented 4 years ago

Thanks, this is very helpful! I am approaching this from a regularisation perspective (to add confidence intervals to Chen et al's "RME" method).