[R-sig-ME] lmer bug

Joehanes, Roby (NIH/NHLBI) [F] roby.joehanes at nih.gov
Fri Aug 17 00:36:58 CEST 2012


Hi Arun:

Did you use the lmer from CRAN or built from Subversion source? This code
indeed works for lmer from CRAN, as I indicated in my original e-mail. I was
just pointing out that it no longer works for lmer from Subversion source.
Which Subversion release number are you using?

Roby


On 8/16/12 6:13 PM, "arun" <smartpink111 at yahoo.com> wrote:

> HI,
> 
> It's working for me.  I am using R 2.15.
> 
> 
>  ff1 <- Reaction ~ Days + (Days|Subject)
>>    fm1 <- lmer(ff1, sleepstudy)
>>    print (anova(fm1))
> Analysis of Variance Table
>      Df Sum Sq Mean Sq F value
> Days  1  29986   29986  45.785
>> fun <- function () {
> +   ff1 <- Reaction ~ Days + (Days|Subject)
> +   fm1 <- lmer(ff1, sleepstudy)
> +   return (anova(fm1))
> + }
>> print(fun())
> Analysis of Variance Table
>      Df Sum Sq Mean Sq F value
> Days  1  29986   29986  45.785
> A.K.
> 
> 
> 
> ----- Original Message -----
> From: "Joehanes, Roby (NIH/NHLBI) [F]" <roby.joehanes at nih.gov>
> To: "r-sig-mixed-models at r-project.org" <r-sig-mixed-models at r-project.org>
> Cc: 
> Sent: Thursday, August 16, 2012 4:28 PM
> Subject: [R-sig-ME] lmer bug
> 
> Hi all:
> 
> This appears to be a bug affecting lmer that is in the Subversion up until the
> current version (1788).
> 
> The following works:
>    ff1 <- Reaction ~ Days + (Days|Subject)
>    fm1 <- lmer(ff1, sleepstudy)
>    print (anova(fm1))
> 
> But the following does not:
> fun <- function () {
>    ff1 <- Reaction ~ Days + (Days|Subject)
>    fm1 <- lmer(ff1, sleepstudy)
>    return (anova(fm1))
> }
> print(fun())
> 
> Error message:
> Error in print(fun()) :
>   error in evaluating the argument 'x' in selecting a method for function
> 'print': Error in eval(expr, envir, enclos) : object 'ff1' not found
> 
> This error, however, does not affect the lme4 package released in CRAN.
> 
> Thanks,
> Roby
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 

-- 
Roby Joehanes
Research Associate
Roby.Joehanes at nih.gov
Building 12A, Room 2007
National Institutes of Health (NIH)
Bethesda, MD 20892
P: (301) 402-8702
F: (301) 480-0028 or (301) 402-2867



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