1
$\begingroup$

I am building a regression model and have run into an issue. I'm trying to build a model that predicts the weight of a baby when it is born. One of the explanatory variables is the race of the parents.

In some cases, the baby's parents will have one race and in some, it will have multiple. There is no distinction between the mother or father's race, so essentially I have Parent 1 and Parent 2 as variables. However, the order does not matter, meaning Parent 1 and Parent 2 could have their values swapped with no change to the predictor variable.

I know I have to encode the values categorically but I'm not sure how to handle the Parent 1 and Parent 2 variables such that order doesn't matter. I'm not sure if my issue is coming off as clear so please ask follow-up questions if you're not sure what I'm talking about.

$\endgroup$

1 Answer 1

3
$\begingroup$

It seems to me that the mother and the father don't contribute equally to the baby's weight at birth. Certainly, both contribute nuclear DNA, which would have some influence, but the mother's nutritional status potentially matters more. Thus, I would analyze the data using two categorical variables (viz., mothers_race, and fathers_race). If you are really committed to only caring about what the combination of the races is, then make just one categorical variable, with all possible combinations (irrespective of order) as the levels (i.e., both_white, both_black, both_asian, ..., white_black, etc.).

$\endgroup$
2
  • $\begingroup$ thanks for the response! I have a different question. What about the case where I'm doing something like top 4 actors in a movie to predict box office success? This strategy wouldn't work because there are too many combinations and not enough data points. What would you suggest for that? $\endgroup$
    – mlbrulz
    Jul 13, 2021 at 20:26
  • $\begingroup$ @BaileyKumar, you should probably ask a new question for that. I would have a variable for each actor under consideration. It isn't sensible that all the actors in the universe matter--it's probably just the top 20 or so stars. $\endgroup$ Jul 13, 2021 at 20:51

Your Answer

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

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