我一直在尝试找到R 中ordered无序factor变量和无序变量之间的区别。尤其是文档中的这一行?factor让我感到困惑:
Ordered factors differ from factors only in their class, but methods and
the model-fitting functions treat the two classes quite differently.
Run Code Online (Sandbox Code Playgroud)
我最接近找到答案的是从这三个问题的答案:
在对上述第一个问题的回答中,@joran说“统计差异的详细总结可能超出了 StackOverflow 回答的范围。”
我不是在这里寻找详细的总结,但是谁能给出一个小而简单的例子来演示在方法和模型拟合函数中使用时ordered无序和无序的factor区别?
默认情况下,有序因子使用正交多项式对比。L 和 Q 代表线性项和二次项。无序因素使用“处理”对比(它们实际上不是对比)。
为了理解,请阅读: http://r.789695.n4.nabble.com/Models-with-ordered-and-unordered-factors-td4072225.html http://www.stat.berkeley.edu/~s133/factors。 html