SPSS Statistics

Expand all | Collapse all

Multiple Response on one Question

  • 1.  Multiple Response on one Question

    Posted 30 days ago
    Hello. 

    For my project, we are working on a survey that was conducted nation wide. We had a question in which respondents identified their state of residence. That was one question whose answers were 1-50. Each number corresponded to one of the 50 states. We also had another question where we asked the respondents to identify a group of about 20 pollutants. Respondents were told to select all the pollutants they knew about. This generated two variables, with a one or zero (one: aware of the pollutant, zero: unaware of the pollutant). 

    We now want to look at the data state by state. How would I go about setting up a crosstab where I can look at each state in one row, and the twenty contaminants in the columns, so that we can identify the most well known contaminants per state. 

    Thank you for your help. 


    ------------------------------
    Nathanael Sovitzky
    ------------------------------


  • 2.  RE: Multiple Response on one Question

    Posted 30 days ago
    Why would you have two variables for each pollutant?  You should have just one with values, say, 0 and 1.  If you are stuck with two, combine them with an IF statement or similar.

    Then define a multiple dichotomy set for these (Analyze > Tables > Multiple Response Sets) named, say,  POLLUTANTS, that would have 20 variables in it.

    Finally, use CTABLES (Analyze > Tables > Custom Tables).  Put STATE in the rows and POLLUTANTS in the columns.  You have a choice of statistics to display.

    If you don't have the CTABLES procedure, you can do something similar with Analyze > Multiple Response

    --





  • 3.  RE: Multiple Response on one Question

    Posted 29 days ago
    Hello you can try this: 

    * create sample data *.

    INPUT PROGRAM.
    NUMERIC state (F2).
    LEAVE state .
    LOOP K = 1 TO 2000.
    COMPUTE state =rnd(1* RV.uniform(1, 50)).
    END CASE.
    END LOOP.
    END FILE.
    END INPUT PROGRAM.

    do repeat a = 1 to 50/
    b = state1 to state50.
    if (state = a) b = 1.
    end repeat.

    do repeat a = p1 to p20.

    COMPUTE a =rnd(1* RV.uniform(0, 1)).
    end repeat.

    save outfile = myfile.

    get file = myfile.

    * aggreate for each state *.

    AGGREGATE
    /OUTFILE=*
    /BREAK=state1
    / p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20=SUM(p1 to p20) .

    select if (~sysmis(state1)).

    you may need a macro to do this for state1 state2 ... state50 

    then rename state 1 , ... state50 to state, and add all files to one file, 

    regards,

    ------------------------------
    xiaoqin Oezener-Wan
    ------------------------------



  • 4.  RE: Multiple Response on one Question

    Posted 28 days ago
    AGGREGATE often produces datasets that are similar to what CTABLES produces, but, as I posted elsewhere in response to this question, just using multiple response sets and CTABLES is an easy way to analyze these data.

    --