[R] interpreting results of regression using ordinal predictors in R

David Winsemius dwinsemius at comcast.net
Thu Jan 3 06:54:32 CET 2013


On Jan 2, 2013, at 9:22 PM, Ranjan Maitra wrote:

> Dear friends,
>
> Being very new to this, I was wondering if I could get some pointers
> and guidance to interpreting the results of performing a linear
> regression with ordinal predictors in R.
>
> Here is a simple, toy example:
>
> y <- c(-0.11, -0.49, -1.10,  0.08,  0.31, -1.21, -0.05, -0.40, -0.01,
>       -0.12, 0.55, 1.34, 1.00, -0.31, -0.73, -1.68,  0.38,  1.22,
>       -1.11, -0.20)
>
> x <- ordered(c(2, 3, 3, 3, 5, 1, 2, 2, 1, 6, 0, 3, 4, 2, 2, 4, 1, 1,  
> 1,
>             1))
> x
> # [1] 2 3 3 3 5 1 2 2 1 6 0 3 4 2 2 4 1 1 1 1
> # Levels: 0 < 1 < 2 < 3 < 4 < 5 < 6
>
> lm(formula = y ~ x)
>
> # Call:
> # lm(formula = y ~ x)
>
> # Coefficients:
> # (Intercept)          x.L          x.Q          x.C      
> x^4          x^5
> # -0.01679     -0.20788      0.46917        -0.45520 -0.05721      
> -0.28696
> # x^6
> # -0.31417
>
> ....
>
> Question: What exactly, does x.L, x.Q, x.C, x^4,

x.L,   linear
x.Q,  quadratic
x.C,  cubic
x^4   quartic


> etc stand for? How do
> these names, etc get assigned in the coefficients? Where do I find  
> more
> about this information?

Search on "orthogonal polynomials".

>
> Note that my question is not on lm (I think), but rather on how lm
> outputs the results of regressions involving ordered predictors. Some
> references would be great.
>
> Please post responses to this mailing list.
>

As always.

> Thanks very much again for all your help!
>
>
> -- 


David Winsemius, MD
Alameda, CA, USA




More information about the R-help mailing list