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?
Asked
Active
Viewed 216 times
1 Answers
1
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
kjetil b halvorsen
- 77,844
-
Sorry, but how does your answer and your marking the question as a "duplicate" add any value to this? The question that you tagged this to be a duplicate of was asked 5 years after I asked this question, so if anything, that question is a duplicate of this and not the other way around. Also, the comment by @jem77bfp clearly answers my question and I acknowledge it as such in my comment. – user765195 Feb 18 '19 at 04:23
-
Thanks for your good question! Please see https://stats.meta.stackexchange.com/questions/4826/if-question-a-came-before-question-b-how-can-a-be-a-duplicate-of-b and https://stats.meta.stackexchange.com/questions/2641/etiquette-for-answering-old-questions-addressed-in-comments. Also https://stats.meta.stackexchange.com/questions/2932/how-to-decrease-the-number-of-unanswered-questions/2951#2951 – kjetil b halvorsen Feb 18 '19 at 09:48
y ~ x + is.female:nmonths– jem77bfp Nov 17 '12 at 09:09