0
$\begingroup$

I am estimating a logistic model for a binary $Y$ (0=controls, 1=cases), and a set of covariates ($x_1, x_2, x_3, \ldots$) including sex (male, female). I know from the data that risk of $y$ is quite different for males and females with certain covariates.

What I was trying to do, with no success so far, was to fit one single model for entire data to get estimates for $x_1, x_2, x_3$ for example, and gender specific OR for let's say $x_4, x_5$.

I am totally confused with terminology: I have tried nested analysis (which does not apply here because I have one observation per subject), multilevel modeling, and multinomial (0=controls, 1=male cases, 2=female cases). Multinomial seems like what I need, but in Stata that I am using, mlogit gives me coefficients for y=1 and y=2 for all covariates, and I can not figure out how to get aggregate coefficients for all male and female cases for certain set of covariates (which are not supposed to be gender-specific). There must be some straightforward way to get OR for both from the same model, without manually calculating the coefficients and CIs.

Any suggestions would help.

$\endgroup$
  • $\begingroup$ The form of regression you want depends on the nature of the dependent variable. SO, what is y? $\endgroup$ – Peter Flom Aug 13 '13 at 20:46
  • $\begingroup$ This is not a case/control study. Y is outcome of a screening test to identify positive cases of an infection among a cohort. $\endgroup$ – farnaz Aug 13 '13 at 21:47
  • 2
    $\begingroup$ If Y is dichotomous (e.g. sick/not sick) you want bivariate logistic. Using "controls" and "cases" in this way is going to cause a lot of confusion, I suggest changing the terms. $\endgroup$ – Peter Flom Aug 13 '13 at 21:48
3
$\begingroup$

In Stata that supports factor variables, you need something like

 logit y x1 x3 x3 ibn.gender#(ibn.x4 c.x5)

where the last term is the interaction of gender with a categorical x4 and a continuous x5.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ thank you @StasK. I did use something similar to your suggestion. The problem is that it gives me one reference level (i.e. gender=female, x4=0). What I need is to compare different levels of x4 within males, and within females. Not males to females. females with females. $\endgroup$ – farnaz Aug 14 '13 at 19:54
  • $\begingroup$ Read on factor variables in Stata. There are multiple ways to specify these interactions, and you can find the one that works for you. See also the updated syntax. $\endgroup$ – StasK Aug 15 '13 at 12:09
  • 2
    $\begingroup$ A couple of the tricks that @StasK refers to are discussed in M.L. Buis (2012) "Stata tip 106: With or without reference", The Stata Journal, 12(1), pp. 162-164. maartenbuis.nl/publications/ref_cat.html $\endgroup$ – Maarten Buis Aug 15 '13 at 12:35
2
$\begingroup$

Your response can't logically be controls or male cases or female cases, for two reasons:

  • The difference between controls and cases is given by the study design; it is not an outcome or response.

  • The difference between males and females likewise is given at the beginning of the study and presumably is unchanged throughout. That's not an outcome or response either.

But, as @Peter Flom also suggests, I can't follow from this what is the response any way? As terminology can be a problem, note that response, outcome or dependent variable are some of the terms in widespread use. It's whatever you want to explain and/or predict.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ You are correct. It could be terminology. I commented on @Peter Flom's answer. I am trying to predict odds of becoming a case given certain covariates. $\endgroup$ – farnaz Aug 13 '13 at 21:50
  • $\begingroup$ If you response is something like case of disease (or not a case) I woudn't call that case and control. $\endgroup$ – Nick Cox Aug 13 '13 at 21:58
1
$\begingroup$

So there's kind of a lot going on here. I don't think multinomial regression is what you want here, for a few reasons. First, you won't be able to get those aggregate coefficients. But more importantly the thing you're trying to predict (I assume) is whether the person is a case or control, not their gender. You want to understand odds ratios for gender, which means running a straightforward regression with gender as a predictor is better.

In particular, you'll want to include gender as a variable and potentially as an interaction term, especially for any covariates you think might be impacted by gender. The coefficients for gender from the model should let you calculate OR in a straightforward manner. Running men and women separately is also an option but that is equivalent to including a single interaction term for gender with all other variables simultaneously.

If you want a gender specific OR for only $x_4$ and $x_5$ then you should include gender as an interaction with those variables specifically.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ I am thinking of interaction terms. Maybe defining the correct reference level will solve my problem. I need to use all males with x4=0 as reference for example (male=1 & x4=0). $\endgroup$ – farnaz Aug 13 '13 at 21:54

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.