2
$\begingroup$

I'm building a predictive model for a medical condition that happens in both men and women. Physicians have reported that in some cases for women, their menstrual history seems to be a risk factor, though epidemiologists haven't been able to verify this claim. My data includes information about female subjects' menstrual history. My goal is to build a logistic regression model that determines the probability of the existence of this condition. Here's my problem: I'd like to build a model that includes gender and includes menstrual history questions for female subjects, but how do I assign values for male subjects for things like "number of months since last pregnancy"? Is there a general method to deal with this kind of problem?

$\endgroup$
3
  • 6
    $\begingroup$ create dummy for variable, which is 1 for females, then include female specific variables multiplied by this dummy y ~ x + is.female:nmonths $\endgroup$
    – jem77bfp
    Nov 17 '12 at 9:09
  • 1
    $\begingroup$ Thanks! It's a simple and brilliant solution: create an interaction term. It's really an elegant solution. Thank you again! $\endgroup$
    – user765195
    Nov 17 '12 at 18:12
  • 1
    $\begingroup$ In canada the gender is not a binary variable, not even categorical, but a continuous one :) $\endgroup$
    – Aksakal
    Jul 9 '18 at 13:57
1
$\begingroup$

Answered in comments: Create dummy, which is 1 for females, 0 for males, then include female specific variables multiplied by this dummy y ~ x + is.female:nmonths – jem77bfp

$\endgroup$
2

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