Hello!

I am having an issue with figuring out how to look at the differences between two groups in my sample. I am using a ttest to figure out the difference between the means of two groups on my exposure variable with no problem,

Syntax:

ttest exposure, by (group)

However, I would also like to look at the differences between the individual scores for the exposure variable for my two groups (range 1-6). For example, i have different numbers in each group of people who score 2 and i would like to see if the difference is significant between the groups.

I tried treating the exposure as a discrete variable with the i. command which didn't work as the ttest needs to have a continuous variable,

Syntax:

ttest i.exposure, by (group)

I wondered if anyone had any advice on how i might do this?