# Choosing between logistic regression and Mann Whitney/t-tests

I have a dichotomous variable $A$, which does not have an a priori determined proportion of 0's and 1's, and a continuous variable $b$.

In scenario 1, I decide to designate $A$ as the independent variable $X$, and $b$ as the dependent variable $y$. I then test $X$ against $y$ using tests such as Mann Whitney (distribution-free), t-test (normal distribution), etc.

In scenario 2, I decide to designate $A$ as the dependent variable $Y$, and $b$ as the independent variable $x$. I then test $x$ against $Y$ using logistic regression.

1. Which model should I choose when I do not know the directionality of the relationship between $A$ and $b$, i.e. I can't decide whether $A$ is the independent variable or $b$ is the independent variable?

2. If I'm unsure which are the dependent or independent variables, would it be invalid for me to use the t-test/Mann-Whitney in the first instance as a sort of univariate analysis, and then use logistic regression as a multivariate analysis?

-
So A is not only categorical, but even 0-1? Just two categories? Perhaps you want to slightly edit your first sentence. –  Stephan Kolassa Oct 27 '12 at 20:14
@StephanKolassa Done. You're right it's a dichotomous variable. –  jetistat001 Oct 27 '12 at 20:25

The answer to question 1 will depend on your research question, and who the audience are for the result.

If your research question points to talking about differences in b based on the profile of A, then that will obviously help frame your summary. In an epidemiological study, even if you're not sampling based on A (independent variable as exposed/unexposed status) it would still make sense to use this classification as an independent variable [exposure] and the continuous variable as a dependent variable [outcome]. It sounds like you already know the answer to this.

You should also consider how you might interpret the result in terms of presenting the results to others (and interpreting it yourself). A continuous-variable-as-dependent variable [outcome] model would have a mean difference (or similar) as one summary; a dichotomous-variable-as-outcome model would have an odds ratio (ratio of increased odds per one unit of the continuous variable, which could be scaled to give e.g. relative increase per five kilos of additional weight for likelihood of type II diabetes.)

My experience from consulting settings and explaining this to people is that the former (difference in means) is generally more easy to explain to other people than the latter (odds ratio per one unit difference of continuous independent variable.)

For your question 2, if you want to run a multivariable model, where you're controlling for covariates, then it will help to choose dependent/independent variables at the start. It's probably best to stick with the same method from univariate to multivariable analysis, rather than changing between the two approaches, just from ease of explanation.

Final note on this latter point: from a hypothesis testing perspective, a logistic regression with a continuous independent variable [exposure] and [single] dichotomous dependent variable should return the same p-value as an unpaired t-test assuming unequal variance with the variables reversed (from memory -- I'm not entirely sure if this is always true though.)

-
Answering this question (stats.stackexchange.com/questions/48381/…) I found the following paper which formally discusses power equivalence between binary logistic regression and an unpaired t-test ncbi.nlm.nih.gov/pubmed/9699234 –  James Stanley Jan 24 at 4:09

The Wilcoxon-Mann-Whitney test is a special case of the proportional odds ordinal logistic model so you could say there is no need to turn the model around to use logistic regression. But the fundamental issue in choosing the model is to determine which variables make sense to adjust for.

-
Yours is a very interesting and keen notion, @Frank, but is not detailed. Please elaborate it for me: what is this 'special case' when ordinal logistic regression of a quantitative variable on a dichotomous variable is exactly equivalent to Mann-Whitney test? –  ttnphns Nov 20 '12 at 9:42
A proportional odds model with only a series of dummy variables as predictors, representing k groups, is equivalent to a Kruskal-Wallis rank ANOVA with k groups (k=2 -> Wilcoxon). The numerator of the score statistic is the rank ANOVA statistic (Wilcoxon). –  Frank Harrell Nov 20 '12 at 14:25
Please, @Frank, can you find time to demonstrate (prove) the equivalency on some small data right in your answer? It would be interesting and important. A reference, if any, might be nice, too. Many thanks. –  ttnphns Nov 20 '12 at 15:16
See Whitehead, John: Sample size calculations for ordered categorical data. Statistics in Medicine 12:2257-2271;1993. See letter to editor SM 15:1065-6 for binary case;see errata in SM 13:871 1994 –  Frank Harrell Nov 20 '12 at 17:41
Could you expand upon your last sentence in the answer? Thanks. –  jetistat001 Nov 24 '12 at 19:34
show 1 more comment

That's an attempt of a partial answer:

I'd use a Mann Whitney test because it makes less assumptions. The logistic regression assumes a close form (namely logit) for the relationship between these two variables). Moreover, logistic regression assumes that $Y$ is Bernoulli given $X$: if this is not the case (e.g., an a priori number of samples with $Y=1$ and $Y=0$ as in a case-control study) was selected, I'm not sure if the results (such as p-values) would still hold. However, I already saw many people doing this.

On the other hand, Mann Whitney does not seem to have problems with this, i.e., it holds whether or not it is a case-control study.

-
+1 re the a priori constitution of $Y$. It's an important point and I should've mentioned that there is no a priori number of samples in any of the scenarios I describe, and $Y$ does follow Bernoulli. In favor of LR, it could be argued that LR offers a multivariate analysis. Any ideas on the notion of using both consecutively? –  jetistat001 Oct 28 '12 at 15:36
I don't think the choice between using the logit & probit link has much to do w/ whether the probabilities are close to .5. I have written about the choice of link here: difference-between-logit-and-probit-models. I have heard people suggest the cloglog when the response categories are unbalanced, but other options exist. –  gung Nov 19 '12 at 18:54