[R] ordered and unordered variables
David Winsemius
dwinsemius at comcast.net
Thu May 23 06:12:36 CEST 2013
On May 22, 2013, at 7:44 PM, meng wrote:
> It's not homework.
> I met this question during my practical work via R.
> The boss is an expert of biology,but he doesn't know statistics.So I must find the right method to this work.
>
Yes, you must. Unfortunately, the Rhelp mailing list is for problem with R coding, but _not_ designed to offer tutorials on the proper education of stats-challenged biologists. It is an unfortunate truth that many a physician or biologist may rise to a position of authority without a proper grounding in statistics. The rectification of those deficiencies is not the stated goal of R help.
--
David Winsemius, MD, MPH
>
>
>
>
>
>
>
> At 2013-05-22 17:30:34,"Uwe Ligges" <ligges at statistik.tu-dortmund.de> wrote:
> >
> >
> >On 22.05.2013 07:09, meng wrote:
> >> Thanks.
> >>
> >>
> >> As to the data " warpbreaks", if I want to analysis the impact of tension(L,M,H) on breaks, should I order the tension or not?
> >
> >No homework questions on this list, please ask your teacher.
> >
> >Best,
> >Uwe Ligges
> >
> >
> >
> >
> >
> >>
> >>
> >> Many thanks.
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> At 2013-05-21 20:55:18,"David Winsemius" <dwinsemius at comcast.net> wrote:
> >>>
> >>> On May 20, 2013, at 10:35 PM, meng wrote:
> >>>
> >>>> Hi all:
> >>>> If the explainary variables are ordinal,the result of regression is different from
> >>>> "unordered variables".But I can't understand the result of regression from "ordered
> >>>> variable".
> >>>>
> >>>> The data is warpbreaks,which belongs to R.
> >>>>
> >>>> If I use the "unordered variable"(tension):Levels: L M H
> >>>> The result is easy to understand:
> >>>> Estimate Std. Error t value Pr(>|t|)
> >>>> (Intercept) 36.39 2.80 12.995 < 2e-16 ***
> >>>> tensionM -10.00 3.96 -2.525 0.014717 *
> >>>> tensionH -14.72 3.96 -3.718 0.000501 ***
> >>>>
> >>>> If I use the "ordered variable"(tension):Levels: L < M < H
> >>>> I don't know how to explain the result:
> >>>> Estimate Std. Error t value Pr(>|t|)
> >>>> (Intercept) 28.148 1.617 17.410 < 2e-16 ***
> >>>> tension.L -10.410 2.800 -3.718 0.000501 ***
> >>>> tension.Q 2.155 2.800 0.769 0.445182
> >>>>
> >>>> What's "tension.L" and "tension.Q" stands for?And how to explain the result then?
> >>>
> >>> Ordered factors are handled by the R regression mechanism with orthogonal polynomial contrasts: ".L" for linear and ".Q" for quadratic. If the term had 4 levels there would also have been a ".C" (cubic) term. Treatment contrasts are used for unordered factors. Generally one would want to do predictions for explanations of the results. Trying to explain the individual coefficient values from polynomial contrasts is similar to and just as unproductive as trying to explain the individual coefficients involving interaction terms.
> >>>
> >>> --
> >>>
> >>> David Winsemius
> >>> Alameda, CA, USA
> >>>
> >>
> >> [[alternative HTML version deleted]]
> >>
> >> ______________________________________________
> >> R-help at r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >>
>
>
>
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list