3
$\begingroup$

In regression with multiple explanatory categorical variables, how should I model the problem to compare the effects of the categorical variables with each other?

Most contrast coding schemes (e.g. also on Wikipedia) seem to be designed (or at least, that's how they are described) to compare the effects of different levels within a given categorical variable (e.g. German vs British nationality). But what if I want to compare contributions between categorical variables?

For example, say that we want to estimate the contribution of two explanatory categorical variables (dress size and color) to a single dependent variable (dress price). How can I design my coding to measure interpretable contributions of size and color to price?

$\endgroup$

1 Answer 1

1
$\begingroup$

Reference cell coding:

There are P categorical variables with N levels each. This will generate P*(N-1) dummies where some combination of levels of categories is selected as baseline and others are estimated in relation to it. Baseline could be S and Green for example. Coding is done by having 0/1 indicator for N-1 levels each.

Deviation from the mean coding is such that sum of codes is zero for N levels.

$\endgroup$
1
  • $\begingroup$ Thanks. I am still missing some level of detail on how to do this. Assuming that you have P(N-1) dummies (i.e. using one level per variable as a reference level), after fitting, how do I estimate the contribution of a full variable? $\endgroup$ Commented Apr 6, 2015 at 17:41

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.