SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
Expand all | Collapse all

How to compute multiple variables and make four main categories that shows occurrences?

  • 1.  How to compute multiple variables and make four main categories that shows occurrences?

    Posted Mon July 27, 2020 04:13 PM

    I have six variables ranging from 1 to 8. I want to compute these six variables together and make four main categories from the answers (1-8). And get the sum of occurrences in each category. Each category will look like this, made with dummy:

    • category 1 = answers 1-2 = 1, answers 3-8 = 0.
    • category 2 = answers 3-5 = 1, answers 1-2, 6-8 = 0.
    • category 3 = answers 6-7 = 1, answers 1-5, 8 = 0.
    • category 4 = answer 8 = 1, answers 1-7 = 0.

    How should I compute these variables together? If I use for example MEAN when I compute I don’t get the real occurrence of each answers (since it is mean), but still the mean does not look accurate. If I run a frequency table the frequency in the table for valid 8 is 1 on frequency. And that is not correct mean, if I only run frequency for the six variables separate the valid 8 is a round 400 ish. So if I then make the four categories then category 4 answers 8/1 still show only 1 in frequency.

    I have also tried this; make dummies based on category 4 on the six individual variables, and then compute these together. And then the frequency table still show 1 for answer 8.

    And also tried COUNT command, but it does not seems right either.

    syntax:

    COMPUTE new_variable=MEAN(variable1,variable2,variable3,variable4,variable5,variable6). EXECUTE.

    RECODE variable1 (1 thru 7=0) (8=1) (MISSING=SYSMIS) INTO category4_variable1 VARIABLE LABELS category4_variable1 ‘category4_variable1’ EXECUTE

    (The last syntax was used on all the six variable, then compute those together to create category 4.)

    My questions:

    • What is the correct way to compute these six variables together? (I don’t think mean is correct as I’m not interested in mean but in the occurrences)
    • How can I get four main categories based on these six variables together?
    • How can I get the sum occurrences in each category? / Number of times the respondent answers eg. 8?
    • Other suggestions?

    Much appreciated, thank you.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: How to compute multiple variables and make four main categories that shows occurrences?

    Posted Tue July 28, 2020 07:14 PM

    Hi Support Member​ ,

    It's not clear (to me at least) where you are trying to go with this scenario. It seems like what you have is a collection of 6 observed variables that make up a single response for each record/respondent in the data set. You might look into the MULT REPONSE command:

    https://www.ibm.com/support/knowledgecenter/SSLVMB_27.0.0/statistics_mainhelp_ddita/spss/base/multdef_container.html

     

    or the Custom Tables (CTABLES) command (if your license includes it) with Multiple Response sets:

    https://www.ibm.com/support/knowledgecenter/SSLVMB_27.0.0/statistics_mainhelp_ddita/spss/tables/nt_mult_response_intro.html

     

    To make it clearer, you might:

    1) Show us an example dataset with 5 records (not real data please) before any manipulations -- What is it like now

    2) Show us the same data with new variables appended. -- What do you want it to look like.

    3) Show us what you've tried to get from 1 to 2 above.

     

    I hope this helps!

    Support Member​ 

     

     






    #SPSSStatistics
    #Support
    #SupportMigration