[R-sig-ME] Mixed-effects conditional logistic regression in lme4 v. 1.0-4 and above

Javan Bauder javanvonherp at gmail.com
Tue Apr 22 15:56:18 CEST 2014

Hi Dr. Bolker

Thank you for responding to my post about installing an older version
of lme4. I wanted to respond to your question about why I need an
older version for my analyses.

The analysis I am running is a mixed-effects conditional logistic
regression. My colleagues and I are using these models to conduct
habitat selection analyses with wildlife telemetry data where each
telemetry point is paired with a measure of availability unique to
that point. We then difference the value of our independent variable
at the telemetry point (used) with the measure of availability for
that variable and fit a no-intercept logistic regression model to
those differences and use individual animal as a random slope effect.
We have used the following model structure:

lmer(1 ~ −1+diff100+…(-1+diff100+…|Individual), data=data, family=‘binomial’)

Whenever we have used this specification in the newer versions of lme4
(v 1.0-4 and above) we receive an error. For example, when using lmer
and lme4 v 1.0-4, I receive the following:

> mod1<-lmer(status~-1+Density+(-1+Density|Name),data=input,family='binomial',weights=Weight)
Error in function (fr, X, reTrms, family, nAGQ = 1L, verbose = 0L,
control = glmerControl(),  :
  Response is constant - cannot fit the model
In addition: Warning message:
In lmer(status ~ -1 + Density + (-1 + Density | Name), data = input,  :
  calling lmer with 'family' is deprecated; please use glmer() instead

When we try using glmer we receive the following error:

> mod1<-glmer(status~-1+Density+(-1+Density|Name),data=input,family='binomial',weights=Weight)
Error in function (fr, X, reTrms, family, nAGQ = 1L, verbose = 0L,
control = glmerControl(),  :
  Response is constant - cannot fit the model

Do you know of any ways to run this type of model structure in the new
versions of lme4 (or any other R package)? We would really appreciate
any insights you could provide.


> I am trying to install an old version of lme4 (v. 0.999999-2) in R
> 2.15.2 on my Windows 7 computer. The newer versions of lme4 do not
> support the analyses I am trying to conduct.

  Why not? (Just curious.)  Missing mcmcsamp() ?

> I saved the packaged
> archive file (lme4_0.999999-2(1).tar) to my hard drive and then used
> RStudio's "Install from Package Archive File" to attempt to install
> the package. However, I received the following error message:
> > install.packages("~/R/lme4_0.
>  repos = NULL, type = "source")


> *** arch - i386
> ERROR: compilation failed for package 'lme4'
> * removing 'C:/Users/JBauder/Documents/R/win-library/2.15/lme4'
> Warning in install.packages :
>   running command 'C:/PROGRA~1/R/R-215~1.2/bin/x64/R CMD INSTALL -l
> "C:/Users/JBauder    /Documents/R/win-library/2.15"
> "C:/Users/JBauder/Documents/R/lme4_0.999999-2(1).tar.gz"' had status 1
> Warning in install.packages :
>   installation of package
> ?C:/Users/JBauder/Documents/R/lme4_0.999999-2(1).tar.gz? had non-zero
> exit status


  Do you have all of the tools installed that are required to
build binary packages in R?

  Windows binary versions of lme4.0 (a backward compatibility
version of lme4) are available from


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