[R] lm with ordered factors
(Ted Harding)
Ted.Harding at nessie.mcc.ac.uk
Sat Nov 22 09:40:10 CET 2003
Hi Folks,
No doubt a question with a well-known answer, but I'm unfortunately
not managing to find it readily ... !
I have a quantitative variable Y and a 4-level ordered factor A
(with very unequal numbers at the different levels, by the way).
The command
lm(Y ~ A)
returns (amongst other stuff) an intercept, and coefficients
A.L, A.Q and A.C for the Linear, Quadratic and Cubic effects.
I'm trying to verify how R computes A.L, A.Q and A.C (equivalently,
and preferably, what are the definitions of these that correspond
to how R computes them). I haven't touched whatever R's default
settings may be for this operation.
Can some kind soul enlighten me?
With thanks,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 22-Nov-03 Time: 08:40:10
------------------------------ XFMail ------------------------------
More information about the R-help
mailing list