Skip to content

Unexplained behavior of level names when using ordered factors in lm?

6 messages · Tal Galili, David Winsemius, Bert Gunter +1 more

#
On Dec 2, 2011, at 9:51 AM, Tal Galili wrote:

            
Those are polynomial contrasts: linear, quadratic, cubic and quartic.  
If you don't want contrasts based on ordered factors then just use  
regular factors. You should probably be looking at:

?"C"

(...yet another function whose name should be avoided in naming data- 
objects.)
#
?ordered
?C
?contr.poly

If you don't know what polynomial contrasts are, consult any good
linear models text. MASS has a good, though a bit terse, section on
this.

-- Bert
On Fri, Dec 2, 2011 at 6:51 AM, Tal Galili <tal.galili at gmail.com> wrote:

  
    
#
Maybe should have explicitly said:
[1] 1 2 3 4 5
attr(,"contrasts")
   ordered
contr.poly
Levels: 1 < 2 < 3 < 4 < 5

-- Bert
On Fri, Dec 2, 2011 at 7:06 AM, Bert Gunter <bgunter at gene.com> wrote:

  
    
#
Hi Bert,

Since you opened the door ...
On Fri, Dec 2, 2011 at 10:06 AM, Bert Gunter <gunter.berton at gene.com> wrote:
Do you have a "favorite" liner model text with a bit more exposition than MASS?

Even though this list isn't for teaching stats, whenever I can catch
some of the tried and true statisticians talking about texts on
specific subject matter, I like to take advantage of it to see what I
need to add to my amazon wish list to help sharpen the old saw :-)

Thanks,
-steve