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

rebecca.sealfon at duke.edu rebecca.sealfon at duke.edu
Sat May 20 02:52:39 CEST 2006


I'm trying to perform ANCOVAs in R 1.14, on a Mac OS X, but I can't figure out
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?

I have another question: If possible I would like to use a robust fit algorithm
to fit the data.  When I attempt to do this, substituting rlm() for lm(), the
program returns another message:

Error in rlm.default(x, y, weights, method = method, wt.method = wt.method,  :
    'x' is singular: singular fits are not implemented in rlm

What is a singular fit and why is it, apparently, undesirable?  I am new to R
and any help would be greatly appreciated.

Thanks so much,
Rebecca Sealfon




More information about the R-help mailing list