HELP! SPSS - Independent T- test - t cannot be computed because at least one of the groups is empty

#1
Hello,

I have a question regarding the independent t-test in SPSS. I already run a frequency test which does not show any data missing. What can I do to find the mistake? I want to analyze if there is a difference between the answers of the male and female population.

Help is very much appreciated!
 
#4
I reproduced your problem. Could you please ensure that in the Independent Samples T Test dialogue that Gender is in the grouping variable, and you have set the groups to be 0 and 1 under the Define Groups button.

It is because you have a group (e.g. 'other', or 'prefer not to say'), and in the Define Groups section you have a 2 or a 3, instead of just 0 and 1. The problem is that one of those groups (2 or 3) have no data i.e. nobody preferred not to say, or identified as other. So when SPSS tries to do a t-test, it looks for scores belonging to that group and finds none.
 
#6
Inside the Independent Samples T Test dialogue box, you put Gender into the Grouping variable box. Once it's in there, make sure you click on Define Groups and specify 0 and 1. It seems like you have either got 0 and 3, 1 and 3, or 2 and 3 in there, and this is causing the problem.
 

Karabiner

TS Contributor
#7
Please display the frequencies table for gender, the frequencies table for the dependent variable, and the syntax for your t-test (it can be obtained using “paste“ in the t-test window, if you used the drop-down menues).

With kind regards

Karabiner
 
#8
I put 0 and 1 in the box from the beginning on, and the mistake was still there, meaning I do not get any results. Is there maybe already a mistake because female and male are not displayed in numbers in the data view? I changed the values into numbers in the variable view.

T-TEST GROUPS=Gender('0' '1')
/MISSING=ANALYSIS
/VARIABLES=Applicationvalue Developmentvalue Economicvalue Socialvalue Interestvalue
/CRITERIA=CI(.95).


Fe 5.00 4.80
Fe 2.40 3.80 4.60 3.33
Fe 2.80 3.40 2.83 3.80 3.67
Ma 1.00 2.20 2.00 1.20 2.33
Fe 3.20 3.80 3.33 4.20 3.67
Fe 2.80 4.00 3.00 3.40 3.33
Ma 3.40 3.80 3.67 3.80 3.33
Fe 3.60 4.00 4.67 4.80 3.67
Ma 3.40 4.20 4.00 3.80 4.33
Ma 1.40 3.60 3.67 3.60 4.33
Ma 3.60 4.00 3.50 4.00 4.33
Fe 4.60 4.80 4.17 4.20 4.33
Fe 3.60 4.00 3.50 4.20 3.67
Ma 4.20 4.60 3.67 4.40 4.00
Ma 3.20 4.40 3.50 4.40 3.33
Ma 3.40 4.60 3.83 4.80 3.00
Ma 3.20 4.20 4.00 3.40 3.67
Ma 2.80 3.40 3.83 4.20 3.67
Fe 3.20 4.60 3.33 4.00 4.67
Ma 4.80 4.40 3.33 4.20 4.33
Ot 3.20 3.60 3.33 3.40 2.67
Fe 3.40 4.40 4.67 4.60 3.67
Fe 4.20 4.20 3.17 4.40 3.67
Ma 3.00 3.80 3.17 3.80 3.00
Fe 3.40 3.80 3.83 4.00 4.00
Ma 2.80 3.80 3.50 3.80 3.67
Fe 3.20 4.40 3.33 4.20 4.00
Fe 3.20 3.60 3.17 3.60 3.33
Ma 2.00 3.60 3.33 3.40 4.33
Ma 3.20 4.20 4.00 4.40 4.00
Fe 3.80 3.60 3.00 3.80 3.67
Fe 4.40 4.60 3.50 4.40 4.00
Fe 3.60 3.80 3.83 4.80 4.33
Fe 2.00 4.20 3.83 3.80 2.67
Fe 2.80 3.80 4.33 4.80 4.00
Ma 2.60 5.00 4.83 5.00 4.00
Ma 2.40 4.80 4.67 5.00 4.00
Fe 4.00 4.20 3.50 3.20 4.33
Fe 3.00 3.20 3.00 4.60 3.67
Fe 3.40 3.60 3.83 3.60 3.33
Ma 5.00 5.00 5.00 4.60 5.00
Fe 3.00 3.00 3.00 3.00 3.00
Ma 3.20 4.40 4.50 4.60 4.67
Ma 3.60 3.80 3.50 4.20 4.33
Ma 2.60 3.20 3.00 4.60 3.33
Ma 2.80 3.80 3.83 4.20 3.67
Ma 3.60 4.20 4.00 5.00 3.67
Ma 2.60 2.80 3.67 3.80 2.67
Ma 1.80 4.20 3.33 2.60 3.33
Ma 4.40 4.00 4.33 5.00 4.67
Ma 2.80 4.00 4.00 4.20 4.00
Ma 2.00 3.00 3.33 4.00 3.33
Ma 3.80 4.20 3.33 3.80 4.00
Ma 3.80 4.20 4.33 4.60 4.33
Ma 3.40 2.60 3.67 3.20 3.67
Ma 3.60 4.00 4.00 4.60 3.00
Ma 4.80 4.40 4.00 4.60 4.67
Ma 3.40 4.20 4.33 4.60 4.67
Fe 2.80 4.20 3.33 3.40 3.00
Fe 4.20 4.80 4.00 4.80 4.67
Ma 3.80 5.00 3.17 3.80 5.00
Ma 2.20 2.60 3.67 4.20 4.00
Fe 3.20 3.80 3.17 3.40 3.33
Ma 4.80 4.20 4.67 4.60 5.00
Fe 3.80 3.80 3.50 4.00 2.67
Ma 4.00 3.80 3.00 4.40 4.33
Fe 4.40 5.00 4.67 5.00 4.33
Fe 4.60 4.60 4.00 4.80 4.00
Fe 3.40 3.20 2.83 4.40 3.67
Fe 3.80 4.40 3.50 3.80 3.33
Fe 4.00 4.40 3.50 3.60 3.00
Ma 3.40 3.80 3.17 4.40 4.00
Fe 4.60 4.80 4.33 4.80 4.00
Fe 4.00 4.60 4.33 4.20 4.00
Fe 3.20 4.60 3.50 3.40 4.00
Fe 3.00 3.80 3.67 4.40 4.00
Ma 4.00 4.80 4.50 4.60 4.67
Fe 4.00 4.60 3.17 4.20 4.67
Ma 4.40 4.80 4.17 4.40 4.67
Ma 4.40 4.00 4.00 4.60 3.67
Fe 2.80 4.00 3.33 4.00 4.33
Fe 3.00 3.00 3.17 3.20 3.00
Ma 3.60 4.20 3.17 4.20 3.67
Ma 3.20 3.80 3.50 4.80 3.67
Fe 4.20 3.80 4.00 4.00 3.33
Ma 3.40 4.00 4.00 4.40 3.33
Ma 4.00 4.40 3.83 5.00 3.67
Fe 4.00 4.00 2.67 4.20 3.00
Ma 2.80 3.60 3.67 4.40 3.67
Fe 3.40 4.40 3.33 4.40 4.00
Ma 2.80 4.00 4.00 4.00 3.33
Ma 2.80 4.40 3.33 2.60 4.33
Ma 3.00 3.20 3.50 3.80 3.33
Fe 3.20 3.80 4.33 4.80 4.00
Ma 2.40 3.40 3.33 4.60 2.33
Ma 2.40 3.60 3.67 4.00 2.33
Fe 3.80 3.80 3.50 4.20 4.00
Ma 4.00 4.20 3.67 3.40 3.33
Ma 2.80 4.00 3.83 4.80 3.00
Ma 2.60 4.20 3.50 3.00 3.67
Ma 3.60 3.80 3.50 3.60 3.33
Ma 3.40 4.20 3.83 4.00 3.67
Ma 3.00 4.20 4.50 3.80 4.00
Fe 3.80 4.80 4.33 5.00 4.33
Ma 4.00 5.00 3.83 3.60 4.33
Fe 4.20 4.60 5.00 4.80 4.67
Fe 3.80 5.00 4.50 4.60 4.33
Fe 3.20 3.60 3.17 3.80 3.33
Ma 3.20 4.20 3.67 4.20 3.00
Ma 2.60 3.40 3.50 4.00 3.67
Fe 3.20 3.40 3.17 4.60 4.00
Fe 2.40 3.00 1.67 4.60 3.33
Fe 3.60 4.20 4.00 4.80 4.33
Fe 2.80 4.40 2.83 4.00 4.00
Fe 3.80 4.60 3.17 4.20 3.33
Ma 3.20 4.20 3.33 4.20 4.00
Ma 3.40 3.80 2.83 3.40 4.00
Fe 3.40 4.40 3.67 4.00 3.67
Ma 2.80 4.40 4.00 3.80 4.00
Ma 3.40 4.20 4.00 3.80 4.00
Fe 3.00 3.80 4.00 4.00 3.33
Fe 3.60 4.00 3.83 4.40 3.00
Fe 4.40 4.80 4.67 4.60 4.00
Fe 3.80 4.60 4.00 5.00 4.33
Fe 4.40 4.60 3.33 5.00 4.67
Ma 3.20 3.80 3.00 3.40 3.67
Fe 4.00 3.60 3.83 4.40 3.33
Ma 2.40 4.00 4.33 2.40 4.67
Fe 3.60 4.20 3.67 4.00 3.33
Ma 2.60 4.20 3.50 3.80 3.33
Ma 3.80 4.40 3.17 4.00 3.33
Fe 4.20 4.20 4.50 4.20 3.33
Fe 3.40 4.20 2.50 4.20 3.00
Fe 3.40 4.40 3.33 4.40 4.00
 

Attachments

#10
Yes so in the Data View you have put in text. You need these to be numeric I think, so it should be the other way around - numeric in Data View and then code them in the Variable View
 
#11
But how can I do that? I created the values (0=male etc.) in the variable view so do not understand why they are not showing up as numbers, or if they even need to be displayed as numbers in the data view. I am not very familiar with SPSS, I taught it myself as I need it for my bachelor thesis.
 
#12
Try the following

Transform --> "Recode into Same Variables"

Type "Fe" into "Old Value"
Type 0 into "New Value", click Add.
Repeat for Ma and other categories respectively.

Go to Variable View, change "Type" for Gender to be Numeric
Re-label it in the "Values" column.
Make sure it is "Nominal" in the "Measure" column.

Then try your t-test again.