[R] ordered and unordered variables
PIKAL Petr
petr.pikal at precheza.cz
Thu May 23 09:44:24 CEST 2013
Hi
Try to put your question on stackexchange. Or maybe it is already answered there. I am not an statistical expert but based on common sense (which can be counter intuitive sometimes) I will use ordered factor if I expect influence of tension value on breaks. Anyway I will probably consult more experienced people around or some textbook.
Regards
Petr
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of meng
> Sent: Thursday, May 23, 2013 4:44 AM
> To: Uwe Ligges
> Cc: R help
> Subject: Re: [R] ordered and unordered variables
>
> 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.
>
>
>
>
>
>
>
>
>
>
>
>
> 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.
> >>
>
> [[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.
More information about the R-help
mailing list