3
$\begingroup$

I'm quite familiar with traditional dummy variable coding - code 1 for presence of the attribute and 0 for absence. A multi-category variable is then represented by a series of dummy variables while omitting 1 category as the reference, so for a variable with n categories I would include n-1 dummy variables.

Simple.

But what happens if I have overlap in my categories?

Here's a simple (slightly contrived) example to illustrate.

Let's say I'm looking at the effect of different sports on injury (a dichotomous outcome). There are 6 sports - football, baseball, basketball, soccer, lacrosse, and hockey.

Now, I know what you're thinking, these ARE mutually exclusive, there is no overlap. True, I could represent these sports with 5 dummy variables and use one, say football, as the reference.

But instead I want to look at some facet of the sport that is related to injury. Put differently, it's not the 'sport' per se, but the actions involved in playing each sport. Some sports involve the same actions, so there is overlap.

I would like to have dummies such as the following:

  1. 'ball' is hard (baseball, hockey, lacrosse)
  2. all players wear helmets (lacrosse, hockey, football)
  3. floor/ground is hard (hockey, basketball)

Now, I think I can do this so long as the dummy variables are not highly collinear. That would be tantamount to the so called 'dummy variable trap'. Right? How would I check this? VIFs for the dummies? Condition number?

Is there anything else I need to look out for? Anything I'm missing?

In my actual application I'm thinking of around 5 'facets' and there are well over 50 different categories. I can collapse these categories down into 5 or so catchall categories but I'd rather not do that for theoretical reasons that we don't need to get into at this point.

I could let the machine chose the 'dimensions' or 'facets' via exploratory factor analysis, but I have a very specific set of theoretical 'facets' that I wish to test, hence the preference for dummy variables of my choosing.

$\endgroup$
  • 2
    $\begingroup$ You may find that the process of writing down an explicit model for your regression answers most of these questions. It's always a good exercise, anyway, because it clarifies one's thinking about the analysis. $\endgroup$ – whuber Jun 20 '12 at 17:02
  • 1
    $\begingroup$ "dummy variables with overlapping categories" is an oxymoron. Dummies represent a categorical variable with alternative categories. If categories (or facets, as you call them) are not mutually exclusive the binary variables are not called dummy and they lack the redundant category and can correlate freely. So, your "facets" are just conceptually independent binary predictors (covariates). $\endgroup$ – ttnphns Jun 20 '12 at 17:41
  • $\begingroup$ Terrible to say, I know, but I don't know matrix algebra or even calculus. With some effort I can make sense of basic formulas like OLS regression, but most models I understand in an intuitive way. I put a lot of stock into understanding what the model is 'doing' to the data - like how the variance is being partitioned - but very little effort in formulaic representations of the model. One of these days I'm going to take some math classes and remedy the situation but for now there's no way I could come up with a formulaic representation of the model I'm envisioning. $\endgroup$ – Will Jun 20 '12 at 17:43
  • $\begingroup$ @ttnphns Yes, that's what I thought. It would be just as dummy variables for race and sex 'overlap'. I have a colleague who suggested, though, that the 'black' dummy variable cannot overlap with a dummy variable for 'Hispanic ethnicity'. Being that that person has a Ph.D. and I don't (yet) I take pause when I hear something like this. I understand that each 'facet' has it's own reference (the 0 group) which represent the absence of that particular trait. I know the wording of the title was a little misleading but could think of no other apt descriptors. $\endgroup$ – Will Jun 20 '12 at 17:50
2
$\begingroup$

Question:

Can Dummy variables have overlapping categories?

Answer:

No.

Explanation:

Dummy variables arise when you try to recode Categorical variables with more than two categories into a series of binary variables. Since these categories partition your dataset (i.e. each observation can be assigned to one and only one of these 'k' categories), there is no way that there can be any "overlapping".

Now, with respect to the actual example you provide, there are two issues you should be aware of since they probably would otherwise screw up your analysis entirely:

  1. The binary variables which you describe are based, more or less, on arbitrary distinctions (for instance, would astroturf--more or less a rug covering concrete--really qualify as "soft" ground?).
  2. There's a good chance your model (as described in the OP) suffers from Multicollinearity (that is, that a linear combination of two or more of your independent variables are highly correlated).

Just something you should keep in mind the next time you run a regression... Anyway, hope this helps.

$\endgroup$
0
$\begingroup$

As others pointed out, dummy variables cannot be overlapping. What you have is several categorical variables, each of which will generate its own dummy variables.

But you are worried (justifiably) about collinearity. There are several things you can do here.

1) If you are using R you can check the extent of collinearity with the perturb package which deals nicely with categorical variables.

2) If there is collinearity, you could investigate ridge regression, a common method when the IVs are colinear. I don't think I've seen it used with exclusively categorical variables so you might want to check if that is possible with ridge regression, but I don't see why not. You could start here and here.

3) You should also look at the sports you have and how they line up with regard to the "facets" that you think are theoretically important. Unless you have an amazing number of sports, you are probably going to have a lot of blank combinations.

4) Some of your "categories" don't seem like categorical variables to me. Is the ball "hard"? That's not yes or no. You could come (fairly easily) with a measure of the hardness of the ball. Similarly for the ground. These should be continuous. I mean, it goes from water polo (what's softer than water?) to ice hockey (not much is harder than ice) with (say) volleyball in between (but beach volleyball at a different spot).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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