- Thread starter w wang
- Start date

dozens of statistical software packages and statistical online calculators out there.

You want to know whether the binary variable and the interval scaled variable are associated?

So you use the binary variable as the

variable as the

With kind regards

Karabiner

I am trying to run the independent t test with SPSS. Normally you put binary variable as IV where you need to define the group. You put the continuous variable into the test variable. But now my IV is a continuous variable and my DV is a binary variable, can I still run the independent t test?

If I wanted to know if higher age predicts major depression yes/no, then I'd have a look at whether depressed subjects have

a higher mean age than undepressed subjects. To use a logistic regression in order to determine the odds ratio for each

additional year of age could be informative, but it is often not necessary, I suppose.

With kind regards

Karabiner

OP, it would also help if you described what your variables and context was. Yes, if I wanted to test whether sex predicts weight - boom t-test may be an option. If you wanted to test whether the probability of death is predicted by weight - boom a logistic regression may be an option.

However, with many binary dependent variables - time to event between groups may also be of interest, and survival analysis may be applicable. Also, if your binary IV is a treatment or intervention that was not randomized, you may need to control for difference between these groups. So describing your context becomes important from our perspective! But you seem to now be on the right path!

Independent variable means the variable that is the "predictor" (the x in a linear regression). The dependent variable is the variable that is being predicted (the y in the linear regression).

It is a matter of labeling and of interpretation. If one needs a coefficient, maybe logistic regression

is the better choice (or perhaps a biserial correlation).

With kind regards

Actually I had noticed something about the relationship between logistic regression and 2 sample exact tests. Namely the p-value for the exact logistic regression ends up being same as p-value for the exact 2-sample test with scores=data. At least i have not observed any difference although i never quite got to looking at it in any depth.

ie these are THsame

Code:

```
PROC GENMOD DATA = A;
MODEL X = Y...
EXACT Y
AND
PROC NPAR1WAY DATA = A;
VAR Y
CLASS X
EXACT SCORES
RUN
```