
   
   Dear R list:

   I am fitting a model where I have several covariates which are coefficients 
of variation. For some reason, the software interprets them as factors. I was 
converting them with the function "as.numeric", but when doing so, the variable 
is converted into an ordinal categorical one.
   I have tried the “as.is” function but I get this message:
 
In read.table("Coefvar insects 2009+2010.txt", header = T, as.is = "bithrcoef") 
:
  not all columns named in 'as.is' exist
 
   Could you tell me wich is the most suitable converting function I should use? 
I’ve tried “as.vector” and “as.character”, but I get this error messages when 
fitting the model with lme or lmer:
   With lmer:
   
“insectmodel2<-lmer(inslarge~tlengthcoef+brivencoef+brithrcoef+condcoef+sex+tlengthcoef:sex+brivencoef:sex+brithrcoef:sex+condcoef:sex+tlengthcoef:brivencoef+tlengthcoef:brithrcoef+tlengthcoef:condcoef+brivencoef:brithrcoef+brivencoef:condcoef+brithrcoef:condcoef+(1|year))”

   Error in mer_finalize(ans) : Downdated X'X is not positive definite, 35.
Also: lost warning messages
1: In model.matrix.default(mt, mf, contrasts) :
  variable 'tlengthcoef' converted to a factor
2: In model.matrix.default(mt, mf, contrasts) :
  variable 'brivencoef' converted to a factor
3: In model.matrix.default(mt, mf, contrasts) :
  variable 'brithrcoef' converted to a factor
4: In model.matrix.default(mt, mf, contrasts) :
  variable 'condcoef' converted to a factor
 
   With lme:  
   
“insectmodel2<-lme(inslarge~tlengthcoef+brivencoef+brithrcoef+condcoef+sex+tlengthcoef:sex+brivencoef:sex+brithrcoef:sex+condcoef:sex+tlengthcoef:brivencoef+tlengthcoef:brithrcoef+tlengthcoef:condcoef+brivencoef:brithrcoef+brivencoef:condcoef+brithrcoef:condcoef,random=~1|year)”

Error in MEEM(object, conLin, control$niterEM) : 
  Singularity in backsolve at level 0, block 1
Also: Lost warning messages
1: In model.matrix.default(fixed, data = X) :
  variable 'tlengthcoef' converted to a factor
2: In model.matrix.default(fixed, data = X) :
  variable 'brivencoef' converted to a factor
3: In model.matrix.default(fixed, data = X) :
  variable 'brithrcoef' converted to a factor
4: In model.matrix.default(fixed, data = X) :
  variable 'condcoef' converted to a factor
 
 
   Any help will be greatly appreciated.
 
   Thank you very much. Iker
	[[alternative HTML version deleted]]


