[R-sig-ME] lme4 broken ?

Martin Maechler maechler at stat.math.ethz.ch
Fri Apr 13 12:00:05 CEST 2012


As Matrix comes with R,  could you try to just use the version
that comes with R 2.15.0, and *then* install lme4 ?
Or in any case, install lm4 after Matrix, as lme4 depends on
Matrix?

I agree that this is not "useful" behavior...
Martin

>>>>> lancelot  <renaud.lancelot at cirad.fr>
>>>>>     on Fri, 13 Apr 2012 11:49:20 +0200 writes:

    > Dear Martin and all,
    > Thank you very much for your time. However:

    >> remove.packages("lme4")
    > Elimination de(s) package(s) de ‘C:/R/RLIBS’
    > (car ‘lib’ n'est pas spécifié)
    >> install.packages("lme4") Installation d(es) package(s) dans
    > ‘C:/R/RLIBS’ (car ‘lib’ n'est pas spécifié) essai de l'URL
    > 'http://cran.r-project.org/bin/windows/contrib/2.15/lme4_0.999375-42.zip'
    > Content type 'application/zip' length 1300772 bytes (1.2 Mb) URL
    > ouverte downloaded 1.2 Mb

    > le package ‘lme4’ a été décompressé et les sommes MD5 ont été vérifiées
    > avec succés

    > Les packages binaires téléchargés sont dans
    > C:\Temp\RtmpsnSVf7\downloaded_packages
    >> update.packages(checkBuilt = TRUE) Matrix : Version 1.0-5 installed in
    > C:/R/RLIBS built under R 2.15.0 Version 1.0-7 available at
    > http://R-Forge.R-project.org Update (y/N/c)?  y essai de l'URL
    > 'http://R-Forge.R-project.org/bin/windows/contrib/2.15/Matrix_1.0-7.zip'
    > Content type 'application/zip' length 3252028 bytes (3.1 Mb) URL
    > ouverte downloaded 3.1 Mb

    > le package ‘Matrix’ a été décompressé et les sommes MD5 ont été 
    > vérifiées avec succés

    > Les packages binaires téléchargés sont dans
    > C:\Temp\RtmpCGB7op\downloaded_packages
    >> library(lme4)
    > Le chargement a nécessité le package : lattice
    > Le chargement a nécessité le package : Matrix
    >> example(lmer)

    lmer> ## linear mixed models - reference values from older code
    lmer> (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
    > Erreur dans diag(val) :
    > 7 arguments passed to .Internal(identical) which requires 6


    > Renaud


    > Le 13/04/2012 09:19, Martin Maechler a écrit :
    >>>>>>> "l" == lancelot<renaud.lancelot at cirad.fr>
    >>>>>>> on Fri, 13 Apr 2012 08:55:24 +0200 writes:
    >> 
    >> >  I re-installed the previous version of Matrix (Matrix_1.0-5.tar.gz
    >> >  available on CRAN) from source, and it now works (see below).
    >> 
    >> >  I confirm there is a problem - at least on Windows - between lme4
    >> >  and R-Forge present versions) and the present version of
    >> >  Matrix 1.0-6.
    >> 
    >> Hmm, I very much doubt this, at it least in this generality.
    >> Other people have seen similar problems (not involving lme4 at
    >> all), on R-help or R-devel, and the solution has been to
    >> re-install packages (or R!) only.
    >> 
    >> The mismatch of number of arguments of .Internal(identical)
    >> is really from using packages that were *built* with one version
    >> of R, in a different version of *R*.
    >> 
    >> So, in principle
    >> 
    >> update.packages(checkBuilt = TRUE)
    >> 
    >> should get you there.
    >> 
    >> Regards,
    >> Martin Maechler
    >> 
    >> 
    >> >  All the best,
    >> 
    >> >  Renaud
    >> 
    >> >>  sessionInfo()
    >> >  R version 2.15.0 (2012-03-30)
    >> >  Platform: i386-pc-mingw32/i386 (32-bit)
    >> 
    >> >  locale:
    >> >  [1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252
    >> >  LC_MONETARY=French_France.1252 LC_NUMERIC=C
    >> >  LC_TIME=French_France.1252
    >> 
    >> >  attached base packages: [1] stats graphics grDevices utils datasets
    >> >  methods base
    >> 
    >> >  other attached packages:
    >> >  [1] lme4_0.999902344-0 Matrix_1.0-5       lattice_0.20-6
    >> 
    >> >  loaded via a namespace (and not attached):
    >> >  [1] grid_2.15.0    MASS_7.3-17    minqa_1.2.0    nlme_3.1-103
    >> >  splines_2.15.0 tools_2.15.0
    >> 
    >> 
    >> >>  library(lme4)
    >> >  Le chargement a nécessité le package : lattice
    >> >  Le chargement a nécessité le package : Matrix
    >> >>  example(lmer)
    >> 
    lmer> ## linear mixed models - reference values from older code
    lmer> (fm1<- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
    >> >  Linear mixed model fit by REML ['lmerMod']
    >> >  Formula: Reaction ~ Days + (Days | Subject)
    >> >  Data: sleepstudy
    >> 
    >> >  REML criterion at convergence: 1743.628
    >> 
    >> >  Random effects:
    >> >  Groups   Name        Variance Std.Dev. Corr
    >> >  Subject  (Intercept) 612.10   24.741
    >> >  Days         35.07    5.922   0.066
    >> >  Residual             654.94   25.592
    >> >  Number of obs: 180, groups: Subject, 18
    >> 
    >> >  Fixed effects:
    >> >  Estimate Std. Error t value
    >> >  (Intercept)  251.405      6.825   36.84
    >> >  Days          10.467      1.546    6.77
    >> 
    >> >  Correlation of Fixed Effects:
    >> >  (Intr)
    >> >  Days -0.138
    >> 
    lmer> (fm2<- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject),
    >> >  sleepstudy))
    >> >  Linear mixed model fit by REML ['lmerMod']
    >> >  Formula: Reaction ~ Days + (1 | Subject) + (0 + Days | Subject)
    >> >  Data: sleepstudy
    >> 
    >> >  REML criterion at convergence: 1743.669
    >> 
    >> >  Random effects:
    >> >  Groups   Name        Variance Std.Dev.
    >> >  Subject  (Intercept) 627.58   25.052
    >> >  Subject  Days         35.86    5.988
    >> >  Residual             653.58   25.565
    >> >  Number of obs: 180, groups: Subject, 18
    >> 
    >> >  Fixed effects:
    >> >  Estimate Std. Error t value
    >> >  (Intercept)  251.405      6.885   36.51
    >> >  Days          10.467      1.560    6.71
    >> 
    >> >  Correlation of Fixed Effects:
    >> >  (Intr)
    >> >  Days -0.184
    >> 
    lmer> anova(fm1, fm2)
    >> >  Data: sleepstudy
    >> >  Models:
    >> >  fm2: Reaction ~ Days + (1 | Subject) + (0 + Days | Subject)
    >> >  fm1: Reaction ~ Days + (Days | Subject)
    >> >  Df    AIC    BIC  logLik deviance  Chisq Chi Df Pr(>Chisq)
    >> >  fm2  5 1762.0 1778.0 -876.00   1752.0
    >> >  fm1  6 1763.9 1783.1 -875.97   1751.9 0.0639      1     0.8004
    >> 
    >> 
    >> 
    >> >  Le 12/04/2012 20:11, Joehanes, Roby (NIH/NHLBI) [F] a écrit :
    >> >>  Hi Renaud,
    >> >>
    >> >>  It works okay in my computer (Linux). Maybe you want to update all
    >> >>  underlying libraries?
    >> >>
    >> >>  Hope this helps, Roby
    >> >>
    >> >>  (fm1<- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
    >> >>
    >> >>  _______________________________________________
    >> >>  R-sig-mixed-models at r-project.org mailing list
    >> >>  https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
    >> >>
    >> 
    >> >  --
    >> >  Renaud Lancelot
    >> >  EDENext Project, coordinator: http://www.edenext.eu/
    >> 
    >> >  CIRAD, UMR15, Campus International de Baillarguet TA A-DIR / B
    >> >  F34398 Montpellier
    >> 
    >> >  Tel.  +33 4 67 59 37 17  -  Fax  +33 4 67 59 37 98
    >> >  Secr. +33 4 67 59 37 37  - Cell. +33 6 77 52 08 69
    >> 
    >> >  _______________________________________________
    >> >  R-sig-mixed-models at r-project.org mailing list
    >> >  https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
    >> 

    > -- 
    > Renaud Lancelot
    > EDENext Project, coordinator: http://www.edenext.eu/

    > CIRAD, UMR15, Campus International de Baillarguet TA A-DIR / B
    > F34398 Montpellier

    > Tel.  +33 4 67 59 37 17  -  Fax  +33 4 67 59 37 98
    > Secr. +33 4 67 59 37 37  - Cell. +33 6 77 52 08 69



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