How do I extract the Correlation of fixed effects part of the lmer output

后端 未结 3 1581
感情败类
感情败类 2021-01-03 04:23

When you have a multilevel model with lots of factors and interactions the size of the correlation of fixed effects matrix can become quite big and unclear.

I can us

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-03 05:01

    Using the S4 method listing function we can return the function which is dispatched when print is called on an object of class "mer":

    selectMethod( print , "mer" )
    

    Looking at the source code that is returned we can find the lines applicable to you:

    if (correlation) {
                corF <- so@vcov@factors$correlation
    

    so is defined as the summary of your object, so in your case you should just need to extract:

    so <- summary(mod)
    so@vcov@factors$correlation
    

提交回复
热议问题