Skip to content
Prev 174470 / 398502 Next

factor with numeric names

Dear Saiwing Yeung,

You appear to be using orthogonal-polynomial contrasts (generated by
contr.poly) for Seed, which suggests that Seed is either an ordered factor
or that you've assigned these contrasts to it. Because Seed has 14 levels,
you end up fitting an degree-13 polynomial. If Seed is indeed an ordered
factor and you want to use contr.treatment instead then you could, e.g., set
Loblolly$Seed <- as.factor(Loblolly$Seed). (If I'm right about Seed being an
ordered factor, your solution worked because it changed Seed to a factor,
not because it used non-numeric level names.)

I hope this helps,
 John
On
http://www.R-project.org/posting-guide.html