1
$\begingroup$

I know that contr.poly creates orthogonal polynomials of degree 1, 2, etc. so that you can determine if there is a particularly mathematical pattern (e.g., linear, quadratic, cubic, etc.). And, contr.sum provides orthogonal contrasts where you compare every level to the overall mean.

Are categorical variables always coded with contr.sum? And continuous with contr.poly? How do you know which one you should use to specify your variable?

$\endgroup$
1
  • $\begingroup$ It's a little bit more complex. It depends on what you want to compare. rpubs.com/monajhzhu/608609 $\endgroup$
    – skan
    Commented May 24, 2023 at 8:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.