SPSS Statistics

 View Only
  • 1.  Adding variables together SPSS

    Posted Thu April 22, 2021 09:59 AM
    Hi guys.

    I've got a question regarding adding variables to create 1 single variable. 
    I want to add 3 variables (income, education and occupation) to create the variable socioeconomic status. Since the variables all have different answer options I am not sure how to do this; can I just add them? (e.g. COMPUTE variable = variable1 + variable2 etc.)
    Additionally, I want to add 9 dichotomous (answer options are yes (1) and no (2)) variables into 1 variable, the same question applies here can I just sum these variables up?

    Thanks in advance!

    ------------------------------
    Kate Jansen
    ------------------------------

    #SPSSStatistics


  • 2.  RE: Adding variables together SPSS

    Posted Thu April 22, 2021 11:12 AM
    Hi, Kate.

    Af for Q1, I don't think anyone on this list can answer the first question with any authority without knowing *a lot* more about the variables. In general, any variables (numeric) can be added (with COMPUTE as you said) into a composite variable; it is up to the researcher to define and justify the composition.

    As for Q2, binary variables can be created in the following kind of way:

    COMPUTE newvar=SUM(v1,v2,etc).

    There are other ways. I find SUM convenient. You can find documentation for it in the Command Syntax Reference.​​

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 3.  RE: Adding variables together SPSS

    Posted Thu April 22, 2021 11:34 AM
    Sorry - I missed your coding of 1 and 2 for the binary variable.
    The COUNT command will work if you want to "sum" the number of values = 1 (or whatever) across a series of variables.
    If the binary var is 0 and 1, THEN I use SUM. ;)

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 4.  RE: Adding variables together SPSS

    Posted Mon May 24, 2021 02:06 PM
    Hi Kate,

    As Rick mentioned, it would help if you gave more details. However, generally speaking, the variables are not added up when computing the SEC. There are, of course, different versions of the SEC schemas. Those based on education, occupation, and a list of equipment in the household can be computed in SPSS using an IF structure. 
    As an example without the list of equipment in the household (you can add that later).

    NUMERIC EDUCATION OCCUPATION (F1.0).
    VAR LAB EDUCATION 'Education level'.
    VAL LAB EDUCATION
    1 'Low'
    2 'Medium'
    3 'High'.
    VAR LAB OCCUPATION 'Occupation'.
    VAL LAB OCCUPATION
    1 'Farmer'
    2 'Blue-collar worker'
    3 'White-collar worker'
    4 'Manager'
    5 'Director'.

    You first need a matrix to tell you which SEC level corresponds to each possible combination between EDUCATION and OCCUPATION. Then, you write the conditions, as an example:
    IF (EDUCATION = 1) AND (OCCUPATION = 1) SEC = 1. 
    ETC.
    IF (EDUCATION = 3) AND (OCCUPATION = 5) SEC = 5. 

    A few thoughts:
    1. summing may not work here because (EDUCATION=2 & OCCUPATION = 3) = 5 which is the same as (EDUCATION=1 & OCCUPATION = 4) - not sure you will want to assign the same SEC level to these 2 cases, for instance.
    2. if you still want to sum them up, then use Rick's method NewVar = SUM(Var1, Var2, etc.) rather than COMPUTE NewVar = Var1 + Var2 + etc.
    The SUM works even if some of the variables have missing values. The COMPUTE method will produce a missing value instead.

    ------------------------------
    Silviu Matei
    ------------------------------