[R-sig-ME] models with no fixed effects

Daniel Farewell farewelld at Cardiff.ac.uk
Thu Sep 11 15:03:18 CEST 2008


I'm running into an error when using lmer to fit models with no fixed effects terms.

For example, generating some data with

df$y <- with(df <- data.frame(i = gl(5, 5), b = rep(rnorm(5), each = 5)), b + rnorm(25))

and fitting like this

fit1 <- lmer(y ~ 1 + (1 | i), df)

works fine. But fitting like this

fit0 <- lmer(y ~ 0 + (1 | i), df)

gives the following error:

CHOLMOD error: Pl?
Error in mer_finalize(ans) : 
  Cholmod error `invalid xtype' at file:../Cholesky/cholmod_solve.c, line 971

Am I missing something obvious?

Many thanks,

Daniel

Here's my sessionInfo(), in case it's useful:

R version 2.7.1 (2008-06-23) 
i386-apple-darwin8.10.1 

locale:
en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] lme4_0.999375-26   Matrix_0.999375-15 lattice_0.17-8    

loaded via a namespace (and not attached):
[1] grid_2.7.1




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