[R] ANCOVA, Ops.factor, singular fit???

Peter Dalgaard p.dalgaard at biostat.ku.dk
Sat May 20 08:36:52 CEST 2006


rebecca.sealfon at duke.edu writes:

> I'm trying to perform ANCOVAs in R 1.14, on a Mac OS X, but I can't figure out

?! There's no version 1.14 of R.

> what I am doing wrong.  Essentially, I'm testing whether a number of
> quantitative dental measurements (the response variables in each ANCOVA) show
> sexual dimorphism (the sexes are the groups) independently of the animal's size
> (the concomitant variable).  I have attached a 13-column matrix as a data frame
> (so far, so good).  But then I tried to do this:
> 
> >model<-lm(ln2~sex*ln1)
> 
> or this:
> 
> >model<-lm(ln2~sex+ln1)
> 
> and got this:
> 
> Warning message:
> - not meaningful for factors in: Ops.factor(y, z$residuals)
> 
> which I don't understand.  (In my matrix, ln2 is the name of the second column,
> a response variable, and ln1 is the name of the first column, a concomitant
> variable.  Sex is the rightmost column, indicating sex.  The first 14 rows are
> measurements for male individuals, and the next 13 rows are measurements for
> female individuals.)
> 
> The data output is bizarre, too--it's just so long, and everything begins with
> "ln 11" or "ln 12".  How can I fix this?

My best guess is that you have a data error so that ln1 and ln2 are
not read as numeric variables. Nonstandard codes for missing will do
that to you, for instance.

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list