[R-sig-ME] Variable () converted to a factor

Douglas Bates bates at stat.wisc.edu
Wed Jun 8 18:14:20 CEST 2011


Could you please send us the output from

library(lme4)
sessionInfo()
# whatever you do to attach your data
str(inslarge)
str('tlengthcoef)


On Wed, Jun 8, 2011 at 10:58 AM, Iker Vaquero Alba <karraspito at yahoo.es> wrote:
>
>   Hello, list:
>
>   I am trying to implement a model with lmer. The dependent variable is
> different insect abundances for different sites, and the explanatory variables
> are several coefficients of variation for the intensity of different sexual
> signals shown by swallows nesting in those sites. Measures were taken in two
> different years, so I included "year" as a random factor. As I was getting an
> error message, I decided to simplify the amalysis just to check were the problem
> could be. Still with the simplest possible analysis:
>
>   insectmodel2<-lmer(inslarge~tlengthcoef+(1|year))
>
>   I still get this message (sorry some parts are in Spanish, I don't know how
> to change that):
>
>   Mensajes de aviso perdidos
> 1: In model.matrix.default(mt, mf, contrasts) :
>  variable 'inslarge' converted to a factor
> 2: In model.matrix.default(mt, mf, contrasts) :
>  variable 'tlengthcoef' converted to a factor
> 3: In function (fr, FL, start, REML, verbose)  :
>  NAs introducidos por coerción (NAs introduced by coercion
>
>   It's funny that it converts my variables to factors when I've been struggling
> for that not to happen when attaching the data set.
>   Anyone can help me explain and deal with this problem? Thank you very much!
>
>   Iker
>        [[alternative HTML version deleted]]
>
>
> _______________________________________________
> 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