# Thread: t-test to find differences between groups

1. ## Re: t-test to find differences between groups

Thank you, I'll try it. I'm really unfamiliar with statistics, but this forum is great; thanks for your quick responses! Suppose I come back tomorrow with more questions :-)

2. ## Re: t-test to find differences between groups

Hi again! Thanks again for your responses!

I tried today: I made a new Excel file, containing only two columns: clicks_above and clicks_below
I calculated the Two-Group mean comparison test, then an error occurs:
. ttest clicks_below, by(clicks_above)
more than 2 groups found, only 2 allowed r(420);

No idea why the error occurs!!!

It works if I calculate the Two-sample mean comparison test, but that’s the wrong test, or?

Thanks a lot for your response!

3. ## Re: t-test to find differences between groups

Thats good. I think that was my oops to say put each column name into one of the empty boxes.

Now please cut and paste the content of one of the columns in the other column, exactly below the final cell of the first column. Now you have a column in which both clicks_above and clicks_below are included. Rename that column to "Clicks" or something similar, and remember that where your clicks_above and clicks_below cells stand. Now name the adjacent column to "grouping column" or something similar. In the "grouping column" Put a "1" beside each cell belonging to clicks_above group and put a "0" besides the cells in "Cllicks" column that belong to "clicks_below" group.

Now you have two columns. One has all your data, another has the pattern of distribution of your data into two groups. Now copy these two new columns into Stata and follow the above directions. When you saw two empty boxes, put the columns into the variable and grouping variable boxes and run the test.

4. ## Re: t-test to find differences between groups

Ahh, I see, I need a dummy variable! Makes sense, I'll try tomorrow. Your're great help!!