[R-sig-ME] Fitting multi-response mixed effects models with lmer

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Sun Jul 14 23:03:56 CEST 2019


  I thought Alejandro was interested in fitting these responses as
*independent* outcomes (since he says below "I can iteratively fit one
model for each response but I’m guessing that would be much slower"; I
think the loop using refit() every time after the first would be
reasonably fast - I certainly don't see a super-easy way to do it faster
...)

On 2019-07-14 4:36 p.m., Ian Dworkin wrote:
> Alejandro,
> 
>  Ben B. and I taught some examples of "tricking" lmer for multivariate
> response models, see here
> https://mac-theobio.github.io/QMEE/MultivariateMixed.html
> 
> Cheers
> Ian
> 
> On Sun, 14 Jul 2019 at 10:33, jonnations <jonnations using gmail.com> wrote:
> 
>> Hi Alejandro,
>>
>> This is easy to do in brms, if you’re willing to explore Bayesian options.
>> There is a nice vignette (brms multivariate) that covers this exact thing.
>>
>> Jon
>>
>> On Sun, Jul 14, 2019 at 3:01 AM <r-sig-mixed-models-request using r-project.org>
>> wrote:
>>
>>> Send R-sig-mixed-models mailing list submissions to
>>>         r-sig-mixed-models using r-project.org
>>>
>>> To subscribe or unsubscribe via the World Wide Web, visit
>>>         https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>> or, via email, send a message with subject or body 'help' to
>>>         r-sig-mixed-models-request using r-project.org
>>>
>>> You can reach the person managing the list at
>>>         r-sig-mixed-models-owner using r-project.org
>>>
>>> When replying, please edit your Subject line so it is more specific
>>> than "Re: Contents of R-sig-mixed-models digest..."
>>>
>>>
>>> Today's Topics:
>>>
>>>    1. Fitting multi-response mixed effects models with lmer
>>>       (Alejandro Catalina)
>>>
>>> ----------------------------------------------------------------------
>>>
>>> Message: 1
>>> Date: Sat, 13 Jul 2019 18:02:20 +0300
>>> From: Alejandro Catalina <alecatfel using gmail.com>
>>> To: r-sig-mixed-models using r-project.org
>>> Subject: [R-sig-ME] Fitting multi-response mixed effects models with
>>>         lmer
>>> Message-ID: <e44b3683-1a88-45f8-8dc8-1c07595c0dd7 using Spark>
>>> Content-Type: text/plain; charset="utf-8"
>>>
>>> Dear all,
>>>
>>> I found myself trying to fit a multi-response model with lmer the other
>>> day and today I learned that it is indeed not implemented. Is there
>> anyone
>>> looking on that direction or does anyone have any pointers or
>> suggestions?
>>> I guess I can iteratively fit one model for each response but I’m
>> guessing
>>> that would be much slower. Furthermore, I would need to later combine all
>>> the models into a single object for my specific requirements. This is the
>>> issue I opened on lme4’s GitHub:
>>>
>>>         Hi,
>>> I am trying to solve the following formula with lmer:
>>> cbind(y.1, y.2, y.3) ~ u + (u | floor_id) + (u | county_id)
>>> which works fine for standard lm models without the group terms, but it
>>> fails when I have the mixed effects terms with the following error:
>>> Error in initializePtr() : updateMu: Size mismatch
>>> If this is not the right place to post this issue please tell me, I
>>> appreciate any pointers forward.
>>>
>>> Thank you all,
>>>
>>> Best,
>>> Alejandro
>>>
>>>         [[alternative HTML version deleted]]
>>>
>>>
>>>
>>>
>>> ------------------------------
>>>
>>> Subject: Digest Footer
>>>
>>> _______________________________________________
>>> R-sig-mixed-models mailing list
>>> R-sig-mixed-models using r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>>
>>>
>>> ------------------------------
>>>
>>> End of R-sig-mixed-models Digest, Vol 151, Issue 10
>>> ***************************************************
>>
>> --
>> Jonathan A. Nations
>> PhD Candidate
>> Esselstyn Lab <https://esselstyn.github.io/>
>> Museum of Natural Sciences <https://www.lsu.edu/mns/>
>> Louisiana State University
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-mixed-models using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
> 
>



More information about the R-sig-mixed-models mailing list