且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用lmer修正R中的模型

更新时间:2023-02-18 11:47:36

我不得不不同意引用Barr等人(2013年)保持最大"的其他答案.事实证明,这在很多情况下都是不好的建议,以至于lme4的作者引入了代码来检查奇异拟合.不仅如此,道格·贝茨(Doug Bates(lme4的主要作者,并且可能是世界上混合模型的主要权威))及其同事在2015年写了一篇论文,专门解决了最大程度地保留"的愿望所带来的问题. -简约混合模型.

I have to disagree with the other answer that quotes Barr et al (2013) to "keep it maximal". This has been proven to be bad advice on so many occasions that the authors of lme4 had introduce code to check for singular fit. Not only that but Doug Bates (primary author of lme4 and probably the worlds leading authority on mixed models) and colleagues wrote a paper in 2015 specifically adressing problems brought about by the wish to "keep it maximal" - Parsimonious Mixed Models.

当然,我并不是说检查奇异的配合是一件坏事-这是一件好事,因此肯定会带来一些好处.

Of course I am not saying that checking for singular fits is a bad thing - it's a great thing, so something good certainly came from it.

因此,在这种情况下,我们有(task * stimulation|subject),其中task具有4个级别,而stimulation具有3个级别,因此我们要求该软件仅对20个对象估计8个方差-协方差参数.我并不是说这是不可能的,但是对于我来说,将其作为目标似乎很奇怪. Bates等人(2015)的论文详细介绍了如何处理所产生的问题,我已经就CV回答了一些有关如何处理问题的问题此处

So in this case we have (task * stimulation|subject) where task has 4 levels and stimulation has 3 so we are asking the software to estimate 8 variance-covariance parameters with only 20 subjects. I am not saying that this is impossible, but it just seems bizarre to me for this to be the goal. The Bates et al (2015) paper goes into considerable detail about how to handle the resulting problems and I have answered some questions on CV about how to do so here and here

因此,总而言之,另一个答案不一定是错误的,但它可能导致很多问题.

So in summary, the other answer isn't necessarily wrong, but it can lead to a lot of problems.