[R-sig-ME] Print out of function lmer

Ben Bolker bbolker at gmail.com
Sun Nov 22 23:31:00 CET 2015


 [keeping r-sig-mixed-models in cc: list]

  It's admittedly a bit obscure, but the ?summary.merMod page shows
that the 'print' method for 'summary.merMod' objects has an argument
called 'ranef.comp', which is described as follows:

ranef.comp: character vector of length one or two, indicating if
          random-effects parameters should be reported on the variance
          and/or standard deviation scale.

(This argument should probably be called varcorr.comp rather than
ranef.comp ...)

Similarly, the ?VarCorr.merMod help page has a note saying:

The ‘print’ method for ‘VarCorr.merMod’ objects has optional
     arguments ‘digits’ (specify digits of precision for printing) and
     ‘comp’: the latter is a character vector with any combination of
     ‘"Variance"’ and ‘"Std.Dev."’, to specify whether variances,
     standard deviations, or both should be printed.


On Sun, Nov 22, 2015 at 5:25 PM, Thompson,Paul
<Paul.Thompson at sanfordhealth.org> wrote:
> How would a person figure that out without you answering, Ben? What is the proper command to get help for that?
>
> -----Original Message-----
> From: R-sig-mixed-models [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Ben Bolker
> Sent: Sunday, November 22, 2015 3:53 PM
> To: li li
> Cc: r-sig-mixed-models
> Subject: Re: [R-sig-ME] Print out of function lmer
>
>   Yes, you can:
>
> library(lme4)
> example(lmer)
> print(summary(fm1),ranef.comp=c("Variance","Std.Dev."))
>
>
>
> On Sun, Nov 22, 2015 at 1:36 PM, li li <hannah.hlx at gmail.com> wrote:
>> Hi all,
>>   I want to add the column for the variance of the random effect in
>> the printout of the lmer function.  For now only standard deviation is shown.
>> See example printout below. Is it possible to add a column for the variance?
>>    Thanks very much!!
>>     Hanna
>>
>>> mod1
>> Linear mixed model fit by REML ['lmerMod']
>> Formula: result ~ 1 + (1 | analyst) + (1 | day1)
>>    Data: one1
>> REML criterion at convergence: 126.0852 Random effects:
>>  Groups   Name        Std.Dev.
>>  day1     (Intercept) 1.130e-08
>>  analyst  (Intercept) 9.547e-01
>>  Residual             1.079e+00
>> Number of obs: 40, groups:  day1, 20; analyst, 4 Fixed Effects:
>> (Intercept)
>>       7.823
>>>
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> -----------------------------------------------------------------------
> Confidentiality Notice: This e-mail message, including any attachments,
> is for the sole use of the intended recipient(s) and may contain
> privileged and confidential information.  Any unauthorized review, use,
> disclosure or distribution is prohibited.  If you are not the intended
> recipient, please contact the sender by reply e-mail and destroy
> all copies of the original message.
>



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