title: SPSS Chi-square test on raw data
body: <p>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.</p>
  
  <p>The raw data summarizes several test conditions, locations, groups of participants and results in one file. Example data:</p>
  
  <pre><code>#   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
  .....
  </code></pre>
  
  <p>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. </p>
  
  <p>Problem 2: Furthermore if I just try and compare male and female participants SPSS produces the following error message after calculating:</p>
  
  <blockquote>
    <p>No statistics are computed because (Question) is a constant.&lt;</p>
  </blockquote>
  
  <p>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?</p>
  
  <hr>
  
  <p>EDIT: Allow me to rephrase. (Protip: don't ask online when you are frustrated by the problem)</p>
  
  <p>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?</p>