Question

I want to run a chi square test on my raw data but SPSS is not reading the raw data as I want it to.

The raw data summarizes several test conditions, locations, groups of participants and results in one file. Example data:

#   country gender  Question 1  Question 2
1   chile   f   yes no
2   chile   f   no  no
3   chile   m   no  yes
4   chile   m   yes no
5   chile   f   yes no
6   chile   f   yes yes
7   chile   m   no  yes
8   france  f   yes no
9   france  f   no  no
10  france  f   no  no
11  france  m   yes yes
12  france  m   yes no
13  france  f   yes no
14  france  f   no  yes
15  china   m   yes yes
16  china   f   no  yes
17  china   f   no  yes
18  china   f   yes yes
19  china   m   yes yes
20  china   m   yes no
.....

I want to do do a chi-square test on comparing French men and Chilean women and their responses to question 1 through 14. Problem 1: A filter will not make SPSS ignore the remaining rows such as Chinese participants.

Problem 2: Furthermore if I just try and compare male and female participants SPSS produces the following error message after calculating:

No statistics are computed because (Question) is a constant.<

I cannot accept that I am forced to summarize the data manually into a frequency table, so how do I make SPSS automatically do this?


EDIT: Allow me to rephrase. (Protip: don't ask online when you are frustrated by the problem)

Problem 1 again: I could just move the do the rows I need to a different file but if/when I need to do so many times it becomes increasingly cumbersome. Is there a way to select a combination of filters (for example) for the two columns in the contingency table?

Était-ce utile?

La solution

I was using filters ("Select Cases...") wrong!

Solution: I first make a filter for the data I want to compare. (Pseudo code the menu Data>Select Cases...) Filter: IF French AND Male.

Now the filter (I label it 'FilterA' in the Variable View) and it creates a new filter column in the Data View with row variable = 1 for French and male, and zero for the rest.

Now the women from Chile are zero as I want them in the filter (this is important) but so are all the Chinese, the French women and so on.

So I define a second filter: IF Chile AND Female OR French AND Male

Now all the data is filtered out as shown by a diagonal line through the row-counter column on the far left in SPSS. Now when a statistical test is run this data will not be included in the test.

Now I can finally perform the test chi-square: I choose Descriptive Statistics>Crosstabs. For column I choose "FilterA" which I created. For row I choose the QuestionX/whatever data I want calculated.

Fin.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top