[R-sig-ME] bug?

Douglas Bates bates at stat.wisc.edu
Wed Aug 20 15:29:43 CEST 2008


Thanks for the suggestion, Ben.  It is unfortunate that nlme and lme4
don't play well with each other.  It was a design decision intended to
allow the same extractor function names to be used in both packages so
that users didn't need to learn new pseudonyms for "ranef", "fixef",
"VarCorr", etc.

With regard to the conflicting generic from the aod package, Martin
has suggested to me privately that we import the stats namespace
entirely and that seems to be the best solution.  It should appear on
R-forge packages tonight and on CRAN in a couple of days.

On Wed, Aug 20, 2008 at 8:00 AM, Ben Bolker <bolker at zoology.ufl.edu> wrote:
>
> Antonio.Gasparrini at lshtm.ac.uk wrote:
>> Dear all,
>>
>> I found a problem with 'lme4'. Basically, once you load the package 'aod' (Analysis of Overdispersed Data), the functions 'lmer' and 'glmer' don't work anymore:
>>
>> library(lme4)
>> (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
>> (gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
>>               family = binomial, data = cbpp))
>> install.packages("aod")
>> library(aod)
>> (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
>> (gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
>>               family = binomial, data = cbpp))
>>
>> Taking into account that this package is used to perform similar analyses, this could be a problem.
>>
>> All the best
>>
>
>  It looks like you already posted this to r-help and got some answers
> (i.e., this is a problem with aod changing the S4 method for "AIC").
>
>  For convenience, I sometimes use functions like this
>
> load_lme4 <- function() {
>  try(detach("package:nlme"),silent=TRUE)
>  library(lme4)
> }
>
> load_nlme <- function() {
>  try(detach("package:lme4"),silent=TRUE)
>  library(nlme)
> }
>
>  to switch back and forth between lme4 and nlme (which also
> don't play all that nicely with each other) -- you could do
> the same sort of thing if you are going to use lme4 and aod
> in the same R session.
>
>  Ben Bolker
>
> _______________________________________________
> R-sig-mixed-models at 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